Closed jyu00 closed 2 weeks ago
Describe the bug
Specifying a coupling map of type CouplingMap to NoiseLearner option fails with
CouplingMap
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
Describe the bug
Specifying a coupling map of type
CouplingMap
to NoiseLearner option fails withSteps to reproduce
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