Commit ee0fc7f
authored
This avoids the measurement-based uncomputation in the intrinsic `AND`
operation in favor of just using `CCNOT` when decomposing multiple
controls on `Std.Intrinsic` gates. This leaves optimization of resulting
QIR ccx to the program author or the backend that receives the QIR. This
makes the behavior of most code more predictable and straightforward,
and avoids special (often expensive) adaptive behavior being triggered
automatically/enexpectedly by use of multi-controlled gates.
Other libraries still use the existing `AND` with it's alternate
approach, such as the arithmetic libraries, which keeps the behavior and
resource estimates of those more advanced programs largely the same.
1 parent 4d196c1 commit ee0fc7f
File tree
5 files changed
+126
-281
lines changed- library/std/src/Std
- source
- compiler
- qsc_qasm/src/tests/statement/pragma
- qsc_rca/src/tests
- resource_estimator/src/counts
5 files changed
+126
-281
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
0 commit comments