qit.ho

Harmonic oscillators

This module simulates harmonic oscillators by truncating the state space dimension to a finite value. Higher truncation limits give more accurate results. All the functions in this module operate in the truncated number basis \(\{\ket{0}, \ket{1}, ..., \ket{n-1}\}\) of the harmonic oscillator, where n is the truncation dimension.

The corresponding truncated annihilation operator can be obtained with qit.utils.boson_ladder.

Contents

coherent_state(alpha[, n])

Coherent states of a harmonic oscillator.

position_state(q[, n])

Position eigenstates of a harmonic oscillator.

momentum_state(p[, n])

Momentum eigenstates of a harmonic oscillator.

position([n])

Position operator.

momentum([n])

Momentum operator.

displace(alpha[, n])

Bosonic displacement operator.

squeeze(z[, n])

Bosonic squeezing operator.

rotate(phi[, n])

Bosonic rotation operator.

beamsplitter(theta, phi[, n])

Bosonic beamsplitter operator.

cx([s, n])

Bosonic controlled addition operator.

husimi(rho[, alpha, z, res, lim])

Husimi probability distribution.

wigner(rho[, alpha, res, lim, method])

Wigner quasi-probability distribution.

Functions

beamsplitter(theta, phi[, n])

Bosonic beamsplitter operator.

coherent_state(alpha[, n])

Coherent states of a harmonic oscillator.

cx([s, n])

Bosonic controlled addition operator.

displace(alpha[, n])

Bosonic displacement operator.

husimi(rho[, alpha, z, res, lim])

Husimi probability distribution.

momentum([n])

Momentum operator.

momentum_state(p[, n])

Momentum eigenstates of a harmonic oscillator.

position([n])

Position operator.

position_state(q[, n])

Position eigenstates of a harmonic oscillator.

rotate(phi[, n])

Bosonic rotation operator.

squeeze(z[, n])

Bosonic squeezing operator.

wigner(rho[, alpha, res, lim, method])

Wigner quasi-probability distribution.