-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generalize X and Z to Weyl–Heisenberg gates (#4919)
Closes #4782, xref #3190 Implements X and Z as Weyl-Heisenberg gates, allowing them to operate on qudits of arbitrary dimension. The implementations are done via eigen_components, thus allowing interoperability with arbitrary exponents and global phase. Tests are done to ensure the unitaries at exponent 1 correspond to the standard definitions of Shift and Clock, at dimension 3 and 4. We also test simulations at non-integral exponents to make sure they perform as expected. Following the precedent set by the identity gate, the diagram labels remain X and Z when applied to qudits, as the qudit dimension itself is already labeled in the diagram. There is no negative impact on standard X and Z performance. In fact the performance is slightly improved over the existing X and Z gate implementations because we now cache the eigen_components rather than generate them each time. Testing shows a roughly 10% improvement in unitary calculation due to this change. Additionally this removes all the existing `PlusGate` definitions and replaces their use with the new `X` gate functionality instead.
- Loading branch information
Showing
6 changed files
with
335 additions
and
140 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
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
Oops, something went wrong.