microsoft/qdk
Publicmirrored from https://github.com/microsoft/qdkAvailable
source/resource_estimator/src/system/data/physical_counts.rs
49lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. |
| 2 | // Licensed under the MIT License. |
| 3 | |
| 4 | #[derive(Default, Debug, serde::Serialize)] |
| 5 | #[serde(rename_all(serialize = "camelCase"))] |
| 6 | pub struct PhysicalResourceCounts { |
| 7 | /// These are the total number of physical qubits |
| 8 | pub(crate) physical_qubits: u64, |
| 9 | /// This is the total runtime to execute the algorithm in nanoseconds. |
| 10 | pub(crate) runtime: u64, |
| 11 | /// QOPS: number of logical qubits × instructions per cycle per qubit × clock frequency |
| 12 | pub(crate) rqops: u64, |
| 13 | /// Breakdown of estimates |
| 14 | pub(crate) breakdown: PhysicalResourceCountsBreakdown, |
| 15 | } |
| 16 | |
| 17 | #[derive(Default, Debug, serde::Serialize)] |
| 18 | #[serde(rename_all(serialize = "camelCase"))] |
| 19 | pub struct PhysicalResourceCountsBreakdown { |
| 20 | /// These are logical qubits required for running the algorithm and do not |
| 21 | /// include resources for T factories. |
| 22 | pub(crate) algorithmic_logical_qubits: u64, |
| 23 | /// These are the logical cycles required for running the algorithm and do |
| 24 | /// not include resources for T factories. |
| 25 | pub(crate) algorithmic_logical_depth: u64, |
| 26 | /// The possibly adjusted number of cycles that is computed whenever the |
| 27 | /// T-factory execution time is faster then algorithm execution. |
| 28 | pub(crate) logical_depth: u64, |
| 29 | /// The number of T-states consumed by the algorithm |
| 30 | pub(crate) num_tstates: u64, |
| 31 | /// The number of logical cycles per second |
| 32 | pub(crate) clock_frequency: f64, |
| 33 | /// The number of T-factories (we assume uniform T-factory design) |
| 34 | pub(crate) num_tfactories: u64, |
| 35 | /// The number of how often all parallel T-factories should run |
| 36 | pub(crate) num_tfactory_runs: u64, |
| 37 | /// The number of physical qubits for all T-factories |
| 38 | pub(crate) physical_qubits_for_tfactories: u64, |
| 39 | /// The number of physical qubits for algorithm layout |
| 40 | pub(crate) physical_qubits_for_algorithm: u64, |
| 41 | /// The required logical error rate |
| 42 | pub(crate) required_logical_qubit_error_rate: f64, |
| 43 | /// The required logical T-state error rate |
| 44 | pub(crate) required_logical_tstate_error_rate: Option<f64>, |
| 45 | /// The number of T gates per rotation |
| 46 | pub(crate) num_ts_per_rotation: Option<u64>, |
| 47 | /// The Clifford error rate based on the qubit parameters |
| 48 | pub(crate) clifford_error_rate: f64, |
| 49 | } |
| 50 | |