microsoft/qdk
Publicmirrored from https://github.com/microsoft/qdkAvailable
source/resource_estimator/src/system/constants.rs
49lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | /// Maximum allowed error code distance |
| 5 | pub const MAX_CODE_DISTANCE: u64 = 50; |
| 6 | |
| 7 | /// Maximum number of distillation rounds |
| 8 | pub const MAX_DISTILLATION_ROUNDS: u64 = 3; |
| 9 | |
| 10 | /// Maximum number of extra distillation rounds in case none is found for [`MAX_DISTILLATION_ROUNDS`] |
| 11 | pub const MAX_EXTRA_DISTILLATION_ROUNDS: u64 = 4; |
| 12 | |
| 13 | /// (Γ_R in paper for layout) |
| 14 | #[allow(clippy::doc_markdown)] |
| 15 | pub const NUM_MEASUREMENTS_PER_R: u64 = 1; |
| 16 | |
| 17 | /// (Γ_Tof in paper for layout) |
| 18 | #[allow(clippy::doc_markdown)] |
| 19 | pub const NUM_MEASUREMENTS_PER_TOF: u64 = 3; |
| 20 | |
| 21 | /// A coefficient in Ts per rotation |
| 22 | pub const NUM_TS_PER_ROTATION_A_COEFFICIENT: f64 = 0.53; |
| 23 | |
| 24 | /// A coefficient in Ts per rotation |
| 25 | pub const NUM_TS_PER_ROTATION_B_COEFFICIENT: f64 = 4.86; |
| 26 | |
| 27 | // Physical qubit field names |
| 28 | pub const INSTRUCTION_SET: &str = "instructionSet"; |
| 29 | pub const ONE_QUBIT_MEASUREMENT_TIME: &str = "oneQubitMeasurementTime"; |
| 30 | pub const TWO_QUBIT_JOINT_MEASUREMENT_TIME: &str = "twoQubitJointMeasurementTime"; |
| 31 | pub const ONE_QUBIT_MEASUREMENT_ERROR_RATE: &str = "oneQubitMeasurementErrorRate"; |
| 32 | pub const ONE_QUBIT_MEASUREMENT_PROCESS_ERROR_RATE: &str = "oneQubitMeasurementErrorRate.process"; |
| 33 | #[cfg(test)] |
| 34 | pub const TWO_QUBIT_JOINT_MEASUREMENT_ERROR_RATE: &str = "twoQubitJointMeasurementErrorRate"; |
| 35 | pub const TWO_QUBIT_JOINT_MEASUREMENT_PROCESS_ERROR_RATE: &str = |
| 36 | "twoQubitJointMeasurementErrorRate.process"; |
| 37 | pub const ONE_QUBIT_GATE_TIME: &str = "oneQubitGateTime"; |
| 38 | pub const ONE_QUBIT_GATE_ERROR_RATE: &str = "oneQubitGateErrorRate"; |
| 39 | pub const TWO_QUBIT_GATE_TIME: &str = "twoQubitGateTime"; |
| 40 | pub const TWO_QUBIT_GATE_ERROR_RATE: &str = "twoQubitGateErrorRate"; |
| 41 | pub const T_GATE_ERROR_RATE: &str = "tGateErrorRate"; |
| 42 | pub const IDLE_ERROR_RATE: &str = "idleErrorRate"; |
| 43 | #[cfg(test)] |
| 44 | pub const READOUT: &str = "readout"; |
| 45 | #[cfg(test)] |
| 46 | pub const PROCESS: &str = "process"; |
| 47 | |
| 48 | #[cfg(test)] |
| 49 | pub const FLOAT_COMPARISON_EPSILON: f64 = 0.000_000_000_1; |
| 50 | |