qrunch.quantum.circuits.hamiltonian_time_evolution.qdrift
The qDRIFT randomized compiler for Hamiltonian time evolution.
Classes
qDRIFT randomized compiler for Hamiltonian time evolution. |
- class QDrift
Bases:
HamiltonianTimeEvolutionqDRIFT randomized compiler for Hamiltonian time evolution.
Approximates \(e^{-iHt}\) by an ensemble of circuits, where each gate is a randomly sampled Hermitian term of the Hamiltonian, sampled with probability proportional to the absolute value of its coefficient.
- __init__(subsequence_length: int, seed: int | None = None) None
Initialize the qDRIFT compiler.
- Parameters:
subsequence_length (int) – The length of the subsequences used in the qDRIFT compilation.
seed (int | None) – Optional seed for the random term sampling.
- Return type:
None
- get_circuit(hamiltonian: SecondQuantizedHamiltonian, time: float) Circuit
Build a qDRIFT circuit approximating the time evolution of the given Hamiltonian.
- Parameters:
hamiltonian (SecondQuantizedHamiltonian) – The second-quantized Hamiltonian to time-evolve.
time (float) – The evolution time.
- Return type: