Closed nquesada closed 4 years ago
How should we determine whether this other approach is faster, more efficient, etc?
We should do some benchmarking and profiling 🙂
For what it's worth, I think it would be a good idea to have both circuit validations present in Strawberry Fields (use the Gaussian compiler for Gaussian circuits, and the NX approach for non-Gaussian circuits).
I expect the GI algorithm we are using in NX to be quite fast for the relatively small graphs representing existing chips, so would be curious regarding benchmarking. This would obviously change as the number of modes increases.
Closed via https://github.com/XanaduAI/strawberryfields/pull/392
For an 8 mode circuit X8 takes ~ 174 ms while Xunitary takes ~ 4.27 ms.
:rocket:
Currently many programs involving just Gaussian operations and Measurements are compiled by turning them into directed acyclic graphs. A possibly better way to approach this problem is to use the Gaussian compiler to get the Symplectic matrix representing the circuit and then doing Bloch-Messiah+Interferometer decompositions. The computations required for this latter approach are polynomial in the number of modes and fairly straightforward while also taking advantage of the Gaussianity of the circuit. On the other hand checking if two DAGs are the same seems more involved.