qdk_chemistry.plugins.pyscf.coupled_cluster module

PySCF-based Coupled Cluster calculator implementation for qdk_chemistry.

This module provides integration between QDK/Chemistry and PySCF for performing Coupled Cluster (CC) calculations. It implements a CCSD (Coupled Cluster Singles and Doubles) calculator that can be used within the QDK/Chemistry framework.

The module contains:

The calculator handles automatic conversion between QDK/Chemistry Hamiltonian objects and PySCF format, performs the CC calculation, and returns results (energy and wavefunction) in QDK/Chemistry-compatible format.

Upon import, this module automatically registers the PySCF CC calculator with QDK/Chemistry’s CC calculator registry under the name “pyscf_coupled_cluster”.

Examples

>>> from qdk_chemistry.plugins.pyscf.coupled_cluster import PyscfCoupledClusterCalculator
>>> cc_calculator = PyscfCoupledClusterCalculator()
>>> energy, wavefunction = cc_calculator.run(ansatz)

This module requires both QDK/Chemistry and PySCF to be installed.

class qdk_chemistry.plugins.pyscf.coupled_cluster.PyscfCoupledClusterCalculator[source]

Bases: DynamicalCorrelationCalculator

PySCF-based Coupled Cluster calculator for quantum chemistry calculations.

This class provides an interface between QDK/Chemistry and PySCF for performing Coupled Cluster calculations on molecular systems. It handles the conversion between QDK/Chemistry Hamiltonian objects and PySCF representations, performs the CC calculation, and returns the results in QDK/Chemistry-compatible format.

The calculator uses CCSD (Coupled Cluster Singles and Doubles) method.

__init__()[source]

Initialize the calculator with default settings.

name()[source]

Return the name of this coupled cluster implementation.

class qdk_chemistry.plugins.pyscf.coupled_cluster.PyscfCoupledClusterSettings[source]

Bases: Settings

Settings configuration for the PySCF Coupled Cluster calculator.

This class manages the configuration parameters for the PySCF Coupled Cluster calculator, providing default settings and allowing customization of quantum chemistry calculations.

verbose

Print level. Default value equals to Mole.verbose.

Type:

int

max_memory

Allowed memory in MB. Default value equals to Mole.max_memory.

Type:

float or int

conv_tol

Convergence threshold. Default is 1e-7.

Type:

float

conv_tol_norm

Convergence threshold for norm(t1,t2). Default is 1e-5.

Type:

float

max_cycle

Max number of iterations. Default is 50.

Type:

int

diis_space

DIIS space size. Default is 6.

Type:

int

diis_start_cycle

The step to start DIIS. Default is 0.

Type:

int

direct

AO-direct CCSD. Default is False.

Type:

bool

async_io

Allow for asynchronous function execution. Default is True.

Type:

bool

incore_complete

Avoid all I/O. Default is True.

Type:

bool

frozen

If integer is given, the inner-most orbitals are frozen from CC amplitudes. Given the orbital indices (0-based) in a list, both occupied and virtual orbitals can be frozen in the CC calculation.

Type:

int or list

Examples

>>> settings = PyscfCoupledClusterSettings()
>>> settings.set("max_cycle", 100)
__init__()[source]

Initialize the settings with default values.