Skip to content

Commit

Permalink
use aligned instead of align*
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Jan 22, 2024
1 parent b7f733e commit 62b6443
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
36 changes: 18 additions & 18 deletions qiskit/pulse/library/symbolic_pulses.py
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,10 @@ class Gaussian(metaclass=_PulseType):
.. math::
\begin{align*}
\begin{aligned}
f'(x) &= \exp\Bigl( -\frac12 \frac{{(x - \text{duration}/2)}^2}{\text{sigma}^2} \Bigr)\\
f(x) &= \text{A} \times \frac{f'(x) - f'(-1)}{1-f'(-1)}, \quad 0 \le x < \text{duration}
\end{align*}
\end{aligned}
where :math:`f'(x)` is the gaussian waveform without lifting or amplitude scaling, and
:math:`\text{A} = \text{amp} \times \exp\left(i\times\text{angle}\right)`.
Expand Down Expand Up @@ -794,10 +794,10 @@ class GaussianSquare(metaclass=_PulseType):
.. math::
\\begin{align*}
\\begin{aligned}
\\text{risefall} &= \\text{risefall\\_sigma\\_ratio} \\times \\text{sigma}\\\\
\\text{width} &= \\text{duration} - 2 \\times \\text{risefall}
\\end{align*}
\\end{aligned}
If ``width`` is not None and ``risefall_sigma_ratio`` is None:
Expand All @@ -807,7 +807,7 @@ class GaussianSquare(metaclass=_PulseType):
.. math::
\\begin{align*}
\\begin{aligned}
f'(x) &= \\begin{cases}\
\\exp\\biggl(-\\frac12 \\frac{(x - \\text{risefall})^2}{\\text{sigma}^2}\\biggr)\
& x < \\text{risefall}\\\\
Expand All @@ -821,7 +821,7 @@ class GaussianSquare(metaclass=_PulseType):
\\end{cases}\\\\
f(x) &= \\text{A} \\times \\frac{f'(x) - f'(-1)}{1-f'(-1)},\
\\quad 0 \\le x < \\text{duration}
\\end{align*}
\\end{aligned}
where :math:`f'(x)` is the gaussian square waveform without lifting or amplitude scaling, and
:math:`\\text{A} = \\text{amp} \\times \\exp\\left(i\\times\\text{angle}\\right)`.
Expand Down Expand Up @@ -940,10 +940,10 @@ def GaussianSquareDrag(
.. math::
\\begin{align*}
\\begin{aligned}
\\text{risefall} &= \\text{risefall\\_sigma\\_ratio} \\times \\text{sigma}\\\\
\\text{width} &= \\text{duration} - 2 \\times \\text{risefall}
\\end{align*}
\\end{aligned}
If ``width`` is not None and ``risefall_sigma_ratio`` is None:
Expand All @@ -954,10 +954,10 @@ def GaussianSquareDrag(
.. math::
\\begin{align*}
\\begin{aligned}
g(x, c, σ) &= \\exp\\Bigl(-\\frac12 \\frac{(x - c)^2}{σ^2}\\Bigr)\\\\
g'(x, c, σ) &= \\frac{g(x, c, σ)-g(-1, c, σ)}{1-g(-1, c, σ)}
\\end{align*}
\\end{aligned}
From these, the lifted DRAG curve :math:`d'(x, c, σ, β)` can be written as
Expand All @@ -970,7 +970,7 @@ def GaussianSquareDrag(
.. math::
\\begin{align*}
\\begin{aligned}
f'(x) &= \\begin{cases}\
\\text{A} \\times d'(x, \\text{risefall}, \\text{sigma}, \\text{beta})\
& x < \\text{risefall}\\\\
Expand All @@ -984,7 +984,7 @@ def GaussianSquareDrag(
)\
& \\text{risefall} + \\text{width} \\le x\
\\end{cases}\\\\
\\end{align*}
\\end{aligned}
where :math:`\\text{A} = \\text{amp} \\times
\\exp\\left(i\\times\\text{angle}\\right)`.
Expand Down Expand Up @@ -1088,14 +1088,14 @@ def gaussian_square_echo(
.. math::
\\begin{align*}
\\begin{aligned}
g_e(x) &= \\begin{cases}\
f_{\\text{active}} + f_{\\text{echo}}(x)\
& x < \\frac{\\text{duration}}{2}\\\\
f_{\\text{active}} - f_{\\text{echo}}(x)\
& \\frac{\\text{duration}}{2} < x\
\\end{cases}\\\\
\\end{align*}
\\end{aligned}
One case where this pulse can be used is when implementing a direct CNOT gate with
a cross-resonance superconducting qubit architecture. When applying this pulse to
Expand All @@ -1108,10 +1108,10 @@ def gaussian_square_echo(
.. math::
\\begin{align*}
\\begin{aligned}
\\text{risefall} &= \\text{risefall\\_sigma\\_ratio} \\times \\text{sigma}\\\\
\\text{width} &= \\text{duration} - 2 \\times \\text{risefall}
\\end{align*}
\\end{aligned}
If ``width`` is not None and ``risefall_sigma_ratio`` is None:
Expand Down Expand Up @@ -1341,13 +1341,13 @@ class Drag(metaclass=_PulseType):
.. math::
\\begin{align*}
\\begin{aligned}
g(x) &= \\exp\\Bigl(-\\frac12 \\frac{(x - \\text{duration}/2)^2}{\\text{sigma}^2}\\Bigr)\\\\
g'(x) &= \\text{A}\\times\\frac{g(x)-g(-1)}{1-g(-1)}\\\\
f(x) &= g'(x) \\times \\Bigl(1 + 1j \\times \\text{beta} \\times\
\\Bigl(-\\frac{x - \\text{duration}/2}{\\text{sigma}^2}\\Bigr) \\Bigr),
\\quad 0 \\le x < \\text{duration}
\\end{align*}
\\end{aligned}
where :math:`g(x)` is a standard unlifted Gaussian waveform, :math:`g'(x)` is the lifted
:class:`~qiskit.pulse.library.Gaussian` waveform, and
Expand Down
4 changes: 2 additions & 2 deletions qiskit/quantum_info/operators/measures.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ def average_gate_fidelity(
The average gate fidelity :math:`F_{\text{ave}}` is given by
.. math::
\begin{align*}
\begin{aligned}
F_{\text{ave}}(\mathcal{E}, U)
&= \int d\psi \langle\psi|U^\dagger
\mathcal{E}(|\psi\rangle\!\langle\psi|)U|\psi\rangle \\
&= \frac{d F_{\text{pro}}(\mathcal{E}, U) + 1}{d + 1}
\end{align*}
\end{aligned}
where :math:`F_{\text{pro}}(\mathcal{E}, U)` is the
:meth:`~qiskit.quantum_info.process_fidelity` of the input quantum
Expand Down
4 changes: 2 additions & 2 deletions qiskit/quantum_info/operators/symplectic/pauli.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ class initialization (``Pauli('-iXYZ')``). A ``Pauli`` object can be
.. math::
\begin{align*}
\begin{aligned}
P &= P_{n-1} \otimes ... \otimes P_{0} \\
P_k &= (-i)^{z[k] * x[k]} Z^{z[k]}\cdot X^{x[k]}
\end{align*}
\end{aligned}
where ``z[k] = P.z[k]``, ``x[k] = P.x[k]`` respectively.
Expand Down

0 comments on commit 62b6443

Please sign in to comment.