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

Qiskit / qiskit-ibm-runtime / 29774670093
88%
main: 88%

Build:
Build:
LAST BUILD BRANCH: gh-readonly-queue/main/pr-3068-b48fe953bd6a3322f58a83b2769b85191a2e10f0
DEFAULT BRANCH: main
Ran 20 Jul 2026 08:09PM UTC
Jobs 8
Files 326
Run time 1min
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

20 Jul 2026 08:05PM UTC coverage: 87.579% (+0.005%) from 87.574%
29774670093

push

github

web-flow
Clear `QuantumCircuit.metadata` in wrapper sampler (#3064)

### Summary

Currently, the wrapper sampler converts circuit metadata into
passthrough data when calling `prepare`. However, said metadata is not
cleared on the`QuantumCircuit` instances that are submitted to the
`Executor`. Because of this, an example such as:
```
circuit = QuantumCircuit(backend.num_qubits)
circuit.metadata['np_type'] = np.int64(4)

for q in range(circuit.num_qubits):
    circuit.x(qubit=q)
circuit.measure_all()

pm = generate_preset_pass_manager(backend=backend, optimization_level=0)
isa_circuit = pm.run(circuit)

sampler = SamplerV2(backend)
job = sampler.run([circuit])
job.job_id()
```
will error with `TypeError: Object of type int64 is not JSON
serializable` when encoding a circuit into QPY. The proposed solution in
this PR is to make a copy of each circuit (to avoid mutating the user's
original circuits) and clear the metadata when submitting.

### Details and comments

Fixes #3063

### AI/LLM disclosure

- [x] I didn't use LLM tooling, or only used it privately.
- [ ] I used the following tool to help write this PR description:
- [ ] I used the following tool to generate or modify code:

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

8891 of 10152 relevant lines covered (87.58%)

6.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 unit-tests_python3.10-windows-latest - 29774670093.1 20 Jul 2026 08:10PM UTC 326
86.08
GitHub Action Run
2 unit-tests_python3.11-ubuntu-latest - 29774670093.2 20 Jul 2026 08:09PM UTC 326
87.58
GitHub Action Run
3 unit-tests_python3.12-windows-latest - 29774670093.3 20 Jul 2026 08:10PM UTC 326
86.08
GitHub Action Run
4 unit-tests_python3.11-windows-latest - 29774670093.4 20 Jul 2026 08:10PM UTC 326
86.08
GitHub Action Run
5 unit-tests_python3.10-ubuntu-latest - 29774670093.5 20 Jul 2026 08:09PM UTC 326
87.58
GitHub Action Run
6 unit-tests_python3.13-ubuntu-latest - 29774670093.6 20 Jul 2026 08:09PM UTC 326
87.58
GitHub Action Run
7 unit-tests_python3.13-windows-latest - 29774670093.7 20 Jul 2026 08:10PM UTC 326
86.08
GitHub Action Run
8 unit-tests_python3.12-ubuntu-latest - 29774670093.8 20 Jul 2026 08:09PM UTC 326
87.58
GitHub Action Run
Source Files on build 29774670093
  • Tree
  • List 326
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29774670093
  • b48fe953 on github
  • Prev Build on gh-readonly-queue/main/pr-3058-0c377ac693f4cb7a3736ac1aa8cd357f93cbfe7a (#29772673011)
  • Delete
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