Nonlinear couplings for quantum control of superconducting qubits and electrical/mechanical resonators