-
Notifications
You must be signed in to change notification settings - Fork 35
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
Maintain global phase #117
Comments
Awesome suggestion! In 1.2, we will update the instantiation pipeline a bit, and this should definitely go in there. In the meantime, if this is important or timely for you, we can accomplish this by building a cost function for it. |
I think the difficulty here is it’s hard to consistently define a global phase. For example, consider a circuit containing gate Rz(pi/4). There are two different conventions for defining the unitary of Rz(pi/4), and they have global phases e^(pi/8) off from each other. So BQSKit might consider a circuit to match the desired phase or not, depending on which convention is used. Note that in the actual convention that BQSKit uses, Rz(pi) and Z differ by a global phase. |
We can always easily add a global phase or correct it at the end. Don't worry about doing it during compilation. |
I think there is a well-defined choice of global phase, namely that before/after compiling, the get_unitary() method should give the same matrix with the same phase. So everything should be internally consistent within bqskit, even if other programs that read qasm files later might be inconsistent |
Feature request: an option when compiling to maintain the global phase of the operator
The text was updated successfully, but these errors were encountered: