latticesurgery-com / lattice-surgery-compiler

Lattice surgery quantum error correction compiler
https://latticesurgery.com
GNU Lesser General Public License v2.1
42 stars 6 forks source link

[Feature Request] Speed up simulation by removing patches that are not on the lattice from the state vector #138

Closed gwwatkin closed 2 years ago

gwwatkin commented 2 years ago

Issue Description

Simulation is a critical bottleneck right now and it is because of simulating useless patches.

Right now simulation of longer circuits happens at a much slower speed because every patch that is ever on the lattice contributes to one big state vector. In particular state vector size grows exponentially with y-depth and t-depth, because each of these operations is associated with an new patch that contributes an extra qubit in the logical lattice computation, doubling it's size.

Even these patches aren't contributing to the computation for nearly the whole length of the computation. This makes simulating circuits of just a couple lines infeasible without y operator removal.

Addressing this issue will greatly expand the set of circuits we can test.

Proposed Solution

Here are some possible solutions:

alexnguyenn commented 2 years ago

@isolatedinformation I think your opinion would be helpful here

isolatedinformation commented 2 years ago