Skip to content

Commit d7ea77c

Browse files
committed
Improve description of CtrlOp
1 parent 7167bdd commit d7ea77c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mlir/include/mlir/Dialect/QC/IR/QCOps.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,10 @@ def CtrlOp : QCOp<"ctrl",
937937
A modifier operation that adds control qubits to the unitary operation
938938
defined in its body region. The controlled operation applies the
939939
underlying unitary only when all control qubits are in the |1⟩ state.
940-
The control qubits are not modified by this operation.
940+
941+
Note that control qubits are logically unmodified by this operation in that
942+
their quantum state remains unchanged. However, the `controls` argument
943+
is marked with `MemWrite` to ensure correct dependency tracking in MLIR.
941944

942945
Example:
943946
```mlir

0 commit comments

Comments
 (0)