QuantumBFS / YaoLang.jl

YaoLang: The next DSL for Yao and quantum programs.
https://yaoquantum.org/YaoLang.jl/dev/
Apache License 2.0
31 stars 6 forks source link

support batch circuit execution #21

Open Roger-luo opened 4 years ago

Roger-luo commented 4 years ago

this would allow the compiler to generate a batch of quantum operations on a batch of registers, via a new keyward

for id in @eachregister
    if configs[id] == 1
           1 => X
    end
end
Roger-luo commented 4 years ago

A better way could be

@eachregister id begin
    if configs[id] == 1
           1 => X
    end
end
Roger-luo commented 4 years ago

actually @register id <expr> might be better