Skip to content

Commit

Permalink
fix indentation in XXPlusYYGate docstring (Qiskit#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 and ElePT committed May 31, 2024
1 parent 9ee5aef commit 9fd495e
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 9fd495e

Please sign in to comment.