QuantumBFS/Yao.jl

automatic diffirentaion through circuit with conditional gate

rezah opened this issue · 2 comments

rezah commented

It is possible to do automatic differentiation through a circuit with conditional gates. I mean variationally optimize the circuit with gates that are applied based on themed-circuit measurement.

It is hard to do it directly. Try using lower level interfaces like apply and mat. Their backward rules are ported to ChainRules. Maybe you can try writing the loss using Zygote.

Please check this issues: #323