Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_ising_dict(self):
Q = {(0, 4): -1.0, (6, 2): -3.0}
bqm = oj.ChimeraModel.from_qubo(Q=Q, unit_num_L=3)
def test_get_chimera_graph(self):
c_model = oj.ChimeraModel.from_qubo(
Q={(0, 4): -1, (1, 1): -1, (1, 5): 1}, unit_num_L=2)
chimera = c_model.get_chimera_graph()
self.assertIsInstance(chimera, cj.graph.Chimera)
c_model = oj.ChimeraModel.from_qubo(
Q={((0, 0, 1), (0, 0, 4)): -1, ((0, 0, 4), (0, 0, 2)): -1},
unit_num_L=2)
chimera = c_model.get_chimera_graph()
self.assertIsInstance(chimera, cj.graph.Chimera)
def test_get_chimera_graph(self):
c_model = oj.ChimeraModel.from_qubo(
Q={(0, 4): -1, (1, 1): -1, (1, 5): 1}, unit_num_L=2)
chimera = c_model.get_chimera_graph()
self.assertIsInstance(chimera, cj.graph.Chimera)
c_model = oj.ChimeraModel.from_qubo(
Q={((0, 0, 1), (0, 0, 4)): -1, ((0, 0, 4), (0, 0, 2)): -1},
unit_num_L=2)
chimera = c_model.get_chimera_graph()
self.assertIsInstance(chimera, cj.graph.Chimera)