|View source on GitHub|
Trotterize a Qubit hamiltonian and write it to QASM format.
openfermion.circuits.trotterize_exp_qubop_to_qasm( hamiltonian, evolution_time=1, trotter_number=1, trotter_order=1, term_ordering=None, k_exp=1.0, qubit_list=None, ancilla=None )
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|
||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|
||(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|