Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions ionq_core/models/backend.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion openapi.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"characterization_id": "617a1f8b-59d4-435d-aa33-695433d7155e",
"kw": 4902.81,
"location": "College Park, MD, USA",
"supported_error_mitigations": ["debiasing"],
"supported_gates": ["x", "y", "z"],
"supported_native_gates": ["gpi", "gpi2", "ms"],
}

JOB_SAMPLE = {
Expand Down Expand Up @@ -79,6 +82,9 @@ def test_from_dict(self):
assert b.qubits == 25
assert b.average_queue_time == 1181215
assert b.characterization_id == "617a1f8b-59d4-435d-aa33-695433d7155e"
assert b.supported_error_mitigations == ["debiasing"]
assert b.supported_gates == ["x", "y", "z"]
assert b.supported_native_gates == ["gpi", "gpi2", "ms"]

def test_round_trip(self):
assert Backend.from_dict(BACKEND_SAMPLE).to_dict() == BACKEND_SAMPLE
Expand Down