Skip to content

Commit

Permalink
json
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFerracin committed Aug 1, 2024
1 parent e64134d commit decfdff
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions qiskit_ibm_runtime/utils/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,18 @@ def default(self, obj: Any) -> Any: # pylint: disable=arguments-differ
}
return {"__type__": "DataBin", "__value__": out_val}
if isinstance(obj, LayerNoise):
return obj.circuit, obj.qubits, obj.errors
out_val = {
"circuit": obj.circuit,
"qubits": obj.qubits,
"errors": obj.errors,
}
return {"__type__": "LayerNoise", "__value__": out_val}
if isinstance(obj, LindbladErrors):
return obj.generators, obj.rates
out_val = {
"paulis": obj.paulis,
"rates": obj.rates,
}
return {"__type__": "LindbladErrors", "__value__": out_val}
if isinstance(obj, EstimatorPub):
return (
obj.circuit,
Expand Down

0 comments on commit decfdff

Please sign in to comment.