[ANN] FLOYao.jl - Fermionic linear optics for Yao.jl


Is a Yao.jl backend to efficiently simulated fermionic linear optics (FLO) circuits in based on Classical simulation of noninteracting-fermion quantum circuits and Disorder-assisted error correction in Majorana chains.

FLO circuits are a class of quantum circuits that are closely related to non-interacting fermions and can be efficiently simulated on classical computers, similar to the way Clifford circuits can be efficiently classically simulated, as is done in YaoClifford.jl.


The goal of FLOYao is that if you have code written in Yao.jl that only uses FLO gates and other primitives that are efficiently simulatable in polynomial time and space, that you can simply replace your AbstractArrayReg with a MajoranaReg and run exactly the same simulation, with the same code but exponentially faster.

Simple example

Here is a simple example, to show how seamlessly FLOYao.jl takes your existing Yao.jl code and gives you immediate speed-ups:

First import FLOYao and Yao

julia> using FLOYao, Yao

then create a circuit

julia> nq = 4
julia> θ = π/8
julia> circuit = chain(nq)
julia> push!(circuit, put(nq, 3=>Rz(0.5)))   # all of the following are FLO gates
julia> xxg1 = kron(nq, 1 => X, 2 => X)
julia> push!(circuit, rot(xxg1, θ))  
julia> xxg2 = kron(nq, 2 => X, 3 => Z, 4 => X)
julia> push!(circuit, rot(xxg2, θ)) 

and create a FLO state, pipe it through the circuit and measure the result

julia> FLOYao.zero_state(nq) |> circuit |> measure!

Note, that the only difference to using a normal ArrayReg from Yao.jl is the usage of FLOYao.zero_state() instead of zero_state().