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