-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
U3 decomposition for matrices with determinant -1 #1230
Comments
I know you want a more general solution, but at least with respect to the Paulis one can still get them using the regular Using
|
Thanks @renatomello, indeed this is the fix that we already implemented in qibocal when performing RB qiboteam/qibocal#730. |
@jeongrak-son do you have some suggestions? I think this is an interesting question when trying to compile controlled-unitary operations. Here is an example where the phase matters: For a single qubit we would have I'm guessing in general if you compile the controlled-unitary operation using the Does anyone know how this is solved for the surface code logical gates? |
I do not believe that such function |
One triviality: we already agreed that using the Sylvester's formula e.g. @jeongrak-son can we implement To summarize all examples, In general, I'd be thankful for some explanation related to 'connectivity to the identity' of the unitary group and how this behaves if we add registers or not. If we work with only one qubit then we make continuous maps of the form |
I think a simple general solution is to remember that |
@marekgluza @renatomello do you agree with the suggested solution? |
Not sure
E.g. adding a Z before a Z measurement is fine. But what if someone changes the basis? For a Isn't it better to check if det = +1 and otherwise proceed with |
I don't think I'm seeing the suggested solution |
@renatomello what you said here as a 'solution'
makes sense and can be generalized to any 2x2 matrix with determinant -1 The only problem is if one will do controlled-unitary operations as discussed above then there are pitfalls about forgetting the phase in the decomposition (but this cannot be circumvented easily and there is little urgency in having that feature) |
I agree that controlled operations should be treated differently, but there are ways to handle those, e.g. here and here and many others. However, that becomes more of a transpiler issue. I'd just move forward with adding a global phase and documenting it. |
@scarrazza sounds good to me, thanks @renatomello for the references |
The following
u3_decompositions
functionqibo/src/qibo/transpiler/unitary_decompositions.py
Lines 18 to 35 in 19368f2
holds only for matrices with determinant +1, however when executing on hardware we might want to execute gates, such as
X
,Y
andZ
with determinant-1
.We need to find a way to generalize the previous formula to accommodate matrices with
-1
determinant.I know that we already discussed about this but I decided to open the issue so that we don't forget.
The text was updated successfully, but these errors were encountered: