openfermion.circuits.trotterize_exp_qubop_to_qasm

Trotterize a Qubit hamiltonian and write it to QASM format.

Assumes input hamiltonian is still hermitian and -1.0j has not yet been applied. Therefore, signs of coefficients should reflect this. Returns a generator which generates a QASM file.

hamiltonian QubitOperator

hamiltonian

trotter_number int

optional number of trotter steps (slices) for trotterization as an integer - default = 1

trotter_order optional order of trotterization as an integer - default = 1
term_ordering list of (tuples of tuples

list of tuples (QubitOperator terms dictionary keys) that specifies order of terms when trotterizing

qubit_list (list/tuple or None)Specifies the labels for the qubits to be output in qasm. If a list/tuple, must have length greater than or equal to the number of qubits in the QubitOperator. Entries in the list must be castable to string. If None, qubits are labeled by index (i.e. an integer).
k_exp float

optional exponential factor to all terms when trotterizing

Yields string generator