Mr Mustard Documentation



Responsive image

Mr Mustard is a differentiable bridge between phase space and Fock space with rich functionality in both representations.


Mr Mustard supports the following in a fully differentiable way:

  • Phase space representation of Gaussian states and Gaussian channels on an arbitrary number of modes

  • Exact Fock representation of any Gaussian circuit and any Gaussian state up to an arbitrary cutoff

  • Beam splitter, MZ interferometer, squeezer, displacement, phase rotation, bosonic lossy channel, thermal channel, more to come..

  • General Gaussian N-mode gate and general N-mode Interferometer with dedicated symplectic and orthogonal optimization routines

  • Photon number moments

  • PNR detectors, Threshold detectors with trainable quantum efficiency and dark counts

  • Homodyne, Heterodyne and Generaldyne Gaussian measurements

  • An optimizer with a spiffy progress bar

  • A composable Circuit object

  • Plug-and-play backends (TensorFlow and PyTorch)

  • An abstraction layer XPTensor for seamless symplectic algebra