Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing coupling map to NoiseLearner fails #1992

Closed
jyu00 opened this issue Oct 23, 2024 · 0 comments · Fixed by #2026
Closed

Passing coupling map to NoiseLearner fails #1992

jyu00 opened this issue Oct 23, 2024 · 0 comments · Fixed by #2026
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jyu00
Copy link
Collaborator

jyu00 commented Oct 23, 2024

Describe the bug

Specifying a coupling map of type CouplingMap to NoiseLearner option fails with

TypeError: Object of type CouplingMap is not JSON serializable

Steps to reproduce

from qiskit_ibm_runtime import QiskitRuntimeService
from qiskit_ibm_runtime.options import SimulatorOptions
from qiskit_ibm_runtime.fake_provider import FakeAlgiers
from qiskit_ibm_runtime.noise_learner import NoiseLearner

service = QiskitRuntimeService()
fake = FakeAlgiers()

sim_options = SimulatorOptions()
sim_options.set_backend(fake)

learner = NoiseLearner(mode=backend)
learner.options.simulator = sim_options
job = learner.run([circuit_to_learn])

Expected behavior

Suggested solutions

Convert CouplingMap to a list, like how it was done for the primitives. Or better, add it to the json encoder.

Additional Information

  • qiskit-ibm-runtime version:
  • Python version:
  • Operating system:
@jyu00 jyu00 added the bug Something isn't working label Oct 23, 2024
@kt474 kt474 self-assigned this Nov 8, 2024
@kt474 kt474 added this to the 0.34.0 milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants