openfermion.circuits.trotterize_exp_qubop_to_qasm
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.
Args |
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
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]