spheres.oscillators

Functions for dealing with oscillators, particularly in the case of double oscillators in the context of the Schwinger representation of spin.

Functions

annihilators([n, cutoff_dim])

Constructs annihilators for a given number of oscillators with given cutoff dimension.

osc_spin(osc[, map])

Returns (nonzero) spin-j states correspond to the 2D oscillator state (pure or mixed).

osc_spinblocks(O[, map])

Extracts spin-j blocks from a 2D oscillator operator.

osc_spins(q[, map])

Extracts spin-j states from a 2D oscillator state.

osc_spintower_map(cutoff_dim)

Returns permutation from the tensor basis of two oscillators to the basis organized by total N, in other words, to a tower of spin states.

second_quantize_operator(O[, a])

Upgrades a first quantized operator to a second quantized operator given a list of annihilators.

second_quantize_spin_state(spin[, a])

Upgrades a spin state to a second quantized creation operator given a list of annihilators.

second_quantize_state(q[, a, state])

Upgrades a first quantized state to a second quantized creation operator given a list of annihilators.

second_quantized_paulis([cutoff_dim])

Second quantized Pauli X, Y, Z operators on two harmonic oscillators.

spin_osc(spin[, cutoff_dim, map])

Returns the 2D oscillator state corresponding to a given spin-j state (pure or mixed).

spin_osc_map(j[, cutoff_dim])

Construct linear map from spin-j states into the Fock space of the 2D quantum harmonic oscillator.

spin_tower_dimensions(d)

Given the overal dimension of a spin tower, return the individual dimensions of the spin states.

spinj_xyz_osc(osc[, paulis])

<X>, <Y>, <Z> expectation values on the given double oscillator state.

spins_osc(spins[, cutoff_dim, map])

List of spin-j states to a 2D quantum harmonic oscillator state.

vacuum([n, cutoff_dim])

Constructs vacuum state for a given number of oscillators with given cutoff dimension.