MP2InitialPoint#
- class MP2InitialPoint(*, threshold=1e-12)[source]#
Bases:
InitialPointCompute the second-order Møller-Plesset perturbation theory (MP2) initial point.
The computed MP2 correction coefficients are intended for use as an initial point for the VQE parameters in combination with a
UCCansatz.The initial point parameters are computed using the
compute()method, which requires theproblemandansatzto be passed as arguments or theproblemandansatzattributes to be set already.The
problemis required to be anElectronicStructureProblemwhich contains anElectronicEnergyHamiltonian. It also must have itsnum_particlesandorbital_energiesattributes specified. If itsreference_energyattribute is provided, this will be used to compute thetotal_energy.ElectronicEnergymust contain the two-body, molecular-orbitalelectronic_integrals.Setting the
problemwill compute thet2_amplitudesandenergy_correction.Following computation, one can obtain the initial point array via the
to_numpy_array()method. The initial point parameters that correspond to double excitations in theexcitation_listwill equal the appropriate T2 amplitude, while those belowthresholdor that correspond to single, triple, or higher excitations will be zero.Attributes
- ansatz#
The UCC ansatz.
The
excitation_listandrepsused by theUCCansatz is obtained to ensure that the shape of the initial point is appropriate.
- energy_correction#
The MP2 energy correction.
- problem#
The problem instance.
See
MP2InitialPointfor more information on the required properties.- Raises:
QiskitNatureError – If
ElectronicEnergyis missing or the two-body molecular orbitals matrix.QiskitNatureError – If
num_particlesororbital_energiesisNone.NotImplementedError – If alpha and beta spin molecular orbitals are not identical.
- t2_amplitudes#
T2 amplitudes.
Given
t2[i, j, a, b]i, jcarry virtual indices, whilea, bcarry occupied indices.
- total_energy#
The total energy including the Hartree-Fock energy.
If the reference energy was not obtained from
ElectronicEnergythis will be equal toenergy_correction.
Methods
- compute(ansatz=None, problem=None)[source]#
Compute the initial point parameter for each excitation.
See class documentation for more information.
- Parameters:
problem (BaseProblem | None) – The
problem.
- Raises:
QiskitNatureError – If
ansatzorproblemis not set.