|
Ran
|
Jobs
1
|
Files
124
|
Run time
1min
|
Badge
README BADGES
|
push
github
fix: visit DAG nodes in circuit order in passes that rebuild the circuit (#401) (#402) `F2QSynthesis` walked the input DAG with `op_nodes()`, which returns the nodes in storage order, not in the order of their dependencies. The two agree for a circuit built by appending, but not after a pass has replaced a node by a sub-circuit (`substitute_node_with_dag`): the replacement is stored after everything already there, so the factors of two successive replacements end up interleaved. The output is then a well-formed circuit for a different unitary, since the gates of neighbouring replacements share qubits and do not commute. Nothing fails; the result is just wrong. `RelabelModes` and `QDriftTrotterization` rebuild their output node by node in the same way and had the same problem. For qDRIFT the occupation tracking behind `filter_trivial` additionally depends on seeing `InitializeModes` and `OrbitalRotation` gates in the order they act. All three now iterate with `topological_op_nodes()`. The passes that only substitute nodes in place (`FermionicTrotterization`) are safe with either order, and the iteration that merely gathers excitations for the `RelabelModes` permutation model is order-insensitive, so both are left alone. The regression tests trotterize evolutions in fermionic space, so each is replaced by several gates. For the synthesis they compare the lowered circuit with the ordered product of the exact group evolutions (off by about 0.26 without the change, 1e-16 with it); for `RelabelModes` and `QDriftTrotterization` they check that the circuit order survives the pass. They do not involve any of the orbital-rotation machinery that surfaced this: any pass that substitutes nodes could hit it. (cherry picked from commit 196301357) Co-authored-by: Max Rossmannek <21973473+mrossinek@users.noreply.github.com> Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
3 of 3 new or added lines in 3 files covered. (100.0%)
1 existing line in 1 file now uncovered.13950 of 14205 relevant lines covered (98.2%)
460128.93 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
99.52
|
-0.48% | crates/core/src/mappers/qk_obs.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 40322929403.1 | 124 |
98.2
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|