def test_failed_reduced_map(self): """Generate a bad disconnected reduced map""" fake = FakeRueschlikon() cmap = fake.configuration().coupling_map coupling_map = CouplingMap(cmap) with self.assertRaises(CouplingError): coupling_map.reduce([12, 11, 10, 3])
def test_successful_reduced_map(self): """Generate a reduced map""" fake = FakeRueschlikon() cmap = fake.configuration().coupling_map coupling_map = CouplingMap(cmap) out = coupling_map.reduce([12, 11, 10, 9]).get_edges() ans = [(1, 2), (3, 2), (0, 1)] self.assertEqual(set(out), set(ans))