qrunch.chemistry.ground_state_problem.calculators.calculators_protocols

Protocol class for the ground state calculators.

Classes

AdaptiveVqeGroundStateProblemCalculatorResult

Result dataclass returned by the ground state calculators that uses an adaptive VQE-style algorithm.

BeastVqeGroundStateProblemCalculatorResult

Result dataclass returned by the ground state calculators that uses an adaptive VQE-style algorithm.

GroundStateProblemCalculatorResult

Result dataclass returned by the ground state calculators.

class AdaptiveVqeGroundStateProblemCalculatorResult

Bases: GroundStateProblemCalculatorResult

Result dataclass returned by the ground state calculators that uses an adaptive VQE-style algorithm.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • initial_active_electrons_energy – Initial energy of the active electrons. Usually this would mean the uncorrelated energy (Hartree-Fock). This does not include nuclear repulsion or the energy of frozen electrons from, e.g., active space or projective embedding.

  • active_electrons_energy_per_macro_iteration – Energy of the active electrons for every macro iteration. This does not include nuclear repulsion or the energy of frozen electrons from complete active space or projective embedding. A macro iteration is one in which the circuit length is changed.

  • non_active_electrons_energy – Energy of the non-active electrons. This is the energy of all non-active electrons from, e.g., active space or projective embedding.

  • nuclear_repulsion – Nuclear repulsion energy.

  • second_order_correction – Second-order energy correction.

  • uncorrected_active_electrons_energy – The uncorrected energy of the active electrons.

  • circuit_parameters – Optimal parameters that minimizes the expectation value of the circuit.

  • unspecified_circuit – The unspecified circuit.

__init__(initial_active_electrons_energy: float, non_active_electrons_energy: float, nuclear_repulsion: float, second_order_correction: ExpectationValue, uncorrected_active_electrons_energy: ExpectationValue, active_electrons_energy_per_macro_iteration: ListOfExpectationValues, circuit_parameters: dict[Parameter, float], unspecified_circuit: Circuit) None
Parameters:
Return type:

None

property active_electrons_energy: ExpectationValue

Energy of the active electrons.

This does not include nuclear repulsion or the energy of frozen electrons from, e.g., active space or projective embedding.

It may also include a second-order correction, if applicable.

active_electrons_energy_per_macro_iteration: ListOfExpectationValues
circuit_parameters: dict[Parameter, float]
property electronic_energy: ExpectationValue

Energy of all electrons.

This is the total energy minus nuclear repulsion.

property electronic_energy_per_macro_iteration: ListOfExpectationValues

Energy of all electrons for every iteration.

This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed. Return None when no circuit is used e.g., classical calculation such as FCI, or the calculator is a non-iterative calculator.

property electronic_energy_per_macro_iteration_with_final_energy: ListOfExpectationValues

Energy of all electrons for every iteration, including the final energy as the last entry.

The final energy is included as the last element in the list, and may include potential reminimization energy and corrections.

This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed.

property electronic_energy_per_macro_iteration_with_initial_energy: ListOfExpectationValues

Energy of all electrons for every iteration, starting with the initial energy as the first entry.

This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed

property electronic_energy_per_macro_iteration_with_initial_energy_and_final_energy: ListOfExpectationValues

Energy of all electrons for every iteration.

It starts with the initial energy, and include the final energy as the last entry. This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed.

property final_circuit: Circuit

Circuit ansatz with the optimal parameters.

initial_active_electrons_energy: float
property initial_electronic_energy: ExpectationValue

Initial electronic energy of all electrons and nuclear repulsion.

property initial_total_energy: ExpectationValue

Initial total energy of all electrons and nuclear repulsion.

non_active_electrons_energy: float
nuclear_repulsion: float
second_order_correction: ExpectationValue
property total_energy: ExpectationValue

Total energy of all electrons and nuclear repulsion.

property total_energy_per_macro_iteration: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

A macro iteration is one in which the circuit length is changed.

property total_energy_per_macro_iteration_with_final_energy: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

It include thefinal energy as the last entry. A macro iteration is one in which the circuit length is changed.

property total_energy_per_macro_iteration_with_initial_energy: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

It starts with the initial energy as the first entry. A macro iteration is one in which the circuit length is changed.

property total_energy_per_macro_iteration_with_initial_energy_and_final_energy: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

It starts with the initial energy, and include the final energy as the last entry. A macro iteration is one in which the circuit length is changed.

uncorrected_active_electrons_energy: ExpectationValue
unspecified_circuit: Circuit
class BeastVqeGroundStateProblemCalculatorResult

Bases: AdaptiveVqeGroundStateProblemCalculatorResult

Result dataclass returned by the ground state calculators that uses an adaptive VQE-style algorithm.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • initial_active_electrons_energy – Initial energy of the active electrons. Usually this would mean the uncorrelated energy (Hartree-Fock). This does not include nuclear repulsion or the energy of frozen electrons from, e.g., active space or projective embedding.

  • active_electrons_energy_per_macro_iteration – Energy of the active electrons for every macro iteration. This does not include nuclear repulsion or the energy of frozen electrons from complete active space or projective embedding. A macro iteration is one in which the circuit length is changed.

  • non_active_electrons_energy – Energy of the non-active electrons. This is the energy of all non-active electrons from, e.g., active space or projective embedding.

  • nuclear_repulsion – Nuclear repulsion energy.

  • second_order_correction – Second-order energy correction.

  • uncorrected_active_electrons_energy – The uncorrected energy of the active electrons.

  • circuit_parameters – Optimal parameters that minimizes the expectation value of the circuit.

  • unspecified_circuit – The unspecified circuit.

  • final_operator – The final operator after the BEAST procedure.

__init__(initial_active_electrons_energy: float, non_active_electrons_energy: float, nuclear_repulsion: float, second_order_correction: ExpectationValue, uncorrected_active_electrons_energy: ExpectationValue, active_electrons_energy_per_macro_iteration: ListOfExpectationValues, circuit_parameters: dict[Parameter, float], unspecified_circuit: Circuit, final_operator: ChemistryPairedHardcoreBosonHermitianSum) None
Parameters:
  • initial_active_electrons_energy (float)

  • non_active_electrons_energy (float)

  • nuclear_repulsion (float)

  • second_order_correction (ExpectationValue)

  • uncorrected_active_electrons_energy (ExpectationValue)

  • active_electrons_energy_per_macro_iteration (ListOfExpectationValues)

  • circuit_parameters (dict[Parameter, float])

  • unspecified_circuit (Circuit)

  • final_operator (ChemistryPairedHardcoreBosonHermitianSum)

Return type:

None

property active_electrons_energy: ExpectationValue

Energy of the active electrons.

This does not include nuclear repulsion or the energy of frozen electrons from, e.g., active space or projective embedding.

It may also include a second-order correction, if applicable.

active_electrons_energy_per_macro_iteration: ListOfExpectationValues
circuit_parameters: dict[Parameter, float]
property electronic_energy: ExpectationValue

Energy of all electrons.

This is the total energy minus nuclear repulsion.

property electronic_energy_per_macro_iteration: ListOfExpectationValues

Energy of all electrons for every iteration.

This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed. Return None when no circuit is used e.g., classical calculation such as FCI, or the calculator is a non-iterative calculator.

property electronic_energy_per_macro_iteration_with_final_energy: ListOfExpectationValues

Energy of all electrons for every iteration, including the final energy as the last entry.

The final energy is included as the last element in the list, and may include potential reminimization energy and corrections.

This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed.

property electronic_energy_per_macro_iteration_with_initial_energy: ListOfExpectationValues

Energy of all electrons for every iteration, starting with the initial energy as the first entry.

This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed

property electronic_energy_per_macro_iteration_with_initial_energy_and_final_energy: ListOfExpectationValues

Energy of all electrons for every iteration.

It starts with the initial energy, and include the final energy as the last entry. This is the total energy minus nuclear repulsion. A macro iteration is one in which the circuit length is changed.

property final_circuit: Circuit

Circuit ansatz with the optimal parameters.

final_operator: ChemistryPairedHardcoreBosonHermitianSum
initial_active_electrons_energy: float
property initial_electronic_energy: ExpectationValue

Initial electronic energy of all electrons and nuclear repulsion.

property initial_total_energy: ExpectationValue

Initial total energy of all electrons and nuclear repulsion.

non_active_electrons_energy: float
nuclear_repulsion: float
second_order_correction: ExpectationValue
property total_energy: ExpectationValue

Total energy of all electrons and nuclear repulsion.

property total_energy_per_macro_iteration: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

A macro iteration is one in which the circuit length is changed.

property total_energy_per_macro_iteration_with_final_energy: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

It include thefinal energy as the last entry. A macro iteration is one in which the circuit length is changed.

property total_energy_per_macro_iteration_with_initial_energy: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

It starts with the initial energy as the first entry. A macro iteration is one in which the circuit length is changed.

property total_energy_per_macro_iteration_with_initial_energy_and_final_energy: ListOfExpectationValues

Total energy of all electrons and nuclear repulsion for every iteration.

It starts with the initial energy, and include the final energy as the last entry. A macro iteration is one in which the circuit length is changed.

uncorrected_active_electrons_energy: ExpectationValue
unspecified_circuit: Circuit
class GroundStateProblemCalculatorResult

Bases: object

Result dataclass returned by the ground state calculators.

All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • initial_active_electrons_energy – Initial energy of the active electrons. Usually this would mean the uncorrelated energy (Hartree-Fock). This does not include nuclear repulsion or the energy of frozen electrons from, e.g., active space or projective embedding.

  • non_active_electrons_energy – Energy of the non-active electrons. This is the energy of all non-active electrons from, e.g., active space or projective embedding.

  • nuclear_repulsion – Nuclear repulsion energy.

  • second_order_correction – Second-order energy correction.

  • uncorrected_active_electrons_energy – The uncorrected energy of the active electrons.

__init__(initial_active_electrons_energy: float, non_active_electrons_energy: float, nuclear_repulsion: float, second_order_correction: ExpectationValue, uncorrected_active_electrons_energy: ExpectationValue) None
Parameters:
  • initial_active_electrons_energy (float)

  • non_active_electrons_energy (float)

  • nuclear_repulsion (float)

  • second_order_correction (ExpectationValue)

  • uncorrected_active_electrons_energy (ExpectationValue)

Return type:

None

property active_electrons_energy: ExpectationValue

Energy of the active electrons.

This does not include nuclear repulsion or the energy of frozen electrons from, e.g., active space or projective embedding.

It may also include a second-order correction, if applicable.

property electronic_energy: ExpectationValue

Energy of all electrons.

This is the total energy minus nuclear repulsion.

initial_active_electrons_energy: float
property initial_electronic_energy: ExpectationValue

Initial electronic energy of all electrons and nuclear repulsion.

property initial_total_energy: ExpectationValue

Initial total energy of all electrons and nuclear repulsion.

non_active_electrons_energy: float
nuclear_repulsion: float
second_order_correction: ExpectationValue
property total_energy: ExpectationValue

Total energy of all electrons and nuclear repulsion.

uncorrected_active_electrons_energy: ExpectationValue