Fix documented definition of ``UGate`` (#7198)

* Update u.py

Fixes #7197

* Update u.py

Fixed a typo in the previous pull request.

* Update qiskit/circuit/library/standard_gates/u.py

Co-authored-by: Julien Gacon <gaconju@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
sg495 2022-03-18 19:07:36 +01:00 committed by GitHub
parent 064855db2a
commit ac3aa530c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -28,7 +28,13 @@ class UGate(Gate):
.. math::
U(\theta, \phi, \lambda) =
RZ(\phi - \pi/2) RX(\pi/2) RZ(\pi - \theta) RX(\pi/2) RZ(\lambda - \pi/2)
RZ(\phi) RX(-\pi/2) RZ(\theta) RX(\pi/2) RZ(\lambda)
Equivalent simplified form:
.. math::
U(\theta, \phi, \lambda) =
RZ(\phi + \pi/2) RX(\theta) RZ(\lambda - \pi/2)
**Circuit symbol:**