Skip to content

Commit

Permalink
better translation for grover
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Guggemos committed Apr 18, 2024
1 parent b496003 commit 5fcdba4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/extraction/perceval.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(self, graph_json):
g = g.copy()
to_graph_like(g)
g = self.optimize_graph(g)
#g.normalize()
g.normalize()
self.graph = g.copy()

def optimize_graph(self, g):
Expand Down
4 changes: 2 additions & 2 deletions scripts/translate_qasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def exit(data, warnings, errors):
o_graph_state.remove_vertices(o_graph_state.outputs())
o_graph_state.remove_vertices(o_graph_state.inputs())
for v in o_graph_state.vertices():
o_graph_state.set_phase(v,0)
o_graph_state.set_phase(v,0)
plt = zx.draw_matplotlib(o_graph_state)
f = io.BytesIO()
plt.savefig(f, format="svg")
Expand All @@ -131,7 +131,7 @@ def exit(data, warnings, errors):
try:
zx_graph = p.graph.copy()

#zx_graph.normalize()
zx_graph.normalize()
plt = zx.draw_matplotlib(zx_graph)
f = io.BytesIO()
plt.savefig(f, format="svg")
Expand Down

0 comments on commit 5fcdba4

Please sign in to comment.