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

Qiskit / qiskit / 24255087278
87%
main: 87%

Build:
Build:
LAST BUILD BRANCH: update-version-history-table-qpy
DEFAULT BRANCH: main
Ran 10 Apr 2026 05:46PM UTC
Jobs 1
Files 932
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

10 Apr 2026 05:17PM UTC coverage: 87.46% (-0.01%) from 87.472%
24255087278

push

github

web-flow
Fix `TemplateOptimization` dropping the `global_phase` on substitution (#15943)

* fix(transpiler): TemplateOptimization drops circuit global_phase on substitution

circuit_to_dagdependency did not copy global_phase when converting a
template QuantumCircuit to DAGDependency, so template phases were lost
before matching. TemplateSubstitution.run_dag_opt also constructed a
new DAGDependency for the optimised output without inheriting the
original circuit's global_phase, resetting it to zero whenever at
least one substitution was applied.

Fixed by copying global_phase in circuit_to_dagdependency and seeding
dag_dep_opt.global_phase from the circuit DAG at construction time.
Also added the per-match phase subtraction (Fix 3) for when templates
with nonzero global_phase become accepted via the identity check fix
in #14538.

Fixes #14537.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(transpiler): TemplateOptimization drops circuit global_phase on substitution

circuit_to_dagdependency did not copy global_phase when converting a
template QuantumCircuit to DAGDependency, so template phases were lost
before matching. TemplateSubstitution.run_dag_opt also constructed a
new DAGDependency for the optimised output without inheriting the
original circuit's global_phase, resetting it to zero whenever at
least one substitution was applied. Additionally, when a template
carries a nonzero global_phase phi_T (gate content implements
e^{-i*phi_T} * I while the full operator is I), the per-match phase
contribution was not being subtracted from the output circuit.

Fixes #14537.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* style: black reformat test_template_matching.py

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: use RST hyperlink for issue reference in release note

The :issue: role is not available in this project's Sphinx config.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test(transpiler): ... (continued)

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

23 existing lines in 4 files now uncovered.

104552 of 119542 relevant lines covered (87.46%)

1019463.17 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
96.68
-0.95% crates/qasm2/src/parse.rs
5
73.97
-0.08% crates/circuit/src/parameter/symbol_expr.rs
5
91.52
0.0% crates/qasm2/src/lex.rs
1
93.82
-0.24% crates/qasm2/src/expr.rs
Jobs
ID Job ID Ran Files Coverage
1 24255087278.1 10 Apr 2026 05:46PM UTC 932
87.46
GitHub Action Run
Source Files on build 24255087278
  • Tree
  • List 932
  • Changed 7
  • Source Changed 2
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24255087278
  • f8e543ff on github
  • Prev Build on gh-readonly-queue/main/pr-15975-a2c1136e6d75f5f40379a3806d51b048b0602525 (#24251860005)
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

© 2026 Coveralls, Inc