Circuit Library

This module provides a library of BosonicGate implementations.

State preparation

InitializeModes(occupation)

Prepares a bosonic Fock state.

Passive linear optics

A number-conserving transformation of the mode operators, generated by \(b^\dagger_i b_j\). Beamsplitters and phase shifters are the two-mode and single-mode special cases, and together they generate any \(U(M)\).

ModeRotation(rotation_unitary, *[, synthesis])

Implements a passive linear-optical mode transformation.

Time evolution

Evolution(num_modes, operator[, time, ...])

Implements the time evolution of a bosonic operator.

Synthesis methods

How an Evolution gate gets decomposed in bosonic space is configurable through its synthesis argument. The available methods live in the synthesis module.