Open ajavadia opened 1 year ago
Generally you should try to write code that doesn't care about such a jump. There will always be discontinuities in Weyl chamber expansions by necessity but I'll add a check to move the discontinuity epsilon away from the high symmetry point alpha =pi/4
This is not a bug, but rather an annoying inconsistency in how
TwoQubitWeylDecomposition
handles points of the form(pi/4, y, z)
. These points are locally equivalent to(pi/4, y, -z)
, but the decomposer seems to be randomly picking between them. This makes it hard to write code on top of it.What is happening?
For example by sweeping the parameter
α
in the following circuit I generate circuits whose Weyl coordinates lie in(pi/4, y, z)
. Then I invert the circuit. The expectation is that the inverse should decompose as(pi/4, y, -z)
(this is true in general, not just when x=pi/4, i.e. CAN(x, y, z)† ~ CAN(x, y, -z)). However it sometimes decomposes as(pi/4, y, z)
and sometimes as(pi/4, y, -z)
. As I said this is technically correct for this special case, but why does this happen?How can we reproduce the issue?
What should happen?
The green line should follow the red dotted line (i.e. all decompositions should be of the form
(pi/4, y, -z)
).Any suggestions?
No response