>
|
|
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.
>
|
|
| (1) |
>
|
|
Second, we reshape the data stored in a 4-index tensor into a 2-index matrix
>
|
|
and compute the eigenvalues of the 2-RDM with the Eigenvalues command in the LinearAlgebra package
>
|
|
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
>
|
|
To check the correction of the 2-RDM, as before we rearrange the outputed 4-index tensor into a 2-index matrix
>
|
|
which we diagonalize with the LinearAlgebra:-Eigenvalues command
>
|
|
All of the eigenvalues, we find, are now nonnegative.