QuantumBFS / FLOYao.jl

A fermionic linear optics simulator backend for Yao.jl
Apache License 2.0
13 stars 0 forks source link

Make backprop faster #8

Open jlbosse opened 1 year ago

jlbosse commented 1 year ago

Currently, the function expect_g(op::AbstractAdd, reg::MajoaranaReg) takes time O(n^3) because of the full matrix-matrix product. It may be possible to speed this up by not instantiating the full matrix form of op in the Majorana basis.

jlbosse commented 1 year ago

Related: expect can probably also be made faster if I find a way to create the majoranasquares matrix faster by e.g. collecting all the terms first and then creating the sparse matrix from (I, J, V) https://docs.julialang.org/en/v1/stdlib/SparseArrays/#Sparse-Vector-and-Matrix-Constructors?

jlbosse commented 11 months ago

https://github.com/QuantumBFS/FLOYao.jl/pull/10 made significant progress on this. I should check if the big-O scaling is the correct one now and close this if yes