This release contains contributions from (in alphabetical order):
-
Implementation of gaussian boson sampling and gaussian boson sampling with threshold detectors. (#338)
-
New function to produce Bloch-Messiah decomposition of symplectic matrices. (#352)
- Added function to extend single mode symplectic to act on multiple modes. (#347)
- Added function to compute grouped (total) click probabilities for GBS setups using threshold detectors. The function uses the positive P-distribution simulation method of Drummond et al.. (#348)
- Remove redundant call of
Qmat
,Amat
fromgenerate_hafnian_sample
. (#343)
- The centralized Xanadu Sphinx Theme is now used to style the Sphinx documentation. (#341)
This release contains contributions from (in alphabetical order):
Mikhail Andrenkov, Sebastián Duque, Jacob Hastrup, Antonín Hoskovec, Martin Houde, Benjamin Lanthier, Dominic Leclerc, Filippo Miatto, Will McCutcheon, Brandon Turcotte, Jiaqi Zhao
-
New functions for calculating properties of distinguishable squeezed states of light having passed through an interferometer. #326
-
New function
ltor
is added which allowsthreshold_detector_prob
to act more consistently on displaced and zero-mean Gaussian states. #317 -
New functions for threshold detection probabilities of Fock states, the Bristolian (brs) and the Unitary Bristolian (ubrs). #316
-
Entanglement measures
entanglement_entropy
andlog_negativity
for bipartite Gaussian states are added to the quantum submodule. #332 -
New functions,
recursive_hafnian
andsolve
added in the_hafnian
module. #325 -
New function to check if a matrix is symplectic
is_symplectic
. #334. -
Adds support for Python 3.10. #337
-
Update methods for calculating threshold detector probabilities of Gaussian states, now using
ltor
function withinthreshold_detection_prob
#317 -
numba_tor
now can benefit from numba parallelization #317 -
Recursive Torontonian added for faster computation based on paper "Polynomial speedup in Torontonian calculation by a scalable recursive algorithm" by Ágoston Kaposi, Zoltán Kolarovszki, Tamás Kozsik, Zoltán Zimborás, and Péter Rakyta. #321
-
Recursive Loop Torontonian added for faster computation based on combining recursive Torontonian improvement and new loop Torontonian feature. #332
-
Hafnians of odd-sized matrices are calculated roughly twice as fast. #329
-
The new Hafnian functions now use the Labudde method to calculate power traces instead of using diagonalization. #333
- Permanent algorithms handle 0x0 cases correctly. #320
This release contains contributions from (in alphabetical order):
Jake Bulmer, Luke Helt, Martin Houde, Theodor Isacsson, Benjamin Lanthier, Fabian Laudenbach, Dominic Leclerc, Gregory Morse, Nicolas Quesada, Brandon Turcotte, Jiaqi Zhao
- Python module for the La Budde method of computing characteristic polynomials. #304
-
Permanent algorithms are implemented in Python using Numba just-in-time compilation. #300
-
Hafnian algorithms are implemented in Python using Numba just-in-time compilation. #311
-
Documentation is updated to include the characteristic polynomials and decompositions modules. #312
-
Makes modules reachable via the global namespace, instead of requiring importing the modules explicitly. #312
import thewalrus as tw tw.samples.generate_torontonian_sample
- The Walrus is no longer dependent on C++, and all C++-related code and documentation is removed. Instead, all code has been ported to Python using just-in-time compilation to improve performance. #311
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Benjamin Lanthier, Dominic Leclerc, Nicolas Quesada, Brandon Turcotte, Trevor Vincent, Jiaqi Zhao
-
Python installation no longer requires
repoze.lru
. #293 -
Multidimensional Hermite polynomials are now implemented in Numba, hence reducing the C++ dependencies of The Walrus. #295
-
Updates missing figures in the "Basics of Hafnians and Loop Hafnians" documentation. #288
This release contains contributions from (in alphabetical order):
Mikhail Andrenkov, Sebastián Duque
hermite_multidimensional_numba
can now handle a cutoff of typenp.ndarray
withshape=[]
. #283
This release contains contributions from (in alphabetical order):
Filippo Miatto
- Faster implementation of
hermite_multidimensional_numba
andhermite_multidimensional_numba_grad
. #280
-
Updates the
samples.generate_torontonian_sample
function to ensure probabilities are normalized. #250 -
Pins Numba to version
<0.54
to avoid binary incompatibilities with the 1.21 release of NumPy. #250
This release contains contributions from (in alphabetical order):
Josh Izaac, Filippo Miatto, Nicolas Quesada.
-
Adds the function
hafnian_sparse
to compute sparse loop hafnians (pure Python implementation). #245 -
The
symplectic.squeezing
function is now generalized to multiple modes of single mode squeezing. #249 -
Adds a function
symplectic.passive_transformation
which allows for Gaussian states to be transformed by arbitrary non-unitary, non-square linear optical transformations. #249 -
The
torontonian_sample_state
function now can sample displaced Gaussian states. #248 -
Adds the function
hafnian_banded
to calculate the hafnian of a banded matrix. #246 -
Adds the functions
hermite_multidimensional_numba
andgrad_hermite_multidimensional_numba
to calculate renormalized multidimensional Hermite polynomials and its gradients using numba. #251 -
Adds the functions
mzgate
andgrad_mzgate
to calculate the Fock representation of the Mach-Zehnder gate and its gradients. #257 -
Adds the ability to calculate n-body photon number distributions using the function
n_body_marginals
. #253 -
Adds the ability to calculate cumulants and arbitrary expectation values of products of powers of photon numbers with the functions
photon_number_cumulant
andphoton_number_moment
respectively. #264 -
Adds support for calculating the permanent using the BBFG algorithm and changes this to the default method for calculating permanents. #267
-
Adds the ability to calculate click cumulants in threshold detection with the function
click_cumulant
. #264
-
Speeds up the calculation of photon number variances/covariances. #244
-
Updates documentation for the the
tor
function. #265 -
Numba methods for multidimensional hermite can now detect dtype automatically. #271
-
Corrects bug in the function
photon_number_covar
that gave incorrect results when the covariance between two modes with finite displacements was calculated. #264 -
Fixes a bug in
setup.py
that would cause the build to fail when using miniforge for M1 macs. #273 -
Updates the
samples.generate_hafnian_sample
function to renormalizing probabilities. #250
- Torontonians and approximations to the hafnian for non-negative matrices are no longer calculated in C++ using the Eigen software library. Instead, they are now calculated in pure Python using Numba. These changes have the nice result of making The Walrus compilable from source using only a C++ compiler. #262 #259.
This release contains contributions from (in alphabetical order):
Ali Asadi, Jake Bulmer, Timjan Kalajdzievski, Filippo Miatto, Nicolas Quesada, Yuan Yao
- Builds The Walrus binaries against an older version of NumPy, to avoid a breaking ABI change in NumPy 1.20. #240
This release contains contributions from (in alphabetical order):
Josh Izaac
-
Adds the function
random_banded_interferometer
to generate unitary matrices with a given bandwidth. #208 -
Adds the function
tvd_cutoff_bounds
to calculate bounds in the total variation distance between a Fock-truncated and an ideal GBS distribution. #210 -
Adds function for calculating threshold detection probabilities for Gaussian states with displacement. #220
-
Adds new functions
total_photon_number_distribution
andcharacteristic_function
to study properties of the total photon number distribution of ak
identical lossy squeezers. #230 -
Adds new functions
xxpp_to_xpxp
andxpxp_to_xxpp
in thesymplectic
module to swap the ordering of the quadrature operators in vectors and matrices. #237
-
The hafnians and loop hafnians of diagonal matrices are now calculated in polynomial time. #212
-
Refactors
setup.py
to avoid issues withCFLAGS
. #229 -
The
fidelity
function inquantum/gaussian_checks.py
is rewritten to add clarity. #226 -
Simplifies logic of
normal_ordered_expectation
by removing mutually cancellingnp.conj
. #228
-
Removes unnecessary
np.real_if_close
statements inquantum/fock_tensors.py
causing theprobabilities
to not be normalized. #215 -
Fixes the prefactor in
pure_state_amplitude
. #231
This release contains contributions from (in alphabetical order):
Jack Brown, Jake Bulmer, Rachel Chadwick, Stefano Paesani, Nicolas Quesada
-
Adds the function
find_classical_subsystem
that tries to find a subset of the modes with a classical covariance matrix. #193 -
Adds the functions
mean_number_of_clicks
andvariance_number_of_clicks
that calculate the first and second statistical moments of the total number of clicks in a Gaussian state centered at the origin. #195 -
Adds the module
decompositions
with the functionwilliamson
to find the Williamson decomposition of an even-size positive-semidefinite matrix. #200 -
Adds the
loop_hafnian_quad
function to the Python interface for converting double into quad, do the calculations in quad and then return a double. #201
-
Introduces a new faster and significantly more accurate algorithm to calculate power traces allowing to speed up the calculation of loop hafnians #199
-
The
quantum
module has been refactored and organized into sub-modules. Several functions have been renamed, while the old names are being deprecated. #197 -
Adds support for C++14 #202
-
pytest-randomly
is added to the test suite to improve testing and avoid stochastically failing tests. #205 -
Modifies the function
input_validation
to usenp.allclose
for checking the symmetry of the input matrices. #206 -
Modifies the function
_hafnian
to calculate efficiently loop hafnians of diagonal matrices. #206
-
Removes the redundant function
normal_ordered_complex_cov
. #194 -
Renames the function
mean_number_of_clicks
to bemean_number_of_click_graph
. #195
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Nicolas Quesada, Trevor Vincent
-
Adds a new algorithm for hafnians of matrices with low rank. #166
-
Adds a function to calculate the fidelity between two Gaussian quantum states. #169
-
Adds a new module,
thewalrus.random
, to generate random unitary, symplectic and covariance matrices. #169 -
Adds new functions
normal_ordered_expectation
,photon_number_expectation
andphoton_number_squared_expectation
inthewalrus.quantum
to calculate expectation values of products of normal ordered expressions and number operators and their squares. #175 -
Adds the function
hafnian_sample_graph_rank_one
inthewalrus.samples
to sample from rank-one adjacency matrices. #174
-
Adds parallelization support using Dask for
quantum.probabilities
. #161 -
Removes support for Python 3.5. #163
-
Changes in the interface and speed ups in the functions in the
thewalrus.fock_gradients
module. #164 -
Improves documentation of the multidimensional Hermite polynomials. #166
-
Improves speed of
fock_tensor
when the symplectic matrix passed is also orthogonal. #166
-
Fixes Numba decorated functions not rendering properly in the documentation. #173
-
Solves the issue with
quantum
andsamples
not being rendered in the documentation or the TOC. #173 -
Fix bug where quantum and samples were not showing up in the documentation. #182
- The functions in
thewalrus.fock_gradients
are now separated into functions for the gradients and the gates. Moreover, they are renamed, for instanceDgate
becomesdisplacement
and its gradient is nowgrad_displacement
. #164
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Josh Izaac, Filippo Miatto, Nicolas Quesada
-
Adds the ability to calculate the mean number of photons in a given mode of a Gaussian state. #148
-
Adds the ability to calculate the photon number distribution of a pure or mixed state using
generate_probabilities
. #152 -
Allows to update the photon number distribution when undergoing loss by using
update_probabilities_with_loss
. #152 -
Allows to update the photon number distribution when undergoing noise
update_probabilities_with_noise
. #153 -
Adds a brute force sampler
photon_number_sampler
that given a (multi-)mode photon number distribution generates photon number samples. #152 -
Adds the ability to perform the Autonne-Takagi decomposition of a complex-symmetric matrix using
autonne
from thesymplectic
module. #154
-
Improves the efficiency of Hermite polynomial calculation in
hermite_multidimensional.hpp
. #141 -
Implements parallelization with Dask for sampling from the Hafnian/Torontonian of a Gaussian state. #145
- Corrects the issue with hbar taking a default value when calling
state_vector
,pure_state_amplitude
, anddensity_matrix_element
#149
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Nicolas Quesada, Kieran Wilkinson
-
Introduces the renormalized hermite polynomials. These new polynomials improve the speed and accuracy of
thewalrus.quantum.state_vector
andthewalrus.quantum.density_matrix
and alsohafnian_batched
andhermite_multimensional
when called with the optional argumentrenorm=True
. #108 -
Adds functions for calculating the covariance for the photon number distribution of a Gaussian state including a function for the full covariance matrix. #137
-
Adds support for Python 3.8. #138
-
Updates the reference that should be used when citing The Walrus. #102
-
Updates and improves the speed and accuracy of
thewalrus.quantum.fock_tensor
. #107 -
Add OpenMP support to the repeated moment hafnian code. #120
-
Improves speed of the functions in
hermite_multidimensional.hpp
. #123 -
Improves speed of the functions in
thewalrus.fock_gradients
by doing calls to optimized functions inhermite_multidimensional.hpp
. #123 -
Further improves speed of the functions
thewalrus.fock_gradients
by writing explicit recursion relations for a given number of modes. #129 -
Adds the functions
find_scaling_adjacency_matrix_torontonian
andmean_number_of_clicks
that allow to fix the mean number of clicks when doing threshold detection sampling and allow to calculate the mean of clicks generated by a scaled adjacency matrix. #136
-
Corrects typos in the random number generation in the C++ unit tests. #118
-
Corrects typos in describing the repeated-moment algorithm of Kan in the documentation. #104
-
Removes paper.{md,pdf,bib} from the repository now that The Walrus paper is published in Journal of Open Source Software #106
-
Updates the S2gate to use the correct definition. #130
-
Corrects the issue with hbar taking a default value when calculating mu in the density matrix function [#134] (XanaduAI#134)
This release contains contributions from (in alphabetical order):
Theodor Isacsson, Josh Izaac, Filippo Miatto, Nicolas Quesada, Trevor Vincent, Kieran Wilkinson
-
Adds the function
thewalrus.quantum.fock_tensor
that returns the Fock space tensor corresponding to a Symplectic transformation in phase space. #90 -
Adds the
thewalrus.fock_gradients
module which provides the Fock representation of a set of continuous-variable universal gates in the Fock representation and their gradients. #96
-
Unifies return values of all symplectic gates in the
thewalrus.symplectic
module. #81 -
Removes unnecessary citations in the tutorials. #92
-
Improves the efficiency of the multidimensional Hermite polynomials implementation and simplifies a number of derived functions. #93
- Fixes a bug in the calculation of the state vector in
thewalrus.quantum.state_vector
. This bug was found and fixed while implementingthewalrus.quantum.fock_tensor
. #90
This release contains contributions from (in alphabetical order):
Josh Izaac, Nicolas Quesada
- Adds a symplectic module
symplectic
which allows easy access to symplectic transformations and covariance matrices of Gaussian states. #78
- Adds a quick reference section in the documentation. #75
- Solves issue #70 related to the index ordering in
thewalrus.quantum.density_matrix
.
This release contains contributions from (in alphabetical order):
Josh Izaac, Nicolas Quesada
-
Adds classical sampling of permanents of positive definite matrices in
csamples
. #61 -
The Walrus gallery with examples of nongaussian state preparations that can be studied using the functions from the
quantum
module. #55
- Updates the bibliography of the documentation with recently published articles. #51
-
Important bugfix in
quantum
. This bug was detected by running the tests intest_integration
. #48 -
Corrects the Makefile so that it uses the environment variable pointing to Eigen (if available). #58
-
Removes any reference to Fortran in the Makefile. #58
This release contains contributions from (in alphabetical order):
Luke Helt, Josh Izaac, Soran Jahangiri, Nicolas Quesada, Guillaume Thekkadath
-
Hafnian library has been renamed to The Walrus, and the low-level libhafnian C++ library renamed to
libwalrus
. #34 -
Added a seed function
thewalrus.samples.seed
, in order to make the sampling algorithms deterministic for testing purposes. #29 -
Added support for the batched hafnian;
hafnian_batched
(in Python) andlibwalrus::hermite_multidimensional_cpp
(in C++). This is a newly added algorithm that allows a batch of photon number statistics to be computed for a given quantum Gaussian state. #21 -
Adds the ability to sample from Gaussian states with finite means. #25
-
Permanent Fortran code was ported to C++, with improvements including support for quadruple precision and summation using the
fsum
algorithm. #20 -
Reorganization of the repository structure; C++ source code folder has been renamed from
src
toinclude
, C++ tests have been moved into their own top-level directorytests
, and thehafnian/lib
subpackage has been removed in favour of a top-levelthewalrus/libwalrus.so
module. #34 -
Added additional references to the bibliography #30
-
Adds documentation related to permanents, sampling states with nonzero displacement, sampling of classical states, and multidimensional Hermite polynomials and batched hafnians. #27
-
Simplifies the hafnian sampling functions #25
-
Test improvements, including replacing custom tolerance checks with
np.allclose()
. #23
This release contains contributions from (in alphabetical order):
Brajesh Gupt, Josh Izaac, Nicolas Quesada
-
Added two new sampling functions in
hafnian.sample
, allowing efficient sampling from classical Gaussian states:hafnian_sample_classical_state
torontonian_sample_classical_state
-
Added functions to calculate the probability amplitudes directly for pure states:
pure_state_amplitude
state_vector
-
Added utility functions to check the validity of covariance matrices:
is_valid_cov
is_pure_cov
is_classical_cov
- All functions in the
quantum
package now take as arguments xp-covariance matrices and vectors of means for consistency.
This release contains contributions from (in alphabetical order):
Nicolas Quesada
-
Added a new sampling submodule
hafnian.sample
, allowing sampling from the underlying hafnian/Torontonian distribution of graphs/Gaussian states -
Documentation overhaul: now contains some of the best and most up-to-date information about hafnians, loop hafnians, and Torontonians
-
C++ library has been significantly improved, tested, and refactored
-
Ported the
hafnian_approx.F90
Fortran file to C++ -
The Torontonian function is now parallelized via OpenMP
-
Tests and the C++ header library have been refactored
-
Addition of new C++ tests using Googletest
-
C++ library is now documented via Doxygen; this is integrated directly into Sphinx
This release contains contributions from (in alphabetical order):
Brajesh Gupt, Josh Izaac, Nicolas Quesada