View source on GitHub |
FciGraph contains the addressing system for the wavefunction. Each
fqe.fci_graph.FciGraph(
nalpha: int,
nbeta: int,
norb: int
) -> None
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
alpha_map(
iorb: int,
jorb: int
) -> List[Tuple[int, int, int]]
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
beta_map(
iorb: int,
jorb: int
) -> List[Tuple[int, int, int]]
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
find_mapping(
dna: int,
dnb: int
) -> Tuple[fqe.fci_graph.Spinmap
, fqe.fci_graph.Spinmap
]
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
index_alpha(
bit_string: int
) -> int
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
index_alpha_all() -> Dict[int, int]
Return the index and the corresponding occupation string for all alpha strings
index_beta
index_beta(
bit_string: int
) -> int
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
index_beta_all() -> Dict[int, int]
Return the index and the corresponding occupation string for all beta strings
insert_mapping
insert_mapping(
dna: int,
dnb: int,
mapping_pair: Tuple[fqe.fci_graph.Spinmap
, fqe.fci_graph.Spinmap
]
) -> None
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
lena() -> int
Return the number of alpha electrons
lenb
lenb() -> int
Return the number of beta electrons
nalpha
nalpha() -> int
Return the number of alpha electrons
nbeta
nbeta() -> int
Return the number of beta electrons
norb
norb() -> int
Return the number of beta electrons
string_alpha
string_alpha(
address: int
) -> int
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
string_alpha_all() -> List[int]
Return all bitstrings for alpha occupied orbitals
string_beta
string_beta(
address: int
) -> int
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
string_beta_all() -> List[int]
Return all bitstrings for beta occupied orbitals