Skip to content

Commit

Permalink
pauli exponentiation renamed in exponentiation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRalli committed Oct 13, 2022
1 parent 3567c94 commit 9cf9765
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions symmer/evolution/exponentiation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from functools import reduce
from symmer.symplectic import PauliwordOp

def _exponentiate(P: PauliwordOp) -> PauliwordOp:
def exponentiate_single_Pop(P: PauliwordOp) -> PauliwordOp:
""" exponentiate a single Pauli term
"""
assert(P.n_terms == 1), 'Can only exponentiate single Pauli terms'
Expand All @@ -21,7 +21,7 @@ def trotter(op:PauliwordOp, trotnum:int=1) -> PauliwordOp:
and increasing trotnum will improve precision.
"""
op_copy = op.copy().multiply_by_constant(1/trotnum)
factors = [_exponentiate(P) for P in op_copy]*trotnum
factors = [exponentiate_single_Pop(P) for P in op_copy]*trotnum
return reduce(lambda x,y:x*y, factors)

def truncated_exponential(op:PauliwordOp, truncate_at:int=10) -> PauliwordOp:
Expand Down

0 comments on commit 9cf9765

Please sign in to comment.