forked from Qiskit/qiskit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation on OpenQASM 2 phase conventions
OpenQASM 2 as a language does not provide a way to specify global phases, either of operations or the entire program. The prose of the defining paper talks about the `u1` and `rz` instructions from `qelib1.inc` as having different global phases, however since the language cannot represent this, the header file defines `rz` apparently as a direct alias to `u1`. Qiskit's position has always been that we interpret `rz` as using the phase convention of `RZGate`, and `u1` uses the different convention of `PhaseGate`. This commit adds documentation to the pages on OpenQASM 2 about this difference, and includes an example of how to override Qiskit's default if the generating code (e.g. pyZX) wants to use an alternative phase convention.
- Loading branch information
1 parent
cd507ad
commit 7da5e5f
Showing
1 changed file
with
85 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters