Fixed bug in resonator_qubit()