microsoft/qdk

Public

mirrored from https://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
billti/num2-sim

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

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
5pub const MAX_CODE_DISTANCE: u64 = 50;
6
7/// Maximum number of distillation rounds
8pub const MAX_DISTILLATION_ROUNDS: u64 = 3;
9
10/// Maximum number of extra distillation rounds in case none is found for [`MAX_DISTILLATION_ROUNDS`]
11pub const MAX_EXTRA_DISTILLATION_ROUNDS: u64 = 4;
12
13/// (Γ_R in paper for layout)
14#[allow(clippy::doc_markdown)]
15pub const NUM_MEASUREMENTS_PER_R: u64 = 1;
16
17/// (Γ_Tof in paper for layout)
18#[allow(clippy::doc_markdown)]
19pub const NUM_MEASUREMENTS_PER_TOF: u64 = 3;
20
21/// A coefficient in Ts per rotation
22pub const NUM_TS_PER_ROTATION_A_COEFFICIENT: f64 = 0.53;
23
24/// A coefficient in Ts per rotation
25pub const NUM_TS_PER_ROTATION_B_COEFFICIENT: f64 = 4.86;
26
27// Physical qubit field names
28pub const INSTRUCTION_SET: &str = "instructionSet";
29pub const ONE_QUBIT_MEASUREMENT_TIME: &str = "oneQubitMeasurementTime";
30pub const TWO_QUBIT_JOINT_MEASUREMENT_TIME: &str = "twoQubitJointMeasurementTime";
31pub const ONE_QUBIT_MEASUREMENT_ERROR_RATE: &str = "oneQubitMeasurementErrorRate";
32pub const ONE_QUBIT_MEASUREMENT_PROCESS_ERROR_RATE: &str = "oneQubitMeasurementErrorRate.process";
33#[cfg(test)]
34pub const TWO_QUBIT_JOINT_MEASUREMENT_ERROR_RATE: &str = "twoQubitJointMeasurementErrorRate";
35pub const TWO_QUBIT_JOINT_MEASUREMENT_PROCESS_ERROR_RATE: &str =
36 "twoQubitJointMeasurementErrorRate.process";
37pub const ONE_QUBIT_GATE_TIME: &str = "oneQubitGateTime";
38pub const ONE_QUBIT_GATE_ERROR_RATE: &str = "oneQubitGateErrorRate";
39pub const TWO_QUBIT_GATE_TIME: &str = "twoQubitGateTime";
40pub const TWO_QUBIT_GATE_ERROR_RATE: &str = "twoQubitGateErrorRate";
41pub const T_GATE_ERROR_RATE: &str = "tGateErrorRate";
42pub const IDLE_ERROR_RATE: &str = "idleErrorRate";
43#[cfg(test)]
44pub const READOUT: &str = "readout";
45#[cfg(test)]
46pub const PROCESS: &str = "process";
47
48#[cfg(test)]
49pub const FLOAT_COMPARISON_EPSILON: f64 = 0.000_000_000_1;
50