Coupling of quantum states with mechanical heterostructures