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

Qiskit / qiskit / 24256185111
87%

Build:
DEFAULT BRANCH: main
Ran 10 Apr 2026 06:15PM UTC
Jobs 1
Files 932
Run time 3min
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.482% (+0.01%) from 87.472%
24256185111

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%)

2 existing lines in 1 file now uncovered.

104578 of 119542 relevant lines covered (87.48%)

1022322.22 hits per line

Coverage Regressions

Lines Coverage ∆ File
2
92.54
1.03% crates/qasm2/src/lex.rs
Jobs
ID Job ID Ran Files Coverage
1 24256185111.1 10 Apr 2026 06:15PM UTC 932
87.48
GitHub Action Run
Source Files on build 24256185111
  • Tree
  • List 932
  • Changed 6
  • Source Changed 2
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24256185111
  • 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