qdk_chemistry.algorithms.multi_configuration_scf module

Public entry point for the multi-configuration SCF algorithms.

This module re-exports the core MultiConfigurationScf so that consumers can import it directly from qdk_chemistry.algorithms without depending on internal package paths.

class qdk_chemistry.algorithms.multi_configuration_scf.MultiConfigurationScf

Bases: pybind11_object

Abstract base class for multi-configurational Self-Consistent Field (MultiConfigurationScf) algorithms.

This class defines the interface for MultiConfigurationScf calculations that simultaneously optimize both molecular orbital coefficients and configuration interaction coefficients. Concrete implementations should inherit from this class and implement the solve method.

Examples

>>> # To create a custom MultiConfigurationScf algorithm, inherit from this class.
>>> import qdk_chemistry.algorithms as alg
>>> import qdk_chemistry.data as data
>>> class MyMCSCF(alg.MultiConfigurationScf):
...     def __init__(self):
...         super().__init__()  # Call the base class constructor
...     def _run_impl(self,
...                   orbitals : data.Orbitals,
...                   ham_ctor : alg.HamiltonianConstructor,
...                   mc_calculator : alg.MultiConfigurationCalculator,
...                   n_active_alpha_electrons : int,
...                   n_active_beta_electrons : int) ->tuple[float, data.Wavefunction] :
...         # Custom MCSCF implementation
...         return -1.0, data.Wavefunction()
__init__(self: qdk_chemistry.algorithms.MultiConfigurationScf) None

Create a MultiConfigurationScf instance.

Default constructor for the abstract base class. This should typically be called from derived class constructors.

Examples

>>> # In a derived class:
>>> class MyMCSCF(alg.MultiConfigurationScf):
...     def __init__(self):
...         super().__init__()  # Calls this constructor
name(self: qdk_chemistry.algorithms.MultiConfigurationScf) str

The algorithm’s name.

Returns:

The name of the algorithm

Return type:

str

run(self: qdk_chemistry.algorithms.MultiConfigurationScf, orbitals: qdk_chemistry.data.Orbitals, ham_ctor: qdk::chemistry::algorithms::HamiltonianConstructor, mc_calculator: qdk_chemistry.algorithms.MultiConfigurationCalculator, n_active_alpha_electrons: SupportsInt, n_active_beta_electrons: SupportsInt) tuple[float, qdk_chemistry.data.Wavefunction]

Perform a MultiConfigurationScf calculation.

This method automatically locks settings before execution.

Parameters:
Returns:

A tuple containing the calculated energy and the resulting wavefunction

Return type:

tuple[float, qdk_chemistry.data.Wavefunction]

settings(self: qdk_chemistry.algorithms.MultiConfigurationScf) qdk_chemistry.data.Settings

Access the MultiConfigurationScf calculation settings.

Returns:

Reference to the settings object for configuring the MultiConfigurationScf calculation

Return type:

qdk_chemistry.data.Settings

type_name(self: qdk_chemistry.algorithms.MultiConfigurationScf) str

The algorithm’s type name.

Returns:

The type name of the algorithm

Return type:

str