Quantum algorithms for Josephson networks