qrunch.chemistry.calculators.tools.initial_ansatz.initial_ansatz_protocols

Interface for defining an initial wave-function ansatz (Usually a Hartree-Fock state) for a molecule.

An initial ansatz can create an initial quantum circuit that represents initial wave-function ansatz. The initial quantum circuit can then be provided to a basic VQE and an Adaptive VQE.

Classes

InitialAnsatz

Initial ansatz for a molecule to be used in an energy calculation.

InitialAnsatzBuilder

Builder for constructing an initial ansatz from a ground state problem.

class InitialAnsatz

Bases: Protocol

Initial ansatz for a molecule to be used in an energy calculation.

__init__(*args, **kwargs)
create_circuit() Circuit

Create the quantum circuit representing the ansatz.

Return type:

Circuit

class InitialAnsatzBuilder

Bases: Protocol

Builder for constructing an initial ansatz from a ground state problem.

__init__(*args, **kwargs)
build_ansatz(ground_state_problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) InitialAnsatz

Build an initial ansatz for a fermionic ground state problem.

Parameters:

ground_state_problem (RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) – The ground state problem containing integrals and electron configuration.

Return type:

InitialAnsatz

build_paired_ansatz(ground_state_problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) InitialAnsatz

Build an initial ansatz for a paired-electron (hardcore boson) ground state problem.

Parameters:

ground_state_problem (RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) – The ground state problem containing integrals and electron configuration.

Return type:

InitialAnsatz