Skip to content

Commit

Permalink
update FermionOperator docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Oct 25, 2023
1 parent 419440f commit ddd5f4d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/fermion_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,23 @@ impl KeysIterator {
/// A fermionic operator.
///
/// A FermionOperator represents a linear combination of products of fermionic creation
/// and annihilation operators.
/// and annihilation operators. See :doc:`/tutorials/06-fermion-operator`
/// for an explanation of how to use this class.
///
/// Example:
///
/// .. jupyter-execute::
///
/// import ffsim
///
/// op = ffsim.FermionOperator(
/// {
/// (ffsim.cre_a(0), ffsim.des_a(3)): 0.5,
/// (ffsim.cre_a(3), ffsim.des_a(0)): -0.25,
/// (ffsim.cre_b(1), ffsim.des_b(5), ffsim.cre_a(4)): 1 + 1j,
/// }
/// )
/// op
///
/// Args:
/// coeffs (dict[tuple[tuple[bool, bool, int], ...], complex]): The coefficients of the
Expand Down

0 comments on commit ddd5f4d

Please sign in to comment.