Skip to content

Commit 1211db7

Browse files
committed
NoiseModel now follows the QaaSxxxData type models.
1 parent dd7eb2b commit 1211db7

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

qiskit_scaleway/backends/base_job.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
QaaSJobRunData,
3535
QaaSJobBackendData,
3636
QaaSCircuitSerializationFormat,
37+
QaaSNoiseModelData,
3738
)
3839

3940

@@ -89,8 +90,7 @@ def submit(self, session_id: str) -> None:
8990
),
9091
)
9192

92-
if options and options.get("noise_model"):
93-
options["noise_model"] = options["noise_model"].to_dict(True)
93+
noise_model = QaaSNoiseModelData(noise_model=options.pop("noise_model", None).to_dict(True)) if options.get("noise_model") else None
9494

9595
backend_data = QaaSJobBackendData(
9696
name=self.backend().name,
@@ -107,6 +107,7 @@ def submit(self, session_id: str) -> None:
107107
backend=backend_data,
108108
run=run_data,
109109
client=client_data,
110+
noise_model=noise_model,
110111
)
111112
)
112113

tests/test_aer_multiple_circuits.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_aer_multiple_circuits():
9696
def _get_noise_model():
9797
import qiskit_aer.noise as noise
9898

99-
# Error probabilities
99+
# Error probabilities (exaggerated to get a noticeable effect for demonstration)
100100
prob_1 = 0.01 # 1-qubit gate
101101
prob_2 = 0.1 # 2-qubit gate
102102

@@ -175,4 +175,3 @@ def test_aer_with_noise_model():
175175
assert len(ideal_result.data.counts) < len(noisy_results[i].data.counts)
176176
finally:
177177
backend.delete_session(session_id)
178-

0 commit comments

Comments
 (0)