Skip to content

Commit

Permalink
doc: Improve gphase unitary matrix definition in docstring (#944)
Browse files Browse the repository at this point in the history
* Improve gphase unitary matrix definition in docstring

* Remove extra whitespace

---------

Co-authored-by: Abe Coull <85974725+math411@users.noreply.github.com>
  • Loading branch information
rmshaffer and AbeCoull authored Apr 9, 2024
1 parent 64a2536 commit c687223
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/braket/circuits/gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ class GPhase(AngledGate):
Unitary matrix:
.. math:: \mathtt{gphase}(\gamma) = e^(i \gamma) I_1.
.. math:: \mathtt{gphase}(\gamma) = e^{i \gamma} I = \begin{bmatrix}
e^{i \gamma} & 0 \\
0 & e^{i \gamma} \end{bmatrix}.
Args:
angle (Union[FreeParameterExpression, float]): angle in radians.
Expand Down Expand Up @@ -277,7 +279,9 @@ def gphase(
Unitary matrix:
.. math:: \mathtt{gphase}(\gamma) = e^(i \gamma) I_1.
.. math:: \mathtt{gphase}(\gamma) = e^{i \gamma} I = \begin{bmatrix}
e^{i \gamma} & 0 \\
0 & e^{i \gamma} \end{bmatrix}.
Args:
angle (Union[FreeParameterExpression, float]): Phase in radians.
Expand Down

0 comments on commit c687223

Please sign in to comment.