Skip to content

Commit

Permalink
fix doc in fermionic operators for molecule, now spin-orbital is spec…
Browse files Browse the repository at this point in the history
…ified
  • Loading branch information
davibinco committed Mar 26, 2024
1 parent 423c8e7 commit 5f254c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tequila/quantumchemistry/qc_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -647,23 +647,23 @@ def n_electrons(self) -> int:

def make_annihilation_op(self, orbital, coefficient=1.0):
"""
Compute annihilation operator on orbital=orbital in qubit representation
Compute annihilation operator on spin-orbital in qubit representation
"""
assert orbital<=self.n_orbitals*2
aop = openfermion.ops.FermionOperator(f'{orbital}', coefficient)
return self.transformation(aop)

def make_creation_op(self, orbital, coefficient=1.0):
"""
Compute creation operator on orbital=orbital in qubit representation
Compute creation operator on spin-orbital in qubit representation
"""
assert orbital<=self.n_orbitals*2
cop = openfermion.ops.FermionOperator(f'{orbital}^', coefficient)
return self.transformation(cop)

def make_number_op(self, orbital):
"""
Compute number operator on orbital=orbital in qubit representation
Compute number operator on spin-orbital in qubit representation
"""
num_op = self.make_creation_op(orbital) * self.make_annihilation_op(orbital)
return num_op
Expand Down

0 comments on commit 5f254c5

Please sign in to comment.