Documentation
¶
Overview ¶
Package vqd implements the Variational Quantum Deflation algorithm.
VQD finds multiple eigenvalues of a Hamiltonian by sequentially optimizing excited states. For each state k, it minimizes E(theta) + beta * sum_{j<k} |<psi_j|psi_k>|^2, where the overlap penalty deflates previously found eigenstates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Hamiltonian is the observable whose eigenvalues are sought.
Hamiltonian pauli.PauliSum
// Ansatz is the parameterized circuit template.
Ansatz ansatz.Ansatz
// Optimizer is the classical optimization method.
Optimizer optim.Optimizer
// Gradient is the gradient function. Nil means gradient-free.
Gradient optim.GradientFunc
// InitialParams are the starting parameters. Nil means zeros.
InitialParams []float64
// NumStates is the number of eigenstates to find. Default: 2.
NumStates int
// BetaPenalty is the overlap penalty weight. Zero means auto (2*|E_0|).
BetaPenalty float64
}
Config specifies the VQD problem and solver.
type Result ¶
type Result struct {
// Energies are the eigenvalues found, one per state.
Energies []float64
// OptimalParams are the optimal parameters for each state.
OptimalParams [][]float64
// NumIters is the number of optimizer iterations for each state.
NumIters []int
// Converged indicates whether the optimizer converged for each state.
Converged []bool
}
Result holds VQD output.
Click to show internal directories.
Click to hide internal directories.