Trotter-decomposes operators into groups without exponentiating.
openfermion.circuits.trotter_operator_grouping(
hamiltonian, trotter_number=1, trotter_order=1, term_ordering=None, k_exp=1.0
)
Operators are still Hermitian at the end of this method but have been
multiplied by k_exp.
Note:
The default term_ordering is simply the ordered keys of
the QubitOperators.terms dict.
Args |
hamiltonian (QubitOperator): full hamiltonian
trotter_number (int): optional number of trotter steps -
default is 1
trotter_order (int): optional order of trotterization as
an integer from 1-3 - default is 1
term_ordering (list of (tuples of tuples)): optional list
of QubitOperator terms dictionary keys that specifies
order of terms when trotterizing
k_exp (float): optional exponential factor
to all terms when trotterizing
|
Yields |
QubitOperator generator
|
Raises |
ValueError if order > 3 or order <= 0,
TypeError for incorrect types
|