QuantumGradientGenerators API

Index

Reference

QuantumGradientGenerators.GradGeneratorType

Extended generator for the standard dynamic gradient.

G̃ = GradGenerator(G)

contains the original time-dependent generator G (a Hamiltonian or Liouvillian) in G̃.G, a vector of control derivatives $∂G/∂ϵₗ(t)$ in G̃.control_derivs, and the controls in G̃.controls.

For a generator $G = Ĥ(t) = Ĥ₀ + ϵ₁(t) Ĥ₁ + … + ϵₙ(t) Ĥₙ$, this extended generator encodes the block-matrix

\[G̃ = \begin{pmatrix} Ĥ(t) & 0 & \dots & 0 & Ĥ₁ \\ 0 & Ĥ(t) & \dots & 0 & Ĥ₂ \\ \vdots & & \ddots & & \vdots \\ 0 & 0 & \dots & Ĥ(t) & Ĥₙ \\ 0 & 0 & \dots & 0 & Ĥ(t) \end{pmatrix}\]

Note that the $∂G/∂ϵₗ(t)$ ($Ĥₗ$ in the above example) may be time-dependent, to account for the possibility of non-linear control terms.

source
QuantumGradientGenerators.GradVectorType

Extended state-vector for the dynamic gradient.

Ψ̃ = GradVector(Ψ, num_controls)

for an initial state Ψ and num_controls control fields.

The GradVector conceptually corresponds to a direct-sum (block) column-vector $Ψ̃ = (|Ψ̃₁⟩, |Ψ̃₂⟩, … |Ψ̃ₙ⟩, |Ψ⟩)^T$, where $n$ is num_controls. With a matching $G̃$ as in the documentation of GradGenerator, we have

\[G̃ Ψ̃ = \begin{pmatrix} Ĥ |Ψ̃₁⟩ + Ĥ₁|Ψ⟩ \\ \vdots \\ Ĥ |Ψ̃ₙ⟩ + Ĥₙ|Ψ⟩ \\ Ĥ |Ψ⟩ \end{pmatrix}\]

and

\[e^{-i G̃ dt} \begin{pmatrix} 0 \\ \vdots \\ 0 \\ |Ψ⟩ \end{pmatrix} = \begin{pmatrix} \frac{∂}{∂ϵ₁} e^{-i Ĥ dt} |Ψ⟩ \\ \vdots \\ \frac{∂}{∂ϵₙ} e^{-i Ĥ dt} |Ψ⟩ \\ e^{-i Ĥ dt} |Ψ⟩ \end{pmatrix}.\]

source
QuantumGradientGenerators.GradgenOperatorType

Static generator for the dynamic gradient.

using QuantumPropagators.Controls: evaluate

G::GradgenOperator = evaluate(gradgen::GradGenerator; vals_dict)

is the result of plugging in specific values for all controls in a GradGenerator.

The resulting object can be multiplied directly with a GradVector, e.g., in the process of evaluating a piecewise-constant time propagation.

source
QuantumGradientGenerators.resetgradvec!Method

Reset the given gradient vector for a new gradient evaluation.

resetgradvec!(Ψ̃::GradVector)

zeroes out Ψ̃.grad_states but leaves Ψ̃.state unaffected.

resetgradvec!(Ψ̃::GradVector, Ψ)

additionally sets Ψ̃.state to Ψ.

source