XanaduAI / thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.
https://the-walrus.readthedocs.io
Apache License 2.0
101 stars 55 forks source link

Convenience functions to change ordering of quadratures #232

Closed nquesada closed 3 years ago

nquesada commented 3 years ago

Functions to switch the ordering of the vector of means and covariance matrix from xxpp to xpxp should be provided in the quantum.conversions module. These functions should operate by permuting the elements of the array using fancy indexing and not by multiplying by permutation matrices.

josh146 commented 3 years ago

using fancy indexing and not by multiplying by permutation matrices.

depending how many times the changebasis function was called, this might actually cause a huge saving!