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

Qiskit / qiskit / 16277835384
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: substitute_pi4_rotations
DEFAULT BRANCH: main
Ran 14 Jul 2025 09:35PM UTC
Jobs 1
Files 830
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

14 Jul 2025 09:04PM UTC coverage: 87.755% (-0.007%) from 87.762%
16277835384

push

github

web-flow
Add VF2Layout standalone function to the C API (#14668)

* Add VF2Layout standalone function to the C API

This commit is the first transpiler pass that is part of the C API. VF2
layout is already rust native and it doesn't require Python in the
execution of the pass. As the first transpiler pass in the C API this
introduces some new infrastructure to support this. The goal of the
standalone function is not so much for pass manager composibility
but to have the one off execution of passes This is the difference
between in python doing:

VF2Layout(...)(qc)

and

VF2Layout(...).run(dag)

but the medium term goal is to use the standalone functions as
validation that we can run a pass from C without a runtime Python
dependency. The eventual goal is to expose a full path "compile()"
or "transpile()" function.

This starts the naming convention for standalone passes that process a
CircuitData. These functions will be of the form:

qk_transpiler_pass_standalone_pass_name

This will be differentiated from pass functions that work with a
DAGCircuit, when we have the DAGCircuit exposed to C. Those will be
of the form:

qk_transpiler_pass_name (e.g. qk_transpiler_vf2_layout)

or

qk_transpiler_pass_pass_name (e.g. qk_transpiler_pass_vf2_layout)

we can decide on the specific dag naming convention when we start to
work on that.

To faciliate running the pass without Python there is small tweak needed
to the CircuitData -> DAGCircuit conversion path. The transpiler passes
only has a borrowed CircuitData since it is provided as a pointer from C
and the interface for the conversion needed to be inverted so that it
works with references instead of owned objects. Using owned objects is
fine from Python but isn't viable for Rust callers.

* Fix typo in docs config

* Use Rust native bit objects for circuit_to_dag instead of PyObject

* Apply suggestions from code review

Co-authored-by: Kevin Hartman <kevin@hart.mn>

* Update docs/cdoc/qk-transpiler-passes.rst

Co-auth... (continued)

91 of 106 new or added lines in 5 files covered. (85.85%)

17 existing lines in 4 files now uncovered.

81540 of 92918 relevant lines covered (87.75%)

548102.88 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
96.61
-0.73% crates/transpiler/src/passes/basis_translator/compose_transforms.rs
2
85.51
0.02% crates/circuit/src/dag_circuit.rs
12
82.35
crates/cext/src/transpiler/passes/vf2.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
93.37
0.0% crates/transpiler/src/passes/unitary_synthesis.rs
2
85.51
0.02% crates/circuit/src/dag_circuit.rs
2
92.01
0.52% crates/qasm2/src/lex.rs
12
96.62
-0.47% crates/qasm2/src/parse.rs
Jobs
ID Job ID Ran Files Coverage
1 16277835384.1 14 Jul 2025 09:35PM UTC 830
87.75
GitHub Action Run
Source Files on build 16277835384
  • Tree
  • List 830
  • Changed 9
  • Source Changed 5
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16277835384
  • 056c6413 on github
  • Prev Build on gh-readonly-queue/main/pr-14702-925f1441bac88b6343f7da7c2abd109c711bbcce (#16240689462)
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