Hilbert Spaces

Hilbert-space descriptors for OpenQuantumSim.

class openquantumsim.hilbert.HilbertSpace

Bases: object

Base Hilbert-space descriptor.

property dim: int

Return the finite Hilbert-space dimension.

class openquantumsim.hilbert.FockSpace(N=2, label=None)

Bases: HilbertSpace

Truncated bosonic Fock space with states |0> through |N-1>.

Parameters:
  • N (int)

  • label (str | None)

N: int = 2
label: str | None = None
property dim: int

Return the truncation dimension.

class openquantumsim.hilbert.SpinSpace(S=0.5, label=None)

Bases: HilbertSpace

Spin-S irreducible representation with dimension 2S + 1.

Parameters:
  • S (float)

  • label (str | None)

S: float = 0.5
label: str | None = None
property dim: int

Return 2S + 1.

class openquantumsim.hilbert.DickeSpace(n_spins, label=None)

Bases: HilbertSpace

Permutation-symmetric Dicke manifold for n_spins two-level systems.

Parameters:
  • n_spins (int)

  • label (str | None)

n_spins: int
label: str | None = None
property dim: int

Return the symmetric-manifold dimension n_spins + 1.

property total_spin: float

Return the collective spin S = n_spins / 2.

class openquantumsim.hilbert.CompositeSpace(spaces, label=None)

Bases: HilbertSpace

Tensor product of multiple Hilbert spaces.

Parameters:
spaces: tuple[HilbertSpace, ...]
label: str | None = None
property dim: int

Return the product dimension.