Skip to content

Commit

Permalink
editing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
willjmax committed Sep 18, 2024
1 parent 45842f2 commit 684b878
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pennylane/fermi/fermionic.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@ def to_mat(self, n_orbitals=None, format="dense", buffer_size=None):

def shift_operator(self, initial_position, final_position):
r"""Shifts an operator in the FermiWord from ``initial_position`` to ``final_position`` by applying the fermionic anti-commutation relations.
There are three `anti-commutator relations <https://en.wikipedia.org/wiki/Creation_and_annihilation_operators#Creation_and_annihilation_operators_in_quantum_field_theories>`_:
.. math::
Expand All @@ -351,8 +352,8 @@ def shift_operator(self, initial_position, final_position):
Raises:
TypeError: if ``initial_position`` or ``final_position`` is not an integer
ValueError: if ``initial_position`` or ``final_position`` are outside the range ``[0, len(self) - 1]``
where ``len(self)`` is the number of operators in the FermiWord.
ValueError: if ``initial_position`` or ``final_position`` are outside the range ``[0, len(fermiword) - 1]``
where ``len(fermiword)`` is the number of operators in the FermiWord.
**Example**
Expand Down

0 comments on commit 684b878

Please sign in to comment.