• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Qiskit / qiskit / 13532095632
88%

Build:
DEFAULT BRANCH: main
Ran 25 Feb 2025 10:44PM UTC
Jobs 1
Files 894
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

25 Feb 2025 09:35PM UTC coverage: 87.988% (+0.01%) from 87.976%
13532095632

push

github

web-flow
Add `ContractIdleWiresInControlFlow` optimisation pass (#13779)

* Add `ContractIdleWiresInControlFlow` optimisation pass

This transpiler pass removes data dependencies on idle qubits from
control-flow operations.  For example, given a circuit such as::

    from qiskit.circuit import QuantumCircuit

    qc = QuantumCircuit(1, 1)
    qc.x(0)
    with qc.if_test((qc.clbits[0], True)):
        qc.x(0)
        qc.x(0)
    qc.x(0)

the current optimisation passes will collapse the inner control-flow
block to the identity, but the qubit dependency will remain, preventing
the outer two X gates from being cancelled.  This pass removes the
now-spurious dependency, making it possible to detect and remove the two
X gates in a follow-up loop iteration.

As an accidental side-effect of their algorithms, the control-flow-aware
routing passes currently do this when they run.  This aims to move the
logic into a suitable place to run before routing (so the spurious
dependency never arises in routing in the first place) and in the
low-level optimisation stage.

The aim of this pass is also to centralise the logic, so when the
addition of the new `box` scope with different semantics around whether
a wire is truly idle in the box or not, the routers aren't accidentally
breaking them, and it's clearer when the modifications happen.

* Handle `None` return from `control_flow_op_nodes`

* Remove dead argument

51 of 51 new or added lines in 3 files covered. (100.0%)

6 existing lines in 1 file now uncovered.

77560 of 88148 relevant lines covered (87.99%)

337643.83 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
6
91.98
-1.0% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 13532095632.1 25 Feb 2025 10:44PM UTC 894
87.99
GitHub Action Run
Source Files on build 13532095632
  • Tree
  • List 894
  • Changed 68
  • Source Changed 2
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13532095632
  • ddb76703 on github
  • Prev Build on main (#13512719904)
  • Next Build on main (#13533495034)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc