Skip to content

Commit

Permalink
fix fswap docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
haimeng-zhang committed Jul 25, 2024
1 parent 36b209f commit bc7c2e7
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions python/ffsim/gates/basic_gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,18 @@ def apply_fswap_gate(
*,
copy: bool = True,
) -> np.adarray:
r"""Apply a fSWAP gate
r"""Apply a fSWAP gate that swaps target orbitals.
.. math::
An fSwap gate is defined as
.. math::
f_\text{swap}(p, q) =
1 + a^\dagger_p a_q + a^\dagger_q a_p - a_p^\dagger a_p - a_q^\dagger a_q
Under the Jordan-Wigner transform, this gate has the following matrix when applied
to neighboring qubits:
.. math::
\begin{pmatrix}
1 & 0 & 0 & 0 \\
Expand Down

0 comments on commit bc7c2e7

Please sign in to comment.