Skip to content

Commit

Permalink
fix indentation in XXPlusYYGate docstring (#12365)
Browse files Browse the repository at this point in the history
* fix indentation in XXPlusYYGate docstring

* break long lines
  • Loading branch information
kevinsung authored May 8, 2024
1 parent 0f7424c commit b5c5179
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions qiskit/circuit/library/standard_gates/xx_plus_yy.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,20 @@ class XXPlusYYGate(Gate):
q_1: ┤0 ├
└───────────────┘
.. math::
\newcommand{\rotationangle}{\frac{\theta}{2}}
R_{XX+YY}(\theta, \beta)\ q_0, q_1 =
RZ_1(-\beta) \cdot \exp\left(-i \frac{\theta}{2} \frac{XX+YY}{2}\right) \cdot RZ_1(\beta) =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & \cos\left(\rotationangle\right) & -i\sin\left(\rotationangle\right)e^{i\beta} & 0 \\
0 & -i\sin\left(\rotationangle\right)e^{-i\beta} & \cos\left(\rotationangle\right) & 0 \\
0 & 0 & 0 & 1
\end{pmatrix}
.. math::
\newcommand{\rotationangle}{\frac{\theta}{2}}
R_{XX+YY}(\theta, \beta)\ q_0, q_1 =
RZ_1(-\beta) \cdot \exp\left(-i \frac{\theta}{2} \frac{XX+YY}{2}\right) \cdot RZ_1(\beta) =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & \cos\left(\rotationangle\right) &
-i\sin\left(\rotationangle\right)e^{i\beta} & 0 \\
0 & -i\sin\left(\rotationangle\right)e^{-i\beta} &
\cos\left(\rotationangle\right) & 0 \\
0 & 0 & 0 & 1
\end{pmatrix}
"""

def __init__(
Expand Down

0 comments on commit b5c5179

Please sign in to comment.