QuantumBFS / FLOYao.jl

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

Add support for arbitrary observables #6

Open jlbosse opened 2 years ago

jlbosse commented 2 years ago

Currently only observables that are squares of Majoranas are supported in expect(). But generally, it is possible to calculate $⟨ψ|O|ψ⟩$ for arbitrary operators $O$ of the form $O = ∏_i L_i = ∏_i (∑j O{ij} γj)$ by calculating the pfaffian of the two-point matrix $M{ij} = ⟨ψ|L_i L_j|ψ⟩$.

jlbosse commented 1 year ago

By linearity of the expectation value this means arbitrary observables can be computed, as long as they are expressed as sums of Majorana-strings. But if the observables are given in above form the computation is much more efficient, so the question will be how to best decompose an arbitrary observable