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

Qiskit / qiskit / 13289338434
88%

Build:
DEFAULT BRANCH: main
Ran 12 Feb 2025 04:12PM UTC
Jobs 1
Files 896
Run time 324min
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

12 Feb 2025 03:19PM UTC coverage: 88.313% (-0.007%) from 88.32%
13289338434

push

github

web-flow
Perform BarrierBeforeFinalMeasurements analysis in parallel (#13411)

* Use OnceLock instead of OnceCell

OnceLock is a thread-safe version of OnceCell that enables us to use
PackedInstruction from a threaded environment. There is some overhead
associated with this, primarily in memory as the OnceLock is a larger
type than a OnceCell. But the tradeoff is worth it to start leverage
multithreading for circuits.

Fixes #13219

* Update twirling too

* Perform BarrierBeforeFinalMeasurements analysis in paralle

With #13410 removing the non-threadsafe structure from our circuit
representation we're now able to read and iterate over a DAGCircuit from
multiple threads. This commit is the first small piece doing this, it
moves the analysis portion of the BarrierBeforeFinalMeasurements pass to
execure in parallel. The pass checks every node to ensure all it's
decendents are either a measure or a barrier before reaching the end of
the circuit. This commit iterates over all the nodes and does the check
in parallel.

* Remove allocation for node scan

* Refactor pass to optimize search and set parallel threshold

This commit updates the logic in the pass to simplify the search
algorithm and improve it's overall efficiency. Previously the pass would
search the entire dag for all barrier and measurements and then did a
BFS from each found node to check that all descendants are either
barriers or measurements. Then with the set of nodes matching that
condition a full topological sort of the dag was run, then the
topologically ordered nodes were filtered for the matching set. That
sorted set is then used for filtering

This commit refactors this to do a reverse search from the output
nodes which reduces the complexity of the algorithm. This new algorithm
is also conducive for parallel execution because it does a search
starting from each qubit's output node. Doing a test with a quantum
volume circuit from 10 to 1000 qubits which scales linearly in depth
and number of... (continued)

67 of 83 new or added lines in 2 files covered. (80.72%)

9 existing lines in 3 files now uncovered.

78901 of 89342 relevant lines covered (88.31%)

350083.99 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
87.62
-0.1% crates/circuit/src/dag_circuit.rs
10
90.74
-7.62% crates/accelerate/src/barrier_before_final_measurement.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
91.77
-0.04% crates/accelerate/src/two_qubit_decompose.rs
3
93.29
-0.11% crates/accelerate/src/unitary_synthesis.rs
5
92.48
-0.5% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 13289338434.1 12 Feb 2025 04:12PM UTC 896
88.31
GitHub Action Run
Source Files on build 13289338434
  • Tree
  • List 896
  • Changed 66
  • Source Changed 2
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #13289338434
  • 9ca951c8 on github
  • Prev Build on gh-readonly-queue/main/pr-13765-32eae98a2282fdd056a84b12836b124e1726b843 (#13286863583)
  • Next Build on main (#13291877352)
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