Loading [MathJax]/jax/output/HTML-CSS/jax.js

qml.qchem.two_particle

two_particle(matrix_elements, core=None, active=None, cutoff=1e-12)[source]

Generates the FermionOperator representing a given two-particle operator required to build many-body qubit observables.

Second quantized two-particle operators are expanded in the basis of single-particle states as

ˆV=12α,β,γ,δα,β|ˆv|γ,δ [ˆcαˆcβˆcγˆcδ+ˆcαˆcβˆcγˆcδ+ˆcαˆcβˆcγˆcδ+ˆcαˆcβˆcγˆcδ ].

In the equation above the indices α,β,γ,δ run over the basis of spatial orbitals ϕα(r). Since the operator v acts only on the spatial coordinates the spin quantum numbers are indicated explicitly with the up/down arrows. The operators ˆc and ˆc are the particle creation and annihilation operators, respectively, and α,β|ˆv|γ,δ denotes the matrix elements of the operator ˆv

α,β|ˆv|γ,δ=dr1dr2 ϕα(r1)ϕβ(r2) ˆv(r1,r2) ϕγ(r2)ϕδ(r1).

If an active space is defined (see active_space()), the summation indices run over the active orbitals and the contribution due to core orbitals is computed as

ˆVcore=vcore+α,βactiveicore(2i,α|ˆv|β,ii,α|ˆv|i,β) [ˆcαˆcβ+ˆcαˆcβ]vcore=α,βcore[2α,β|ˆv|β,αα,β|ˆv|α,β].
Parameters
  • matrix_elements (array[float]) – 4D NumPy array with the matrix elements α,β|ˆv|γ,δ

  • core (list) – indices of core orbitals, i.e., the orbitals that are not correlated in the many-body wave function

  • active (list) – indices of active orbitals, i.e., the orbitals used to build the correlated many-body wave function

  • cutoff (float) – Cutoff value for including matrix elements. The matrix elements with absolute value less than cutoff are neglected.

Returns

an instance of OpenFermion’s FermionOperator representing the two-particle operator ˆV.

Return type

FermionOperator

Example

>>> import numpy as np
>>> matrix_elements = np.array([[[[ 6.82389533e-01, -1.45716772e-16],
...                               [-2.77555756e-17,  1.79000576e-01]],
...                              [[-2.77555756e-17,  1.79000576e-16],
...                               [ 6.70732778e-01, 0.00000000e+00]]],
...                             [[[-1.45716772e-16,  6.70732778e-16],
...                               [ 1.79000576e-01, -8.32667268e-17]],
...                              [[ 1.79000576e-16, -8.32667268e-17],
...                               [ 0.00000000e+00,  7.05105632e-01]]]])
>>> v_op = two_particle(matrix_elements)
>>> print(v_op)
0.3411947665 [0^ 0^ 0 0] +
0.089500288 [0^ 0^ 2 2] +
0.3411947665 [0^ 1^ 1 0] +
0.089500288 [0^ 1^ 3 2] +
0.335366389 [0^ 2^ 2 0] +
0.335366389 [0^ 3^ 3 0] +
0.3411947665 [1^ 0^ 0 1] +
0.089500288 [1^ 0^ 2 3] +
0.3411947665 [1^ 1^ 1 1] +
0.089500288 [1^ 1^ 3 3] +
0.335366389 [1^ 2^ 2 1] +
0.335366389 [1^ 3^ 3 1] +
0.089500288 [2^ 0^ 2 0] +
0.089500288 [2^ 1^ 3 0] +
0.352552816 [2^ 2^ 2 2] +
0.352552816 [2^ 3^ 3 2] +
0.089500288 [3^ 0^ 2 1] +
0.089500288 [3^ 1^ 3 1] +
0.352552816 [3^ 2^ 2 3] +
0.352552816 [3^ 3^ 3 3]