BosonSpace¶
- class qugradlab.hilbert_spaces.bosonic.BosonSpace(n_single_particle_states: int, truncation_level: int)[source]¶
Bases:
HilbertSpaceRepresents a truncated Fock space of boson modes.
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 new subspace by filtering the basis state labels.
Generates a string (list of strings) that represent the state(s).
- __init__(n_single_particle_states: int, truncation_level: int)[source]¶
Initialises a
BosonSpace
- basis_vector(basis_state_label: int) ndarray[complex128]¶
Returns a column vector represnetation corresponding to the input basis state label.
- 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][source]¶
Generates a string (list of strings) that represent the state(s).
- property dim¶
The Hilbert space dimension