We're celebrating World Quantum Day 2022! Join us

fqe.fci_graph.FciGraph

FciGraph contains the addressing system for the wavefunction. Each

determinant is considered as a product of alpha creation operators and beta operators acting on the vacuum in the manner {alpha ops}{beta ops}|>. To find any determinant in the model one needs the occupation index of the alpha orbitals and the beta orbitals. From this information, any pointer into the wavefunction can be generated.

Methods

alpha_map

View source

Returns the Knowles-Handy mapping (within this FciGraph) for alpha electrons for :math:a^\dagger_i a_j

Args
iorb (int) - orbital index for the creation operator

jorb (int) - orbital index for the annhilation operator

Returns
(List[Tuple[int, int, int]]) - array of string mapping with phases

beta_map

View source

Returns the Knowles-Handy mapping (within this FciGraph) for beta electrons for :math:a^\dagger_i a_j

Args
iorb (int) - orbital index for the creation operator

jorb (int) - orbital index for the annhilation operator

Returns
(List[Tuple[int, int, int]]) - array of string mapping with phases

find_mapping

View source

Returns the pair of mappings that corresponds to dna and dnb (difference in the number of electrons for alpha and beta)

Args
dna (int) - the difference in the number of alpha electrons

dnb (int) - the difference in the number of beta electrons

Returns
(Tuple[Spinmap, Spinmap]) - mapping for alpha and beta electrons

index_alpha

View source

Retrieve the alpha index stored by it's bitstring

Args
bit_string (bitstring) - an occupation representation of the configuration

Returns
address (int) - an integer pointing into the fcigraph

index_alpha_all

View source

Return the index and the corresponding occupation string for all alpha strings

index_beta

View source

Retrieve the beta bitstring reprsentation stored at the address

Args
bit_string (bitstring) - an occupation representation of the configuration

Returns
address (int) - an integer pointing into the fcigraph

index_beta_all

View source

Return the index and the corresponding occupation string for all beta strings

insert_mapping

View source

Insert a new pair of alpha and beta mappings with a key that are the differences for the number of alpha and beta electrons.

Args
dna (int) - the difference in the number of alpha electrons

dnb (int) - the difference in the number of beta electrons

mapping_pair (Tuple[Spinmap, Spinmap]) - mapping for alpha and beta electrons

lena

View source

Return the number of alpha electrons

lenb

View source

Return the number of beta electrons

nalpha

View source

Return the number of alpha electrons

nbeta

View source

Return the number of beta electrons

norb

View source

Return the number of beta electrons

string_alpha

View source

Retrieve the alpha bitstring reprsentation stored at the address

Args
address (int) - an integer pointing into the fcigraph

Returns
(bitstring) - an occupation representation of the configuration

string_alpha_all

View source

Return all bitstrings for alpha occupied orbitals

string_beta

View source

Retrieve the beta bitstring reprsentation stored at the address

Args
address (int) - an integer pointing into the fcigraph

Returns
(bitstring) - an occupation representation of the configuration

string_beta_all

View source

Return all bitstrings for beta occupied orbitals