qxmt.evaluation.metrics.defaults_vqe module#
- class qxmt.evaluation.metrics.defaults_vqe.CASCIEnergy(name='casci_energy')#
Bases:
BaseMetric
- Parameters:
name (str)
- static evaluate(hamiltonian, **kwargs)#
Get the precomputed CASCI energy.
- Parameters:
hamiltonian (MolecularHamiltonian) – The molecular Hamiltonian object
kwargs (Any)
- Returns:
The CASCI energy value
- Return type:
float
- class qxmt.evaluation.metrics.defaults_vqe.CASSCFEnergy(name='casscf_energy')#
Bases:
BaseMetric
Metric for calculating the Complete Active Space Self-Consistent Field (CASSCF) energy.
This metric computes the CASSCF energy using the molecular Hamiltonian. The CASSCF energy represents the self-consistent field solution within the active space.
- Parameters:
name (str)
- static evaluate(hamiltonian, **kwargs)#
Get the precomputed CASSCF energy.
- Parameters:
hamiltonian (MolecularHamiltonian) – The molecular Hamiltonian object
kwargs (Any)
- Returns:
The CASSCF energy value
- Return type:
float
- class qxmt.evaluation.metrics.defaults_vqe.FCIEnergy(name='fci_energy')#
Bases:
BaseMetric
Metric for calculating the Full Configuration Interaction (FCI) energy.
This metric computes the FCI energy using the molecular Hamiltonian. The FCI energy represents the exact solution within the given basis set.
- Parameters:
name (str)
- static evaluate(hamiltonian, **kwargs)#
Get the precomputed Full Configuration Interaction energy.
- Parameters:
hamiltonian (MolecularHamiltonian) – The molecular Hamiltonian object
kwargs (Any)
- Returns:
The FCI energy value
- Return type:
float
- class qxmt.evaluation.metrics.defaults_vqe.FinalCost(name='final_cost')#
Bases:
BaseMetric
Metric for calculating the final cost from VQE optimization history.
This metric extracts the last cost value from the cost history, representing the final cost obtained from the VQE algorithm.
- Parameters:
name (str)
- static evaluate(cost_history, **kwargs)#
Calculate the final cost.
- Parameters:
cost_history (list[float]) – List of cost values from VQE optimization
kwargs (Any)
- Returns:
The final cost value
- Return type:
float
- class qxmt.evaluation.metrics.defaults_vqe.HFEnergy(name='hf_energy')#
Bases:
BaseMetric
Metric for calculating the Hartree-Fock (HF) energy.
This metric computes the Hartree-Fock energy using the molecular Hamiltonian.
- Parameters:
name (str)
- static evaluate(hamiltonian, **kwargs)#
Get the precomputed Hartree-Fock energy.
- Parameters:
hamiltonian (MolecularHamiltonian) – The molecular Hamiltonian object
kwargs (Any)
- Returns:
The Hartree-Fock energy value
- Return type:
float