QuantumGradientGenerators API
Index
QuantumGradientGenerators.GradGeneratorQuantumGradientGenerators.GradVectorQuantumGradientGenerators.GradgenOperatorQuantumGradientGenerators.resetgradvec!
Reference
QuantumGradientGenerators.GradGenerator — TypeExtended 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.
QuantumGradientGenerators.GradVector — TypeExtended 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}.\]
Upon initialization, $|Ψ̃₁⟩…|Ψ̃ₙ⟩$ are zero.
QuantumGradientGenerators.GradgenOperator — TypeStatic 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.
QuantumGradientGenerators.resetgradvec! — MethodReset the given gradient vector for a new gradient evaluation.
resetgradvec!(Ψ̃::GradVector)zeroes out Ψ̃.grad_states but leaves Ψ̃.state unaffected. This is possible whether or not Ψ̃ supports in-place operations (QuantumPropagators.Interfaces.supports_inplace)
resetgradvec!(Ψ̃::GradVector, Ψ)additionally sets Ψ̃.state to Ψ, which requires that Ψ̃.state supports in-place operations.
Returns Ψ̃.