FCIDump

struct QfFCIDump

An electronic structure Hamiltonian in FCIDump format.


Definition

The FCIDump format was originally defined by Knowles and Handy, 1989 [1]. It is a widespread format for exporting electronic structure Hamiltonians in a plain-text file.

The present data structure only stores the information relevant for constructing the second quantized operator. However, this implementation goes beyond the original definition by supporting unrestricted spin data to be loaded. The table below outlines how integrals are associated with spin species based on the intervals in which the indices fall (assuming a header with NORB=n):

Integral Type

i

j

k

l

Constant

\({0}\)

\({0}\)

\({0}\)

\({0}\)

1-body alpha

\({0}\)

\({0}\)

\([1,n]\)

\([1,n]\)

1-body beta

\({0}\)

\({0}\)

\([n+1,2n]\)

\([n+1,2n]\)

2-body alpha-alpha

\([1,n]\)

\([1,n]\)

\([1,n]\)

\([1,n]\)

2-body alpha-beta

\([1,n]\)

\([1,n]\)

\([n+1,2n]\)

\([n+1,2n]\)

2-body beta-beta

\([n+1,2n]\)

\([n+1,2n]\)

\([n+1,2n]\)

\([n+1,2n]\)

The only required values are the 1-body alpha-spin integrals.


Members

QfFCIDump *qf_fcidump_from_file(char *file_path)

Parses an FCIDump file.

Example

Assuming you have an FCIDump file called molecule.fcidump, you use this function like so:

1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");

Parameters:
  • file_path – The path to the FCIDump file.

Returns:

A pointer to the FCIDump data structure.

void qf_fcidump_free(QfFCIDump *fcidump)

Frees an existing FCIDump data structure.

Example

1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2qf_fcidump_free(fcidump);

Parameters:
  • fcidump – A pointer to the FCIDump data structure to be freed.

uint32_t qf_fcidump_norb(const QfFCIDump *fcidump)

Gets the number of orbitals from an FCIDump.

This number, \(n\), is extracted from the NORB=n field in the header of the FCIDump file.

Example

1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2uint32_t norb = qf_fcidump_norb(fcidump);

Parameters:
  • fcidump – A pointer to the FCIDump data structure to be freed.

Returns:

The number of orbitals.

uint32_t qf_fcidump_nelec(const QfFCIDump *fcidump)

Gets the number of electrons from an FCIDump.

This number, \(n\), is extracted from the NELEC=n field in the header of the FCIDump file.

Example

1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2uint32_t nelec = qf_fcidump_nelec(fcidump);

Parameters:
  • fcidump – A pointer to the FCIDump data structure to be freed.

Returns:

The number of electrons.

uint32_t qf_fcidump_ms2(const QfFCIDump *fcidump)

Gets the spin quantum number from an FCIDump.

This number, \(S\), is extracted from the MS2=S field in the header of the FCIDump file.

Example

1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2uint32_t ms2 = qf_fcidump_ms2(fcidump);

Parameters:
  • fcidump – A pointer to the FCIDump data structure to be freed.

Returns:

The spin quantum number (multiplied by 2 to ensure an integer value).


Conversion

Operator representations which can be constructed from an instance of QfFCIDump provide a qf_*_from_fcidump function:

QfFermionOperator *qf_ferm_op_from_fcidump(const QfFCIDump *fcidump)

Constructs an :c:struct:QfFermionOperator from a :c:struct:QfFCIDump.

Example

1QfFCIDump *fcidump = qf_fcidump_from_file("molecule.fcidump");
2QfFermionOperator *op = qf_ferm_op_from_fcidump(fcidump);

Parameters:
  • fcidump – A pointer to the FCIDump data structure.

Returns:

A pointer to the created operator.