The MZgate is the natural gate to decompose an arbitrary linear optical interferometer into single- and two-mode passive gates. Currently, interferometers are decomposed into MZgates and Rgates and then internally the MZgate is decomposed into two BSgates and two more rotation gates, leading to an increase by a factor of two in terms of the number of two mode gates needed to decompose and apply a given interferometer, making the process potentially less than optimal.
With the recent addition (cf. https://github.com/XanaduAI/thewalrus/pull/256) of the Fock representation of the MZgate and its gradient in the fock_gradients module of the development version of The Walrus it becomes possible to apply this gate directly in the Fock backends.
To implement these changes one needs to:
Import the relevant functions from The Walrus and add appropriate methods in the Fock and TensorFlow backends. For development and testing purposes this will require to install the development version of The Walrus.
Exactly like the BSgate, the MZgate has selection rules that can be exploited to update the relevant tensor representing a pure or mixed quantum state. This rules have already been implemented for the BSgate and are furthermore described in Eqs. 78 and 79 of this reference: https://quantum-journal.org/papers/q-2020-11-30-366/pdf/
Change the method/functions from MZgate to make sure this gate is no longer decomposed but it is instead applied natively to the qumodes.
It would also be nice to have some benchmarking for a few modes studying any possible efficiency benefits when this gate is implemented natively.
The
MZgate
is the natural gate to decompose an arbitrary linear optical interferometer into single- and two-mode passive gates. Currently, interferometers are decomposed intoMZgate
s andRgate
s and then internally theMZgate
is decomposed into twoBSgate
s and two more rotation gates, leading to an increase by a factor of two in terms of the number of two mode gates needed to decompose and apply a given interferometer, making the process potentially less than optimal.With the recent addition (cf. https://github.com/XanaduAI/thewalrus/pull/256) of the Fock representation of the
MZgate
and its gradient in thefock_gradients
module of the development version of The Walrus it becomes possible to apply this gate directly in the Fock backends.To implement these changes one needs to:
BSgate
, theMZgate
has selection rules that can be exploited to update the relevant tensor representing a pure or mixed quantum state. This rules have already been implemented for theBSgate
and are furthermore described in Eqs. 78 and 79 of this reference: https://quantum-journal.org/papers/q-2020-11-30-366/pdf/MZgate
to make sure this gate is no longer decomposed but it is instead applied natively to the qumodes.It would also be nice to have some benchmarking for a few modes studying any possible efficiency benefits when this gate is implemented natively.