From c3e22ec4dc23233efcfe09c8e2687bba80fd0387 Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Tue, 7 May 2024 20:23:39 -0400 Subject: [PATCH 1/2] fix indentation in XXPlusYYGate docstring --- .../library/standard_gates/xx_plus_yy.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/qiskit/circuit/library/standard_gates/xx_plus_yy.py b/qiskit/circuit/library/standard_gates/xx_plus_yy.py index a7b62175f207..981c11e5fadd 100644 --- a/qiskit/circuit/library/standard_gates/xx_plus_yy.py +++ b/qiskit/circuit/library/standard_gates/xx_plus_yy.py @@ -71,18 +71,18 @@ 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__( From 51352cd187c59922dfaee2abdd4479fad8476af0 Mon Sep 17 00:00:00 2001 From: "Kevin J. Sung" Date: Tue, 7 May 2024 21:05:03 -0400 Subject: [PATCH 2/2] break long lines --- qiskit/circuit/library/standard_gates/xx_plus_yy.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qiskit/circuit/library/standard_gates/xx_plus_yy.py b/qiskit/circuit/library/standard_gates/xx_plus_yy.py index 981c11e5fadd..a82316ed7b09 100644 --- a/qiskit/circuit/library/standard_gates/xx_plus_yy.py +++ b/qiskit/circuit/library/standard_gates/xx_plus_yy.py @@ -79,8 +79,10 @@ class XXPlusYYGate(Gate): 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 & \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} """