qrunch.chemistry.calculators.tools.initial_ansatz.moller_plesset_circuit

Module designed to generate an initial state circuit that corresponds to a MP2 wave function.

MP2 denotes Moller-Plesset perturbation theory to second order.

The MP2 wave function is the first order correction to the Hartree-Fock wave function. The resulting quantum circuit will have a number of qubits equal to the number of spin orbitals (twice the number of spatial orbitals).

The circuit is built via a greedy beam search that finds a sequence of single- and double-excitation gates approximating the normalised MP2 wavefunction expressed as a superposition of Slater determinants.

Classes

MollerPlesset2Ansatz

An initial ansatz circuit that approximates the MP2 wave function.

MollerPlesset2AnsatzBuilder

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

class MollerPlesset2Ansatz

Bases: InitialAnsatz

An initial ansatz circuit that approximates the MP2 wave function.

This state is intended to be used as an initial state for quantum chemistry calculations with quantum computers. The circuit is a superposition of Slater determinants approximating the first-order correction to the Hartree-Fock wave function. The qubit sites are indexed according to: alpha sites (0, N_s - 1) and beta sites (N_s, 2 x N_s - 1) where N_s is the number of spatial orbitals.

__init__(circuit: Circuit) None

Initialize a MollerPlesset2Ansatz with a pre-built circuit.

Parameters:

circuit (Circuit) – The quantum circuit approximating the MP2 wave function.

Return type:

None

create_circuit() Circuit

Return the MP2 ansatz circuit.

Return type:

Circuit

class MollerPlesset2AnsatzBuilder

Bases: InitialAnsatzBuilder

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

computes t2 amplitudes, then constructs the normalised MP2 wavefunction in determinant form, then runs a greedy beam search to find an efficient circuit representation.

__init__(mp2_options: MollerPlesset2GroundStateProblemCalculatorOptions | None = None, beam_search_options: FixedParticleNumberStatePrepBeamSearchOptions | None = None, amplitude_threshold: float = 1e-08) None

Initialize the builder.

Parameters:
  • mp2_options (MollerPlesset2GroundStateProblemCalculatorOptions | None) – Options forwarded to the MollerPlesset2GroundStateProblemCalculator used for computing t2 amplitudes. None uses default options.

  • beam_search_options (FixedParticleNumberStatePrepBeamSearchOptions | None) – Options controlling the beam search circuit synthesis. None uses default options.

  • amplitude_threshold (float) – Amplitudes with absolute value below this are ignored when constructing the MP2 wavefunction from t2 amplitudes.

Return type:

None

build_ansatz(ground_state_problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) MollerPlesset2Ansatz

Build an MP2 ansatz for a fermionic ground state problem.

Parameters:

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

Return type:

MollerPlesset2Ansatz

build_paired_ansatz(ground_state_problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) MollerPlesset2Ansatz

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

Each qubit represents a spatial orbital that holds an electron pair. The circuit uses half the number of qubits (one per spatial orbital) and only single excitation gates (each moving a pair between spatial orbitals).

Parameters:

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

Return type:

MollerPlesset2Ansatz