FermionQuditSpace¶
- class qugradlab.hilbert_spaces.fermionic.FermionQuditSpace(sites: int, levels_per_site: int, n_particles: int)[source]¶
Bases:
FixedParticleFermionSpace,QuditSpaceA
FixedParticleFermionSpacewith a computational structure. The Hilbert space is split into the tensor product of sites (qudits), with each site hosting a specified number of levels. The computational subspace consists of the single occupation states that only have particles occupying the lowest two levels.Attributes
An array of positive integers labeling the Hilbert space basis
The Hilbert space dimension
An array satisfying the property
self.inverse[self.basis[i]]=iThe number of states per site (qudit)
The number of particles
The number of single particle states a fermion can take on
The number of sites (qudits)
Methods
Initialises a
FermionQuditSpace.Returns a column vector represnetation corresponding to the input basis state label.
Generates a boolean filter for the computation basis states in
basis.Initialises a
qugrad.HilbertSpacecorresponding the computation subspace.Dialates an operator \(\hat O\) that acts on the computational subspace to an operator \(\hat O\oplus 0\) that acts on the whole Hilbert space.
Generates a new subspace by filtering the basis state labels.
Generates a string (list of strings) that represent the state(s).
Returns a boolean array indicating whether each of the
basisstates has at most the specified occupation.Projects an operator that acts on the Hilbert space to an operator that acts only on the computational subspace.
Returns a boolean array indicating whether each of the
basisstates is a single occupation state (each site has exactly one particle).- __init__(sites: int, levels_per_site: int, n_particles: int)[source]¶
Initialises a
FermionQuditSpace.
- basis_vector(basis_state_label: int) ndarray[complex128]¶
Returns a column vector represnetation corresponding to the input basis state label.
- computational_projector() ndarray[bool][source]¶
Generates a boolean filter for the computation basis states in
basis. The computational subspace consists of the single occupation states that only have particles occupying the lowest two levels.
- computational_subspace() HilbertSpace¶
Initialises a
qugrad.HilbertSpacecorresponding the computation subspace.- Returns:
The computational subspace
- Return type:
- dialate_operator(operator: ndarray) ndarray¶
Dialates an operator \(\hat O\) that acts on the computational subspace to an operator \(\hat O\oplus 0\) that acts on the whole Hilbert space.
- get_subspace(filter: ndarray[bool]) HilbertSpace¶
Generates a new subspace by filtering the basis state labels.
- Parameters:
filter (NDArray[Shape[
dim], bool]) –Trueentries are retained in the new subspace.- Returns:
The filtered subspace.
- Return type:
HilbertSpace
- labels(states: int | list[int] | None = None) str | list[str]¶
Generates a string (list of strings) that represent the state(s).
- n_occupation_states(occupation: int) ndarray[bool][source]¶
Returns a boolean array indicating whether each of the
basisstates has at most the specified occupation.- Parameters:
occupation (int) – The occupation to check the
basisstates for.- Returns:
A boolean array indicating whether each of the
basisstates has at most the specified occupation.- Return type:
NDArray[Shape[
dim], bool]
Note
single_occupation_states()is only equivalent ton_occupation_states(1)whenn_particlesis greater than or equal tosites.
- project_operator(operator: ndarray) ndarray¶
Projects an operator that acts on the Hilbert space to an operator that acts only on the computational subspace.
- single_occupation_states() ndarray[bool][source]¶
Returns a boolean array indicating whether each of the
basisstates is a single occupation state (each site has exactly one particle).
- property dim¶
The Hilbert space dimension