HamiltonianSimulation¶
Overview¶
Detailed Documentation¶
Global Functions¶
Simulating z-only term like H=coef * (Z0..Zn-1) U=exp(-iHt)
Z-Hamiltonian spreads over the qubit_vec
Parameters:
std::vector<Qubit*>& |
the qubit needed to simulate the Hamiltonian |
double |
the coefficient of hamiltonian |
double |
time |
Returns:
Simulate a single term of Hamilonian like “X0 Y1 Z2” with coefficient and time. U=exp(-it*coef*H)
Parameters:
std::vector<Qubit*>& |
the qubit needed to simulate the Hamiltonian |
QTerm& |
hamiltonian_term: string like “X0 Y1 Z2” |
double |
coef: the coefficient of hamiltonian |
double |
t time |
Returns:
Simulate a general case of hamiltonian by Trotter-Suzuki approximation. U=exp(-iHt)=(exp(-i H1 t/n)*exp(-i H2 t/n))^n.
Parameters:
std::vector<Qubit*>& |
qubit_vec: the qubit needed to simulate the Hamiltonian |
QHamiltonian& |
hamiltonian: Hamiltonian |
double |
t: time |
size_t |
slices: the approximate slices |
Returns:
Simulate hamiltonian consists of pauli-Z operators.
Parameters:
std::vector<Qubit*>& |
qubit_vec: the qubit needed to simulate the Hamiltonian |
QHamiltonian& |
hamiltonian: Hamiltonian |
double |
t: time |
Returns:
Apply single gates to all qubits in qubit_list.
Parameters:
std::string& |
gate: single gate name. |
std::vector<Qubit*>& |
qubit_vec: qubit vector |
Returns:
Apply single gates to all qubits in qubit_list and insert into circuit.
Parameters:
std::string& |
gate: single gate name. |
std::vector<Qubit*>& |
qubit_vec: qubit vector |
QCircuit& |
circuit: operated circuit. |
Returns:
Ising model.
Parameters:
std::vector<Qubit*>& |
qubit_vec: qubit vector |
QGraph& |
graph: the problem graph |
vector_d& |
gamma: model para |
Returns:
pauli X model
Parameters:
std::vector<Qubit*>& |
qubit_vec: qubit vector |
vector_d& |
beta: model para |
Returns: