 Purify2RDM - Maple Help

QuantumChemistry

 Purify2RDM
 purify the two-electron reduced density matrix (2-RDM) to obey a set of N-representability conditions 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:

 ${t}\left[{\mathrm{rdm1}}\right]$ - Matrix -- one-particle reduced density matrix (1-RDM) in molecular-orbital (MO) representation ${t}\left[{\mathrm{rdm2}}\right]$ - 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

 1 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"
 2 D. A. Mazziotti, Phys. Rev. E 65, 026704 (2002). "Purification of correlated reduced density matrices"
 3 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

 > $\mathrm{with}\left(\mathrm{QuantumChemistry}\right):$

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.

 >
 ${\mathrm{hf}}{≔}\left[\left[{"F"}{,}{0}{,}{0}{,}{0}\right]{,}\left[{"H"}{,}{0.43580000}{,}{-0.14770000}{,}{-0.81880000}\right]\right]$ (1)
 >

Second, we reshape the data stored in a 4-index tensor into a 2-index matrix

 >
 ${{\mathrm{_rtable}}}_{{36893488667168780028}}$ (2)

and compute the eigenvalues of the 2-RDM with the Eigenvalues command in the LinearAlgebra package

 >
 ${{\mathrm{_rtable}}}_{{36893488667357649364}}$ (3)

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

 >
 ${\mathrm{table}}{}\left({\mathrm{%id}}{=}{36893488667421936796}\right)$ (4)

To check the correction of the 2-RDM, as before we rearrange the outputed 4-index tensor into a 2-index matrix

 >
 ${{\mathrm{_rtable}}}_{{36893488667168782084}}$ (5)

which we diagonalize with the LinearAlgebra:-Eigenvalues command

 >
 ${{\mathrm{_rtable}}}_{{36893488667357640572}}$ (6)

All of the eigenvalues, we find, are now nonnegative.

 >