def test_distance_error(self): """Test distance between unconected physical_qubits.""" graph = Coupling() graph.add_physical_qubit(0) graph.add_physical_qubit(1) self.assertRaises(CouplingError, graph.distance, 0, 1)
def test_add_physical_qubits(self): coupling = Coupling() self.assertEqual("", str(coupling)) coupling.add_physical_qubit(0) self.assertEqual([0], coupling.physical_qubits) self.assertEqual("", str(coupling))