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

Qiskit / qiskit-ibm-runtime / 29775059403
88%

Build:
DEFAULT BRANCH: main
Ran 20 Jul 2026 08:15PM UTC
Jobs 0
Files 0
Run time –
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

pending completion
  cancel
29775059403

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:
Source Files on build 29775059403
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #29775059403
  • b48fe953 on github
  • Prev Build on gh-readonly-queue/main/pr-3058-0c377ac693f4cb7a3736ac1aa8cd357f93cbfe7a (#29772673011)
  • Next Build on main (#29829409034)
  • 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