From b8f0f33f01b7ec1b2bf0b99e547a14ab2a99473e Mon Sep 17 00:00:00 2001 From: Jean-Christophe Jaskula Date: Tue, 28 Nov 2023 11:24:15 +0100 Subject: [PATCH] update docstring --- src/braket/circuits/gates.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/braket/circuits/gates.py b/src/braket/circuits/gates.py index a1c881395..29d223c26 100644 --- a/src/braket/circuits/gates.py +++ b/src/braket/circuits/gates.py @@ -266,6 +266,12 @@ def gphase( ) -> Instruction | Iterable[Instruction]: r"""Global phase gate. + If the gate is applied with control/negative control modifiers, it is translated in an + equivalent gate using the following definition: `phaseshift(λ) = ctrl @ gphase(λ)`. + The rightmost control qubit is used for the translation. If the polarity of the rightmost + control modifier is negative, the following identity is used: + `negctrl @ gphase(λ) q = x q; ctrl @ gphase(λ) q; x q`. + Unitary matrix: .. math:: \mathtt{gphase}(\gamma) = e^(i \gamma) I_1.