From 53f0f778a8b8c454c817ac2384712237fd40d333 Mon Sep 17 00:00:00 2001 From: TSS99 Date: Fri, 24 Apr 2026 12:15:39 +0530 Subject: [PATCH] docs: fix UGate OpenQASM 3 phase note --- qiskit/circuit/library/standard_gates/u.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/qiskit/circuit/library/standard_gates/u.py b/qiskit/circuit/library/standard_gates/u.py index 93c7503874bd..e2de3b291bd8 100644 --- a/qiskit/circuit/library/standard_gates/u.py +++ b/qiskit/circuit/library/standard_gates/u.py @@ -61,10 +61,11 @@ class UGate(Gate): .. note:: - The matrix representation shown here is the same as in the `OpenQASM 3.0 specification - `_, - which differs from the `OpenQASM 2.0 specification - `_ by a global phase of + The matrix representation in the current `OpenQASM 3 specification + `_ is this + matrix multiplied by a global phase of :math:`e^{i\theta/2}`. Earlier + versions of the OpenQASM specification used a definition that differs + from Qiskit by a global phase of :math:`e^{i(\phi+\lambda)/2}`. Examples: