You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the modifiers in QC and QCO enforce that their bodies contain a single unitary operation followed by a yield operation. This has led to more complications than benefits. The condition should be dropped altogether, and arbitrarily many operations (unitary as well as, e.g., arith.constants), should be legal.
Acceptance criteria
The condition is dropped.
All relevant canonicalization patterns are updated accordingly.
The translations from qc::QuantumComputation and OpenQASM to QC are updated accordingly. In particular, qc::CompoundOperations inside modifiers can be translated, and the test case mentioned in ✨ Translate qc::IfElseOperation to QC #1717 (comment) is added.
Description
Currently, the modifiers in QC and QCO enforce that their bodies contain a single unitary operation followed by a
yieldoperation. This has led to more complications than benefits. The condition should be dropped altogether, and arbitrarily many operations (unitary as well as, e.g.,arith.constants), should be legal.Acceptance criteria
qc::QuantumComputationand OpenQASM to QC are updated accordingly. In particular,qc::CompoundOperations inside modifiers can be translated, and the test case mentioned in ✨ Translateqc::IfElseOperationto QC #1717 (comment) is added.