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

Qiskit / qiskit / 34145687826
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: fix-issue-16688
DEFAULT BRANCH: main
Ran 07 Sep 2026 05:29PM UTC
Jobs 1
Files 963
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

07 Sep 2026 04:59PM UTC coverage: 87.864% (-0.001%) from 87.865%
34145687826

push

github

web-flow
Apply to_instruction parameter_map to definition.global_phase (#16234)

* Fix to_instruction(parameter_map) for definition.global_phase

`QuantumCircuit.to_instruction(parameter_map=...)` applied the parameter
map to the instruction's `params` and to the gate parameters inside its
`definition`, but not to `definition.global_phase`.  This could leave an
unbound `Parameter` hidden in the definition even though the
instruction's public `params` appeared fully bound; downstream consumers
such as `Operator(...)` then failed with an unbound-parameter error.

The sibling `circuit_to_gate` was already correct: it constructed the
definition circuit from the *substituted* `target = circuit.assign_-
parameters(parameter_dict)` rather than from the original `circuit`.
This fix changes `circuit_to_instruction` to do the same for
`global_phase`, matching the behaviour of `circuit_to_gate`.

Fixes #16181

* Simplify prose

* Add complete `Operator` assertion

We may as well assert, rather than having a no-op "doesn't raise"
statement.

---------

Co-authored-by: gkneighb <gkneighb@users.noreply.github.com>
Co-authored-by: Jake Lishman <jake.lishman@ibm.com>

2 of 2 new or added lines in 1 file covered. (100.0%)

16 existing lines in 3 files now uncovered.

116732 of 132856 relevant lines covered (87.86%)

983765.39 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
97.16
-0.47% crates/qasm2/src/parse.rs
3
92.03
1.03% crates/qasm2/src/lex.rs
1
90.31
0.0% crates/circuit/src/parameter/parameter_expression.rs
Jobs
ID Job ID Ran Files Coverage
1 34145687826.1 07 Sep 2026 05:29PM UTC 963
87.86
GitHub Action Run
Source Files on build 34145687826
  • Tree
  • List 963
  • Changed 4
  • Source Changed 1
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34145687826
  • 5f16fdb7 on github
  • Prev Build on gh-readonly-queue/main/pr-16799-3f5f34377c95949ebe1de23cb618b521ab657278 (#34144981457)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc