Skip to content

Commit

Permalink
Update test/python/transpiler/test_vf2_layout.py
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew Treinish <[email protected]>
  • Loading branch information
1ucian0 and mtreinish authored Nov 2, 2021
1 parent 90020ec commit 20f044d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions test/python/transpiler/test_vf2_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,7 @@ class TestVF2LayoutLattice(LayoutTestCase):

def graph_state_from_pygraph(self, graph):
"""Creates a GraphState circuit from a PyGraph"""
rows = [x[0] for x in graph.edge_list()]
cols = [x[1] for x in graph.edge_list()]

size = max(len(rows), len(cols))
adjacency_matrix = numpy.zeros((size, size))
adjacency_matrix[rows, cols] = 1
adjacency_matrix[cols, rows] = 1
adjacency_matrix = retworkx.adjacency_matrix(graph)
return GraphState(adjacency_matrix)

def test_hexagonal_lattice_graph_20_in_25(self):
Expand Down

0 comments on commit 20f044d

Please sign in to comment.