3.11.1. horton.orbital_entanglement.orbital_entanglement – One- and two-orbital entanglement measures

Abbreviations used in this module:

  • dm1 = a 1-RDM
  • dm2 = a 2-RDM
  • dm3 = a 3-RDM
  • dm4 = a 4-RDM
  • odm1 = one-orbital reduced density matrix
  • odm2 = two-orbital reduced density matrix
  • soentropy = single-orbital entropy
  • toentropy = two-orbital entropy
  • mutualinfo = mutual information
class horton.orbital_entanglement.orbital_entanglement.OrbitalEntanglement(lf, one_dm, two_dm, three_dm=None, four_dm=None)

Bases: object

Arguments:

lf
Instance of horton.matrix.dense.DenseLinalgFactory or horton.matrix.cholesky.CholeskyLinalgFactory
one_dm

Instance of horton.matrix.base.OneIndex

A 1-RDM

two_dm

List of instances of horton.matrix.base.TwoIndex

List of 2-RDM’s. e.g. [\(\Gamma_{pp}^{qq}\), \(\Gamma_{pq}^{pq}\)]

Optional arguments:

three_dm

Instance of horton.matrix.base.ThreeIndex

A 3-RDM.

four_dm

Instance of horton.matrix.base.FourIndex

A 4-RDM.

__call__()

dumps single-orbital entropy and orbital-pair mututal information

see horton.orbital_entanglement.orbital_entanglement.OrbitalEntanglement.dump_output() for more info

__init__(lf, one_dm, two_dm, three_dm=None, four_dm=None)

Arguments:

lf
Instance of horton.matrix.dense.DenseLinalgFactory or horton.matrix.cholesky.CholeskyLinalgFactory
one_dm

Instance of horton.matrix.base.OneIndex

A 1-RDM

two_dm

List of instances of horton.matrix.base.TwoIndex

List of 2-RDM’s. e.g. [\(\Gamma_{pp}^{qq}\), \(\Gamma_{pq}^{pq}\)]

Optional arguments:

three_dm

Instance of horton.matrix.base.ThreeIndex

A 3-RDM.

four_dm

Instance of horton.matrix.base.FourIndex

A 4-RDM.

append_odm1(index, matrix)

Append index and one-orbital-reduced density matrix of orbital ‘index’ to list.

Arguments:

index
Orbital index.
matrix
The OneIndex object containing the ODMs.

Optional arguments:

append_odm2(index1, index2, matrix)

Append indices and two-orbital-reduced density matrix of orbital pair ‘index1/index2’ to list.

Arguments:

index1
First orbital index.
index2
Second orbital index.
matrix
The OneIndex object containing the ODMs.

Optional arguments:

calculate_entropy_term(val, select=’vonNeumann’)

Calculate entropic term

Arguements

val
Used to determine entropy

Optional arguments:

select
Select entropy function. Default: von Neumann.
clear()

Clear all information

clear_dm()

Clear the orbital density matrices

compute_mutual_information()

Compute mutual information using the single-orbital entropy and the two-orbital entropy.

Arguments:

one_entropy
Single-orbital entropy.
two_entropy
Two-orbital entropy.

Optional arguments:

compute_odm1(index1)
compute_odm2(index1, index2)
compute_single_orbital_entropy(select=’vonNeumann’)

Compute single-orbital entropy for each orbital in the active space. Currently, only the von Neumann entropy is supported.

The 1-ODM is assumed to be diagonalized.

Optional arguments:

select
Select entropy function. Default: von Neumann.
compute_two_orbital_entropy(select=’vonNeumann’)

Compute two-orbital entropy for each orbital in the active space. Currently, only the von Neumann entropy is supported.

The 1-ODM and 2-ODM are assumed to be diagonalized.

Optional arguments:

select
Select entropy function. Default: von Neumann.
diagonalize(mat)

Returns eigenvalues of a TwoIndex instance. Only real eigenvalues are returned, any imaginary part will be ignored

Arguments:

mat
An TwoIndex instance to be diagonalized.
dump_output(file1=’s1.dat’, file2=’i12.dat’)

Dump entanglement output files for postprocessing. Output files can be visualized using the build_orbital_entanglement_diagrams.sh script, which uses gnuplot.

Optional arguments:

file1

string

Filename for storing single-orbital entropy

Default: s1.dat

Format: First column is orbital index. Second column is single-orbital entropy

file2

string

Filename for storing orbital-pair mutual information

Default: i12.dat

Format: First two columns are orbital indices. Second column is corresponding orbital-pair mutual information

cache

The cache object in which the main attributes are stored

dm1

Some input 1-RDM

dm2

Some input 2-RDM

dm3

Some input 3-RDM

dm4

Some input 4-RDM

lf

The LinalgFactory.

mutual_info

The mutual information

nbasis

The number of basis functions.

odm1

The 1-ORDM

odm2

The 2-ORDM

so_entropy

The single-orbital entropy

to_entropy

The two-orbital entropy

class horton.orbital_entanglement.orbital_entanglement.OrbitalEntanglementAp1rog(lf, one_dm, two_dm, three_dm=None, four_dm=None)

Bases: horton.orbital_entanglement.orbital_entanglement.OrbitalEntanglement

Arguments:

lf
Instance of horton.matrix.dense.DenseLinalgFactory or horton.matrix.cholesky.CholeskyLinalgFactory
one_dm

Instance of horton.matrix.base.OneIndex

A 1-RDM

two_dm

List of instances of horton.matrix.base.TwoIndex

List of 2-RDM’s. e.g. [\(\Gamma_{pp}^{qq}\), \(\Gamma_{pq}^{pq}\)]

Optional arguments:

three_dm

Instance of horton.matrix.base.ThreeIndex

A 3-RDM.

four_dm

Instance of horton.matrix.base.FourIndex

A 4-RDM.

__call__()

dumps single-orbital entropy and orbital-pair mututal information

see horton.orbital_entanglement.orbital_entanglement.OrbitalEntanglement.dump_output() for more info

__init__(lf, one_dm, two_dm, three_dm=None, four_dm=None)

Arguments:

lf
Instance of horton.matrix.dense.DenseLinalgFactory or horton.matrix.cholesky.CholeskyLinalgFactory
one_dm

Instance of horton.matrix.base.OneIndex

A 1-RDM

two_dm

List of instances of horton.matrix.base.TwoIndex

List of 2-RDM’s. e.g. [\(\Gamma_{pp}^{qq}\), \(\Gamma_{pq}^{pq}\)]

Optional arguments:

three_dm

Instance of horton.matrix.base.ThreeIndex

A 3-RDM.

four_dm

Instance of horton.matrix.base.FourIndex

A 4-RDM.

append_odm1(index, matrix)

Append index and one-orbital-reduced density matrix of orbital ‘index’ to list.

Arguments:

index
Orbital index.
matrix
The OneIndex object containing the ODMs.

Optional arguments:

append_odm2(index1, index2, matrix)

Append indices and two-orbital-reduced density matrix of orbital pair ‘index1/index2’ to list.

Arguments:

index1
First orbital index.
index2
Second orbital index.
matrix
The OneIndex object containing the ODMs.

Optional arguments:

calculate_entropy_term(val, select=’vonNeumann’)

Calculate entropic term

Arguements

val
Used to determine entropy

Optional arguments:

select
Select entropy function. Default: von Neumann.
clear()

Clear all information

clear_dm()

Clear the orbital density matrices

compute_mutual_information()

Compute mutual information using the single-orbital entropy and the two-orbital entropy.

Arguments:

one_entropy
Single-orbital entropy.
two_entropy
Two-orbital entropy.

Optional arguments:

compute_odm1(index1)

Compute ODM for orbital index1.

Arguments:

index1
First orbital index.
compute_odm2(index1, index2)

Compute 2-ODM for orbital indices ‘index1/index2’.

Arguments:

index1
First orbital index.
index2
Second orbital index.
compute_single_orbital_entropy(select=’vonNeumann’)

Compute single-orbital entropy for each orbital in the active space. Currently, only the von Neumann entropy is supported.

The 1-ODM is assumed to be diagonalized.

Optional arguments:

select
Select entropy function. Default: von Neumann.
compute_two_orbital_entropy(select=’vonNeumann’)

Compute two-orbital entropy for each orbital in the active space. Currently, only the von Neumann entropy is supported.

The 1-ODM and 2-ODM are assumed to be diagonalized.

Optional arguments:

select
Select entropy function. Default: von Neumann.
diagonalize(mat)

Returns eigenvalues of a TwoIndex instance. Only real eigenvalues are returned, any imaginary part will be ignored

Arguments:

mat
An TwoIndex instance to be diagonalized.
dump_output(file1=’s1.dat’, file2=’i12.dat’)

Dump entanglement output files for postprocessing. Output files can be visualized using the build_orbital_entanglement_diagrams.sh script, which uses gnuplot.

Optional arguments:

file1

string

Filename for storing single-orbital entropy

Default: s1.dat

Format: First column is orbital index. Second column is single-orbital entropy

file2

string

Filename for storing orbital-pair mutual information

Default: i12.dat

Format: First two columns are orbital indices. Second column is corresponding orbital-pair mutual information

cache

The cache object in which the main attributes are stored

dm1

Some input 1-RDM

dm2

Some input 2-RDM

dm3

Some input 3-RDM

dm4

Some input 4-RDM

lf

The LinalgFactory.

mutual_info

The mutual information

nbasis

The number of basis functions.

odm1

The 1-ORDM

odm2

The 2-ORDM

so_entropy

The single-orbital entropy

to_entropy

The two-orbital entropy