tangelo.algorithms package

Subpackages

Submodules

tangelo.algorithms.electronic_structure_solver module

Abstract class defining a common interface to all electronic structure solvers, in order to have consistency and ensure compatibility with higher-level workflows that can use them, such as problem decomposition methods.

class tangelo.algorithms.electronic_structure_solver.ElectronicStructureSolver(molecule)

Bases: ABC

Sets interface for objects that perform energy estimation of a molecule.

Specifics vary between concrete implementations, but common to all of them is that after simulate is called, the right internal state is set for the class so that get_rdm can return reduced density matrices for the last run simulation.

abstract get_rdm()

Returns the RDM for the previous simulation. In a concrete implementation, the simulate function would set the necessary internal state for the class so that this function can return the reduced density matrix.

Returns:
  • numpy.array – One-particle RDM.

  • numpy.array – Two-particle RDM.

Raises:

RuntimeError – If no simulation has been run.

abstract simulate()

Performs the simulation for a molecule.

Module contents