Commit 342bcc3
authored
Fix sign error in EjectFullW and silent merge error in eject_z_test.py (#691)
- Slipped by because of a silent merge conflict overwriting updated methods with old ones
- The old methods were calling the new "canonicalize_up_to_measurement_phase" with the wrong number of arguments, triggering a type error, triggering a path expecting a type error for a *different reason* (i.e. non-unitary operations in the circuit)
- Removed the non-unitary fallback path and renamed the method to make it clear only measurement-implies-terminal circuits were expected
- Simplified the W-over-partial-W derivation
- Fixed false-positive assertions that were now correctly failing
- Added a test that fails for the old behavior but not for the new behavior
Fixes #6841 parent 2beb783 commit 342bcc3
3 files changed
+28
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| |||
205 | 204 | | |
206 | 205 | | |
207 | 206 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
217 | 212 | | |
218 | 213 | | |
219 | 214 | | |
| |||
222 | 217 | | |
223 | 218 | | |
224 | 219 | | |
225 | | - | |
| 220 | + | |
226 | 221 | | |
227 | 222 | | |
228 | 223 | | |
| |||
314 | 309 | | |
315 | 310 | | |
316 | 311 | | |
317 | | - | |
| 312 | + | |
318 | 313 | | |
319 | 314 | | |
320 | 315 | | |
321 | 316 | | |
322 | 317 | | |
323 | 318 | | |
324 | 319 | | |
325 | | - | |
326 | | - | |
| 320 | + | |
| 321 | + | |
327 | 322 | | |
328 | 323 | | |
329 | 324 | | |
| |||
333 | 328 | | |
334 | 329 | | |
335 | 330 | | |
336 | | - | |
| 331 | + | |
337 | 332 | | |
338 | 333 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
258 | 258 | | |
259 | 259 | | |
260 | 260 | | |
261 | | - | |
| 261 | + | |
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| |||
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
276 | 287 | | |
277 | 288 | | |
278 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | | - | |
26 | 24 | | |
27 | 25 | | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
| 30 | + | |
33 | 31 | | |
34 | 32 | | |
35 | 33 | | |
| |||
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
| 51 | + | |
54 | 52 | | |
55 | 53 | | |
56 | 54 | | |
| |||
105 | 103 | | |
106 | 104 | | |
107 | 105 | | |
108 | | - | |
| 106 | + | |
109 | 107 | | |
110 | 108 | | |
0 commit comments