XanaduAI / strawberryfields

Strawberry Fields is a full-stack Python library for designing, simulating, and optimizing continuous variable (CV) quantum optical circuits.
https://strawberryfields.ai
Apache License 2.0
747 stars 186 forks source link

Direct implementation of Gaussian gates #578

Open nquesada opened 3 years ago

nquesada commented 3 years ago

Given the results from https://quantum-journal.org/papers/q-2020-11-30-366/ it should be possible to implement natively in Fock space any Gaussian gate. Thus for example we should not need to decompose the MZgate, CXgate, CZgate and Pgate . This should be bring the speed of all the gates to be fairly fast and comparable to the Sgate and BSgate and S2gate for 1 and 2 modes respectively. Two accomplish this two steps are needed:

  1. Add in the thewalrus.fock_gradients the relevant recursion for calculation of the gradients and the gates themselves.
  2. Update the piping in SF so that these gates are now imported from thewalrus and used by the tf and fock backends.