Closed rafaelha closed 5 months ago
Looking into this further, the problem was simply that BaseGraph.adjoint()
did not conjugate the phase. Adding the line
g.scalar.add_phase(- 2 * g.scalar.phase)
in BaseGraph.copy
fixed everything.
I think this can now be closed?
In the following code snippet, the two tensors differ by a phase of 1j. Running this for different seeds, I find that the phase of
z
is either [1, 1j, -1, -1j].version: pyzx 0.8.0