qrunch.chemistry.calculators.cross_space_orbital_optimizer_calculator

Alternate active-space VQE solves with cross-space orbital optimization.

Classes

CrossSpaceOrbitalOptimizerCalculator

Optimize orbital space around a correlated active-space VQE.

CrossSpaceOrbitalOptimizerCalculatorOptions

Options for cross-space orbital optimization.

class CrossSpaceOrbitalOptimizerCalculator

Bases: object

Optimize orbital space around a correlated active-space VQE.

__init__(adaptive_calculator: AdaptiveVqeGroundStateCalculator, rdm_calculator: ReducedDensityMatrixCalculatorWrapper, number_of_active_correlated_spatial_orbitals: int, number_of_active_correlated_alpha_electrons: int, *, options: CrossSpaceOrbitalOptimizerCalculatorOptions | None = None, stopping_criterion: StoppingCriterion | None = None) → None

Initialize the Cross Space Orbital Optimizer Calculator.

This calculator defines two orbital spaces, a correlated active space used with the provided adaptive_calculator and the remaining orbital space defined in the problem.

The calculator optimize the full orbital space of the problem, but only applies the adaptive_calculator, to the correlated active space. The orbital optimization is performed by orbital rotation between the correlated active space, and the remaining orbital space defined in the problem.

Parameters:
  • adaptive_calculator (AdaptiveVqeGroundStateCalculator) – Calculator used to solve each correlated problem, without its own orbital optimization or paired-electron approximation.

  • rdm_calculator (ReducedDensityMatrixCalculatorWrapper) – RDM calculator compatible with the VQE’s circuit encoding.

  • number_of_active_correlated_spatial_orbitals (int) – The number of spatial orbitals that should be directly correlated.

  • number_of_active_correlated_alpha_electrons (int) – The number of alpha electrons in the correlated active space.

  • options (CrossSpaceOrbitalOptimizerCalculatorOptions | None) – Convergence settings. None results in default options.

  • stopping_criterion (StoppingCriterion | None) – Optional criterion applied to the active-space total energy after each solve. If None, convergence is determined by the default Patience stopping criterion.

Return type:

None

calculate(problem: RestrictedGroundStateProblem | LazyRestrictedGroundStateProblem | UnrestrictedGroundStateProblem | LazyUnrestrictedGroundStateProblem, callback: AdaptiveIterationCallback | None = None) → AdaptiveVqeGroundStateProblemCalculatorResult

Optimize orbital space around a correlated active-space VQE calculation.

The returned circuit and energy refer to the final correlated active space. Each orbital step is followed by a fresh VQE solve. The initial total energy refers to the first solve, before orbital rotations.

Parameters:
Return type:

AdaptiveVqeGroundStateProblemCalculatorResult

class CrossSpaceOrbitalOptimizerCalculatorOptions

Bases: DataclassPublicAPI

Options for cross-space orbital optimization.

Parameters:

max_iterations – Maximum number of active-space solves.

__init__(*, max_iterations: int = 20) → None
Parameters:

max_iterations (int)

Return type:

None

max_iterations: int = 20