QuantumChemistry
Purify2RDM
purify the two-electron reduced density matrix (2-RDM) to obey a set of N-representability conditions
Calling Sequence Description Options
Outputs References Examples
Calling Sequence
Purify2RDM(2RDM, options)
Parameters
2RDM
-
Array; spin-free 2-RDM represented as a 4-index Array
options
(optional) equation(s) of the form option = value where option is one of conditions, conv_tol, electron_number, max_cycle_sdp, mo_symmetries, spin, symmetry, and verbose
Description
The 2-RDM of a molecule obeys a set of stringent constraints that are necessary for it to represent an N-electron wave function−constraints known as N-representability conditions. A 2-RDM that is computed by an approximate method or measured in the presence of noise as on a quantum computer can violate some of these conditions.
The command Purify2RDM purifies the 2-RDM to obey an important set of N-representability conditions. Purify2RDM uses an advanced type of optimization, known as semidefinite programming, to project the 2-RDM onto the set of approximately N-representable 2-RDMs.
The command is especially useful in molecular simulations on quantum computers where noise generates errors in the measured 2-RDMs. The correction of errors in quantities measured on a quantum computer is known as error mitigation.
The optional conditions keyword controls the N-representability conditions employed in the calculation. It can be set to the following strings: "D", "DQ", "DQG" (default), and "DQGT".
Outputs
The table of following contents:
trdm1
Matrix -- one-particle reduced density matrix (1-RDM) in molecular-orbital (MO) representation
trdm2
Array -- two-particle reduced density matrix (2-RDM) in molecular-orbital (MO) representation
Options
conv_tol = float -- converge threshold. Default is 1*10−4.
conditions = string -- "D", "DQ", "DQG," or "DQGT". Default is "DQG".
electron_number = posint -- the number of electrons represented by the 2-RDM.
max_cycle_sdp = posint -- max number of SDP iterations. Default is 50000.
mo_symmetries = Vector -- string labels of the irreducible representations of the molecular orbitals.
spin = nonnegint -- twice the total spin S (= 2S). Default is 0.
symmetry = string/boolean -- is the Schoenflies symbol of the abelian point-group symmetry which can be one of the following: D2h, C2h, C2v, D2, Cs, Ci, C2, C1. true (default) finds the appropriate symmetry while false does not use symmetry.
verbose = posint -- positive integer between 1 and 5 that controls printing. Default is 1.
References
J. J. Foley IV and D. A. Mazziotti, Phys. Rev. A 86, 012512 (2012). "Measurement-driven reconstruction of many-particle quantum processes by semidefinite programming with application to photosynthetic light harvesting"
D. A. Mazziotti, Phys. Rev. E 65, 026704 (2002). "Purification of correlated reduced density matrices"
S. E. Smart, J.-N. Boyn, and D. A. Mazziotti, "Resolution of the relative energies of the benzyne isomers on a quantum computer using a contracted Schrödinger equation" (in preparation 2021).
Examples
withQuantumChemistry:
We demonstrate the command by using it to purify an approximate 2-RDM of hydrogen fluoride generated from second-order many-body perturbation (MP2) theory. First, we generate the data from applying the MP2 command to the geometry of hydrogen fluoride where we include the keyword parameter return_rdm="rdm1_and_rdm2" to return the 2-RDM.
hf ≔ MolecularGeometryhydrogen fluoride;
hf≔F,0,0,0,H,0.43580000,−0.14770000,−0.81880000
data_hf ≔ MP2hf, return_rdm=rdm1_and_rdm2:
Second, we reshape the data stored in a 4-index tensor into a 2-index matrix
D2 ≔ Matrix36,36, shape=symmetric:D2.. ≔ ArrayTools:-Permutedata_hfrdm2, 1,3,2,4;
and compute the eigenvalues of the 2-RDM with the Eigenvalues command in the LinearAlgebra package
eigenvals ≔ LinearAlgebra:-EigenvaluesD2;
Notice that the lowest eigenvalue of the approximate 2-RDM is negative (-0.0143), but because each eigenvalue represents the probability of being in a two-electron quantum state, all of the eigenvalues of the 2-RDM should be nonnegative! Finally, we use the Purify2RDM command to correct this violation as well as more subtle violations of the physical requirements for the 2-RDM
data_hf_purified ≔ Purify2RDMdata_hfrdm2;
To check the correction of the 2-RDM, as before we rearrange the outputed 4-index tensor into a 2-index matrix
D2p ≔ Matrix36,36, shape=symmetric:D2p.. ≔ ArrayTools:-Permutedata_hf_purifiedrdm2, 1,3,2,4;
which we diagonalize with the LinearAlgebra:-Eigenvalues command
eigenvals ≔ LinearAlgebra:-EigenvaluesD2p;
All of the eigenvalues, we find, are now nonnegative.
See Also
QuantumChemistry Variational2RDM HartreeFock FullCI ActiveSpaceCI ActiveSpaceSCF Parametric2RDM ContractedSchrodinger
Download Help Document