-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Addressed Issue #1721: Introduced a Gate for Global Phase adjustment #1810
Addressed Issue #1721: Introduced a Gate for Global Phase adjustment #1810
Conversation
…siteGates) that change the global phase by a specified unital complex number. (Qiskit#1721) - Added @Property getter: ``get_hypothetical_left_over_global_phase()`` to return theoretical unachieved global phase of initialization circuit. - Added ``global_phase.py`` to demonstrate usage of ``GlobalPhaseGate`` and ``get_hypothetical_left_over_global_phase``
I really don't think we want to go down this path. Since our optimizer doesn't preserve global phase then when you add a global phase to an input state then after you use the optimizer you will lose it. Since quantum is insensitivity to the global phase lets not add global phase to the initializer. There is no use case where this applies. |
Yes, that's partially why, when I applied the expected global phase to complete the quantum initialisation it didn't work. Nevertheless, this introduced gate that allows for manually changing the global phase does work. It works as expected (it passes through the compiler and gets simulated as expected).
This PR, doesn't change the initializer. It introduces a new gate that adjusts the global phase successfully. |
@jaygambetta ,
|
Summary
Addressed Issue #1721: Introduced a Gate for Global Phase adjustment
Designed a new gate that results in global phase change. Even though global phase has no measurable difference to a quantum outcome, it may be useful for simulation purposes.
Details and comments
GlobalPhaseGate
class to add gates (to circuits and CompositeGates) that change the global phase by a specified unital complex number. (state initializer not working correctly for some negative values #1721)get_hypothetical_left_over_global_phase()
to return theoretical unachieved global phase of initialization circuit.global_phase.py
to demonstrate usage ofGlobalPhaseGate
andget_hypothetical_left_over_global_phase