BosonQuditSpace¶
- class qugradlab.hilbert_spaces.bosonic.BosonQuditSpace(n_single_particle_states: int, truncation_level: int)[source]¶
Bases:
BosonSpace,QuditSpaceA
BosonSpacewith a computational structure. The computational subspace consists of the states which have unoccupied and singly occupied single particle states.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 single particle states
The maximum number of bosons per single particle state
Methods
Initialises a
BosonSpaceReturns 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).
Projects an operator that acts on the Hilbert space to an operator that acts only on the computational subspace.
- __init__(n_single_particle_states: int, truncation_level: int)¶
Initialises a
BosonSpace
- 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 states which have unoccupied and singly occupied single particle states.
- 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).
- project_operator(operator: ndarray) ndarray¶
Projects an operator that acts on the Hilbert space to an operator that acts only on the computational subspace.
- property dim¶
The Hilbert space dimension