Skip to content

Commit

Permalink
Update device calibration (#310)
Browse files Browse the repository at this point in the history
Update gate time values to SI units (seconds) and current available
calibration data.
This is especially relevant in the light of the new MQTPredictor reward
function `expected_success_probability`.
IBM, OQC (and IQM) calibration data is not supplied in seconds (hence transformation during import)
IONQ, Rigetti calibration data is already specified in seconds
Quantinuum - no information on timescales
  • Loading branch information
flowerthrower authored Jun 13, 2024
2 parents a552522 + 7bce49f commit 9145701
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 23 deletions.
8 changes: 4 additions & 4 deletions src/mqt/bench/calibration_files/ionq_aria1_calibration.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,11 +610,11 @@
"spam": { "mean": 0.9993 }
},
"timing": {
"t1": 10000,
"t2": 0.2,
"t1": 100,
"t2": 1,
"1q": 0.000135,
"2q": 0.0007,
"readout": 0.00013,
"2q": 0.0006,
"readout": 0.0003,
"reset": 0.00002
}
}
6 changes: 3 additions & 3 deletions src/mqt/bench/calibration_files/ionq_harmony_calibration.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@
[10, 9]
],
"fidelity": {
"1q": { "mean": 0.9986 },
"2q": { "mean": 0.985 },
"1q": { "mean": 0.9985 },
"2q": { "mean": 0.9614 },
"spam": { "mean": 0.99752 }
},
"timing": {
"t1": 10000,
"t1": 100,
"t2": 0.2,
"1q": 0.00001,
"2q": 0.0002,
Expand Down
16 changes: 8 additions & 8 deletions src/mqt/bench/calibration_files/oqc_lucy_calibration.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,35 +74,35 @@
"two_qubit": {
"0-1": {
"coupling": { "control_qubit": 0.0, "target_qubit": 1.0 },
"fCX": 0.9453766394259683
"fECR": 0.9453766394259683
},
"0-7": {
"coupling": { "control_qubit": 0.0, "target_qubit": 7.0 },
"fCX": 0.9490327707249107
"fECR": 0.9490327707249107
},
"1-2": {
"coupling": { "control_qubit": 1.0, "target_qubit": 2.0 },
"fCX": 0.937420422997459
"fECR": 0.937420422997459
},
"2-3": {
"coupling": { "control_qubit": 2.0, "target_qubit": 3.0 },
"fCX": 0.9433658127189578
"fECR": 0.9433658127189578
},
"4-3": {
"coupling": { "control_qubit": 4.0, "target_qubit": 3.0 },
"fCX": 0.9580658927174651
"fECR": 0.9580658927174651
},
"4-5": {
"coupling": { "control_qubit": 4.0, "target_qubit": 5.0 },
"fCX": 0.9716473635543361
"fECR": 0.9716473635543361
},
"6-5": {
"coupling": { "control_qubit": 6.0, "target_qubit": 5.0 },
"fCX": 0.9497968896117499
"fECR": 0.9497968896117499
},
"7-6": {
"coupling": { "control_qubit": 7.0, "target_qubit": 6.0 },
"fCX": 0.9456903499165887
"fECR": 0.9456903499165887
}
}
}
Expand Down
11 changes: 7 additions & 4 deletions src/mqt/bench/devices/ibm.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,20 @@ def import_backend(cls, path: Path) -> Device:
"x": 1 - ibm_calibration["properties"][str(qubit)]["eX"],
}
calibration.readout_fidelity[qubit] = 1 - ibm_calibration["properties"][str(qubit)]["eRO"]
calibration.readout_duration[qubit] = ibm_calibration["properties"][str(qubit)]["tRO"]
calibration.t1[qubit] = ibm_calibration["properties"][str(qubit)]["T1"]
calibration.t2[qubit] = ibm_calibration["properties"][str(qubit)]["T2"]
# data in nanoseconds, convert to SI unit (seconds)
calibration.readout_duration[qubit] = ibm_calibration["properties"][str(qubit)]["tRO"] * 1e-9
# data in microseconds, convert to SI unit (seconds)
calibration.t1[qubit] = ibm_calibration["properties"][str(qubit)]["T1"] * 1e-6
calibration.t2[qubit] = ibm_calibration["properties"][str(qubit)]["T2"] * 1e-6

for qubit1, qubit2 in device.coupling_map:
edge = f"{qubit1}_{qubit2}"

error = ibm_calibration["properties"][str(qubit1)]["eCX"][edge]
calibration.two_qubit_gate_fidelity[(qubit1, qubit2)] = {"cx": 1 - error}

duration = ibm_calibration["properties"][str(qubit1)]["tCX"][edge]
# data in nanoseconds, convert to SI unit (seconds)
duration = ibm_calibration["properties"][str(qubit1)]["tCX"][edge] * 1e-9
calibration.two_qubit_gate_duration[(qubit1, qubit2)] = {"cx": duration}

device.calibration = calibration
Expand Down
9 changes: 5 additions & 4 deletions src/mqt/bench/devices/oqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TwoQubitProperties(TypedDict):
"""Class to store the properties of a two-qubit gate."""

coupling: Coupling
fCX: float
fECR: float


class Properties(TypedDict):
Expand Down Expand Up @@ -92,12 +92,13 @@ def import_backend(cls, path: Path) -> Device:
gate: oqc_calibration["properties"]["one_qubit"][str(qubit)]["fRB"] for gate in ["rz", "sx", "x"]
}
calibration.readout_fidelity[qubit] = oqc_calibration["properties"]["one_qubit"][str(qubit)]["fRO"]
calibration.t1[qubit] = oqc_calibration["properties"]["one_qubit"][str(qubit)]["T1"]
calibration.t2[qubit] = oqc_calibration["properties"]["one_qubit"][str(qubit)]["T2"]
# data in microseconds, convert to SI unit (seconds)
calibration.t1[qubit] = oqc_calibration["properties"]["one_qubit"][str(qubit)]["T1"] * 1e-6
calibration.t2[qubit] = oqc_calibration["properties"]["one_qubit"][str(qubit)]["T2"] * 1e-6

for qubit1, qubit2 in device.coupling_map:
calibration.two_qubit_gate_fidelity[(qubit1, qubit2)] = dict.fromkeys(
["ecr"], oqc_calibration["properties"]["two_qubit"][f"{qubit1}-{qubit2}"]["fCX"]
["ecr"], oqc_calibration["properties"]["two_qubit"][f"{qubit1}-{qubit2}"]["fECR"]
)
device.calibration = calibration
return device

0 comments on commit 9145701

Please sign in to comment.