Overview¶
Python API¶
The
thewalrusPython API provides access to various highly optimized hafnian, permanent, and torontonian algorithmsThe
thewalrus.quantumsubmodule provides access to various utility functions that act on Gaussian quantum statesThe
thewalrus.samplessubmodule provides access to algorithms to sample from the hafnian or the torontonian of Gaussian quantum statesThe
thewalrus.symplecticsubmodule provides access to a convenient set of symplectic matrices and utility functions to manipulate themThe
thewalrus.decompositionssubmodule provides access to common shared matrix decompositions used to perform gate decompositionsThe
thewalrus.charpolysubmodule provides access to La Budde’s algorithm to calculate the characteristic polynomials of matricesThe
thewalrus.randomsubmodule provides access to random unitary, symplectic and covariance matricesThe
thewalrus.fock_gradientssubmodule provides access to the Fock representation of certain continuous-variable gates and their gradientsThe
thewalrus.referencesubmodule provides access to pure-Python reference implementations of the hafnian, loop hafnian, and torontonian
Octave¶
In addition, two Octave functions are provided: octave/hafnian.m and octave/loophafnian.m.