You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To represent a one-qubit Z-measurement, I create a green phaseless spider with one input / one output and set it as a ground. At first glance, PyZX can handle this just fine:
However, if I compose this graph with itself (zx.draw(g*g) then the second spider is no longer a ground:
I've verified this as well for larger examples where the two graphs are different:
q=5;
c1=zx.Circuit(q)
for i in range(0,q-1,2):
c1.add_gate("CNOT",i,i+1)
g1=c1.to_graph()
g1.auto_detect_io()
g2=zx.generate.identity(q)
for i in range(q):
g2.set_type(2*i+1,1)
g2.set_ground(2*i+1)
v = g2.add_vertex(qubit=i,row=2)
g2.add_edge(g2.edge(v,2*i+1),edgetype=zx.EdgeType.SIMPLE)
g2.auto_detect_io()
The text was updated successfully, but these errors were encountered:
To represent a one-qubit Z-measurement, I create a green phaseless spider with one input / one output and set it as a ground. At first glance, PyZX can handle this just fine:
However, if I compose this graph with itself (
zx.draw(g*g
) then the second spider is no longer a ground:I've verified this as well for larger examples where the two graphs are different:
The text was updated successfully, but these errors were encountered: