cutqc2.library.Dynamics package¶
Submodules¶
cutqc2.library.Dynamics.quantum_dynamics module¶
- class cutqc2.library.Dynamics.quantum_dynamics.Dynamics(H, barriers=False, measure=False, regname=None)[source]¶
Bases:
objectClass to implement the simulation of quantum dynamics as described in Section 4.7 of Nielsen & Chuang (Quantum computation and quantum information (10th anniv. version), 2010.)
A circuit implementing the quantum simulation can be generated for a given problem Hamiltonian parameterized by calling the gen_circuit() method.
- H¶
The given Hamiltonian whose dynamics we want to simulate
- Type:
??
- barriers¶
should barriers be included in the generated circuit
- Type:
bool
- measure¶
should a ClassicalRegister and measurements be added to the circuit
- Type:
bool
- regname¶
optional string to name the quantum and classical registers. This allows for the easy concatenation of multiple QuantumCircuits.
- Type:
str
- qr¶
Qiskit QuantumRegister holding all of the quantum bits
- Type:
QuantumRegister
- circ¶
Qiskit QuantumCircuit that represents the uccsd circuit
- Type:
QuantumCircuit
- compute_to_Z_basis(pauli_str)[source]¶
Take the given pauli_str of the form ABCD and apply operations to the circuit which will take it from the ABCD basis to the ZZZZ basis
- Parameters:
pauli_str (str) – string of the form ‘p1p2p3…pN’ where pK is a Pauli matrix
- gen_circuit()[source]¶
Create a circuit implementing the quantum dynamics simulation
- Returns:
QuantumCircuit object of size nq with no ClassicalRegister and no measurements
- Return type:
QuantumCircuit