![]() |
The Quantum Exact Simulation Toolkit v4.2.0
|
Functions for approximate dynamical simulation. More...
Functions | |
void | applyTrotterizedImaginaryTimeEvolution (Qureg qureg, PauliStrSum hamil, qreal tau, int order, int reps) |
void | applyTrotterizedNoisyTimeEvolution (Qureg qureg, PauliStrSum hamil, qreal *damps, PauliStrSum *jumps, int numJumps, qreal time, int order, int reps) |
void | applyTrotterizedUnitaryTimeEvolution (Qureg qureg, PauliStrSum hamil, qreal time, int order, int reps) |
Functions for approximate dynamical simulation.
void applyTrotterizedImaginaryTimeEvolution | ( | Qureg | qureg, |
PauliStrSum | hamil, | ||
qreal | tau, | ||
int | order, | ||
int | reps ) |
Simulates imaginary-time evolution of qureg
for the duration tau
under the time-independent Hamiltonian hamil
, as approximated by symmetrized Trotterisation of the specified order
and number of cycles reps
.
Let \( \hat{H} = \) hamil
and \( \tau = \) tau
\( \in \mathbb{R} \). This function approximates the action of the non-unitary imaginary-time propagator
\[ \hat{V}(\tau) = \exp \left(- \tau \, \hat{H} \right), \]
as prescribed by Wick rotating (substituting time \( t \) for \( t \rightarrow -\iu \tau \)) the time-independent Schrödinger equation. When qureg
is a statevector \( \svpsi \), the resulting state approximates
\[ \approx V(\tau) \svpsi \]
while when qureg
is a density matrix \( \dmrho \), the result approximates
\[ \approx V(\tau) \, \dmrho \, V(\tau)^\dagger. \]
See applyTrotterizedPauliStrSumGadget() for information about the Trotter method.
Imaginary-time evolution drives the system toward the (unnormalised) groundstate of the Hamiltonian. Let \( \{ \ket{\phi_i} \} \) and \( \{ \ket{\lambda_i} \} \) be the eigenstates and respective eigenvalues of \( \hat{H} \), which are real due to Hermiticity.
\[ \hat{H} = \sum \limits_i \lambda_i \ket{\phi_i}\bra{\phi_i}, \;\;\;\;\; \lambda_i \in \mathbb{R}. \]
qureg
is a statevector \( \svpsi \) and can ergo be expressed in the basis of \( \{ \ket{\phi_i} \} \) as \( \svpsi = \sum_i \alpha_i \ket{\phi_i} \), this function approximates \[ \svpsi \, \rightarrow \, \hat{V}(\tau) \svpsi = \sum\limits_i \alpha_i \exp(- \tau \, \lambda_i) \ket{\phi_i}. \]
qureg
is a density matrix and is ergo expressible as \( \dmrho = \sum\limits_{ij} \alpha_{ij} \ket{\phi_i}\bra{\phi_j} \), this function effects \[ \dmrho \, \rightarrow \, \hat{V}(\tau) \dmrho \hat{V}(\tau)^\dagger = \sum\limits_{ij} \alpha_{ij} \exp(-\tau (\lambda_i + \lambda_j)) \ket{\phi_i}\bra{\phi_j}. \]
As \( \tau \rightarrow \infty \), the resulting unnormalised state approaches statevector \( \svpsi \rightarrow \alpha_0 \exp(-\tau \lambda_0) \ket{\phi_0} \) or density matrix \( \dmrho \rightarrow \alpha_{0,0} \exp(-2 \tau \lambda_0) \ket{\phi_0}\bra{\phi_0} \), where \( \lambda_0 \) is the minimum eigenvalue and \( \ket{\phi_0} \) is the groundstate. Assuming the initial overlap \( \alpha_0 \) is not zero (or exponentially tiny), subsequent renormalisation via setQuregToRenormalized() produces the pure ground-state \( \ket{\phi_0} \) or \( \ket{\phi_0}\bra{\phi_0} \).
Note degenerate minimum eigenvalues will yield a pure superposition of the corresponding eigenstates, with coefficients informed by the initial, relative populations.
hamil
is still assumed, requiring it contains only real coefficients. Validation will check that hamil
is approximately Hermitian, permitting coefficients with imaginary components smaller (in magnitude) than epsilon. \[ \max\limits_{i} |c_i| \le \valeps \]
where the validation epsilon \( \valeps \) can be adjusted with setValidationEpsilon(). Beware however that imaginary-time evolution under a non-Hermitian Hamiltonian will not necessarily approach the lowest lying eigenstate (the eigenvalues may be non-real) so is likely of limited utility.tau
parameter is necessarily real such that evolution approaches the groundstate (modulo renormalisation). It can generalised to an arbitrary complex number through direct use of applyTrotterizedNonUnitaryPauliStrSumGadget().reps
\( \rightarrow \infty \) or all terms in hamil
commute with one another.[in,out] | qureg | the state to modify. |
[in] | hamil | the Hamiltonian as a a weighted sum of Pauli strings. |
[in] | tau | the duration over which to simulate imaginary-time evolution. |
[in] | order | the order of the Trotter-Suzuki decomposition (e.g. 1 , 2 , 4 , ...). |
[in] | reps | the number of Trotter repetitions. |
error |
|
Definition at line 241 of file trotterisation.cpp.
void applyTrotterizedNoisyTimeEvolution | ( | Qureg | qureg, |
PauliStrSum | hamil, | ||
qreal * | damps, | ||
PauliStrSum * | jumps, | ||
int | numJumps, | ||
qreal | time, | ||
int | order, | ||
int | reps ) |
Simulates open dynamics of qureg
as per the Lindblad master equation, under the time-independent Hamiltonian hamil
and jump operators jumps
with corresponding damping rates damps
, with evolution approximated by symmetrized Trotterisation of the specified order
and number of cycles reps
.
Let \( \rho = \) qureg
, \( \hat{H} = \) hamil
, \( t = \) time
, and denote the \( i \)-th element of damps
and jumps
as \( \gamma_i \) and \( \hat{J}_i \) respectively. The Lindblad master equation prescribes that \( \rho \) time-evolves according to
\[ \frac{\mathrm{d}}{\mathrm{d}t} \rho = -\iu [\hat{H}, \rho] + \sum\limits_i \gamma_i \left( \hat{J}_i \rho \hat{J}_i^\dagger - \frac{1}{2} \left\{ \hat{J}_i^\dagger \hat{J}_i, \rho \right\} \right). \]
This function works by building a superoperator of the right-hand-side which acts upon the space of linearised \(\rho\),
\[ \boldsymbol{L} = -\iu \left( \hat{\id} \otimes \hat{H} - \hat{H}^* \otimes \hat{\id} \right) + \sum\limits_i \gamma_i \left( \hat{J}_i^* \otimes \hat{J}_i - \frac{1}{2} \hat{\id} \otimes (\hat{J}^\dagger J_i) - \frac{1}{2} (\hat{J}^\dagger J_i)^* \otimes \hat{\id} \right), \]
as a non-Hermitian weighted sum of Pauli strings (a PauliStrSum). The superoperator \( \boldsymbol{L} \) informs a superpropagator which exactly solves evolution as:
\[ \ket{\rho(t)} = \exp\left( t \boldsymbol{L} \right) \ket{\rho(0)}. \]
This function approximates the superpropagator \( \exp\left( t \boldsymbol{L} \right) \) using a higher-order symmetrized Suzuki-Trotter decomposition, as informed by parameters order
and reps
.
See applyTrotterizedPauliStrSumGadget() for information about the Trotter method.
This function simulates time evolution of an open system, where the jump operators model interactions with the environment. This can capture sophisticated decoherence processes of the quantum state which are untenable to model as discrete operations with functions like mixKrausMap(). This function also proves useful for preparing realistic, physical input states to quantum metrological circuits, or the general high-performance simulation of digital time evolution of condensed matter systems.
numJumps = 0
, evolution is unitary and the Lindblad master equation simplifes to the Liouville–von Neumann equation, which is equivalently (and more efficiently) simulated via applyTrotterizedUnitaryTimeEvolution().damps
is expected to be a zero or positive number, in order for evolution to be trace preserving. Validation will assert that each damping rate \( \gamma_i \) satisfies \[ \min\limits_{i} \gamma_i \ge - \valeps \]
where the validation epsilon \( \valeps \) can be adjusted with setValidationEpsilon(). Non-trace-preserving, negative damping rates can be simulated by disabling numerical validation viasetValidationEpsilon(0)
.time
parameter is necessarily real, and cannot be generalised to imaginary or complex like in other functions. Generalisation is trivially numerically possible, but has no established physical meaning and so is not exposed in the API. Please open an issue on Github for advice on complex-time simulation.reps
\( \rightarrow \infty \) or all terms in the superoperator \( \boldsymbol{L} \) incidentally commute with one another, and otherwise incorporates Trotter error. Unlike for unitary evolution, Trotter error does break normalisation of the state and so this function is generally non-trace-preserving. In theory, normalisation can be restored with setQuregToRenormalized() though noticable norm-breaking indicates evolution was inaccurate, and should instead be repeated with increased order
or reps
parameters.hamil
, plus quadratically with the number in each jump operator. These overheads may prove prohibitively costly for PauliStrSum containing very many terms.[in,out] | qureg | the density-matrix state to evolve and modify. |
[in] | hamil | the Hamiltonian of the qubit system (excludes any environment). |
[in] | damps | the damping rates of each jump operator in jumps . |
[in] | jumps | the jump operators specified as PauliStrSum. |
[in] | numJumps | the length of list jumps (and damps ). |
[in] | time | the duration through which to evolve the state. |
[in] | order | the order of the Trotter-Suzuki decomposition (e.g. 1 , 2 , 4 , ...). |
[in] | reps | the number of Trotter repetitions. |
error |
|
Definition at line 264 of file trotterisation.cpp.
void applyTrotterizedUnitaryTimeEvolution | ( | Qureg | qureg, |
PauliStrSum | hamil, | ||
qreal | time, | ||
int | order, | ||
int | reps ) |
Unitarily time evolves qureg
for the duration time
under the time-independent Hamiltonian hamil
, as approximated by symmetrized Trotterisation of the specified order
and number of cycles reps
.
Let \( \hat{H} = \) hamil
and \( t = \) time
\( \in \mathbb{R} \). This function approximates the action of the unitary-time evolution operator/propagator
\[ \hat{U}(t) = \exp \left(- \iu \, t \, \hat{H} \right), \]
as solves the time-independent Schrödinger equation. When qureg
is a statevector \( \svpsi \), the resulting state approximates
\[ \approx U(t) \svpsi \]
while when qureg
is a density matrix \( \dmrho \), the result approximates
\[ \approx U(t) \, \dmrho \, U(t)^\dagger. \]
See applyTrotterizedPauliStrSumGadget() for information about the Trotter method.
hamil
is Hermitian and ergo contains only real coefficients. Validation will check that hamil
is approximately Hermitian, permitting coefficients with imaginary components smaller (in magnitude) than epsilon. \[ \max\limits_{i} |c_i| \le \valeps \]
where the validation epsilon \( \valeps \) can be adjusted with setValidationEpsilon(). The imaginary components of the Hamiltonian are considered during simulation.time
parameter is necessarily real to retain unitarity. It can be substituted for a strictly imaginary scalar to perform imaginary-time evolution (as per Wick rotation \( t \rightarrow - \iu \tau \)) via applyTrotterizedImaginaryTimeEvolution(), or generalised to an arbitrary complex number through direct use of applyTrotterizedNonUnitaryPauliStrSumGadget().hamil
. Open or otherwise noisy system dynamics can be simulated with applyTrotterizedNoisyTimeEvolution().reps
\( \rightarrow \infty \) or all terms in hamil
commute with one another. Conveniently, Trotter error does not break normalisation of the state since the approximating circuit remains unitary.[in,out] | qureg | the state to modify. |
[in] | hamil | the Hamiltonian as a a weighted sum of Pauli strings. |
[in] | time | the duration over which to simulate evolution. |
[in] | order | the order of the Trotter-Suzuki decomposition (e.g. 1 , 2 , 4 , ...). |
[in] | reps | the number of Trotter repetitions. |
error |
|
Definition at line 228 of file trotterisation.cpp.