You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #98, I added rustworkx as a backend for the graph state simulator, but sadly, the performance improvement was subtle.
I think this is because most of the optimization process is done in pattern.py, not in GraphState.
Refactoring the code might improve the performance. For example, the following code searches all the command sequences to find the measurement command, but we can make a list of indices where the measurement commands are stored during the pattern standardization and save it as an attribute in the Pattern class.
In #98, I added
rustworkx
as a backend for the graph state simulator, but sadly, the performance improvement was subtle.I think this is because most of the optimization process is done in
pattern.py
, not inGraphState
.Refactoring the code might improve the performance. For example, the following code searches all the command sequences to find the measurement command, but we can make a list of indices where the measurement commands are stored during the pattern standardization and save it as an attribute in the
Pattern
class.graphix/graphix/pattern.py
Lines 1792 to 1801 in 8313d3c
It also scans the whole command sequence twice, which looks redundant.
graphix/graphix/pattern.py
Lines 1806 to 1808 in 8313d3c
Another suggestion is to use JIT compiler (e.g. numba, jax). Wrapping frequently called functions by jit may improve performance.
The text was updated successfully, but these errors were encountered: