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
An initial ansatz circuit that approximates the MP2 wave function. |
|
Builder for constructing an MP2 initial ansatz from a ground state problem. |
- class MollerPlesset2Ansatz
Bases:
InitialAnsatzAn 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)whereN_sis the number of spatial orbitals.
- class MollerPlesset2AnsatzBuilder
Bases:
InitialAnsatzBuilderBuilder 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
MollerPlesset2GroundStateProblemCalculatorused for computing t2 amplitudes.Noneuses default options.beam_search_options (FixedParticleNumberStatePrepBeamSearchOptions | None) – Options controlling the beam search circuit synthesis.
Noneuses 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:
- 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: