XanaduAI / thewalrus

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

Optional arguments in `passive_transformation` #327

Open thisac opened 2 years ago

thisac commented 2 years ago

Before posting a feature request

Feature details

Both arguments mu and cov are required when calling thewalrus.symplectic.passive_transformation, even when only one of them is required. For example, to calculate the transformation for an covariance matrix only, a dummy-mu still needs to be created and passed.

dummy_mu = np.zeros([len(cov)])
_, cov = passive_transformation(dummy_mu, cov, T))

It would be good to be able to optionally pass the mu argument in the above case.

Implementation

No response

How important would you say this feature is?

1: Not important. Would be nice to have.

Additional information

No response