ffsim.sample_slater¶
- ffsim.sample_slater(norb, occupied_orbitals, orbital_rotation=None, *, orbs=None, shots=1, concatenate=True, bitstring_type=BitstringType.STRING, seed=None)[source]¶
Collect samples of electronic configurations from a Slater determinant.
The Slater determinant is specified as an orbital rotation applied to the reference electronic configuration given by
occupied_orbitals. The sampler draws independent samples from the corresponding determinantal point process using the projection-based sequential sampling algorithm described in the reference below.References
- Parameters:
norb (
int) – The number of spatial orbitals.occupied_orbitals (
Sequence[int] |tuple[Sequence[int],Sequence[int]]) – The occupied orbitals in the electronic configuration. This is either a list of integers specifying spinless orbitals, or a pair of lists, where the first list specifies the spin alpha orbitals and the second list specifies the spin beta orbitals.orbital_rotation (
ndarray|tuple[ndarray|None,ndarray|None] |None) – The optional orbital rotation. Either a single Numpy array specifying the orbital rotation to apply to both spin sectors, or a pair of Numpy arrays specifying independent orbital rotations for spin alpha and spin beta. In the paired form,Noneindicates that the identity operation is applied to the corresponding spin sector.orbs (
Sequence[int] |tuple[Sequence[int],Sequence[int]] |None) – The orbitals to sample. In the spinless case, this is a list of integers inrange(norb). In the spinful case, this is a pair of such lists, where the first list stores spin-alpha orbitals and the second list stores spin-beta orbitals. If not specified, then all orbitals are sampled.shots (
int) – The number of bitstrings to sample.concatenate (
bool) – Whether to concatenate the spin-alpha and spin-beta parts of the bitstrings. If True, then a single list of concatenated bitstrings is returned. The strings are concatenated in the order \(s_b s_a\), that is, the alpha string appears on the right. If False, then two lists are returned,(strings_a, strings_b), with the alpha strings listed first. In the spinless case (whenoccupied_orbitalsis a sequence of integers), this argument is ignored.bitstring_type (
BitstringType) – The desired type of bitstring output.seed (
Generator|int|None) – A seed to initialize the pseudorandom number generator. Should be a valid input tonp.random.default_rng.
- Return type:
- Returns:
The sampled bitstrings.