diff options
| author | hachem <im@hachem.wtf> | 2024-09-26 21:40:04 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2024-09-26 21:40:04 +0200 |
| commit | 1070a7ee073471af8442826cec54e720be266c7c (patch) | |
| tree | 8118c244731fa28409b70cedd69f8c6c057f4b33 /libpsi-core/src/core/runtime.rs | |
| parent | d65b1c55782f6a9d89cd5bc7c7337397dcf4b85c (diff) | |
Runtime architecture start
Diffstat (limited to 'libpsi-core/src/core/runtime.rs')
| -rw-r--r-- | libpsi-core/src/core/runtime.rs | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/libpsi-core/src/core/runtime.rs b/libpsi-core/src/core/runtime.rs new file mode 100644 index 0000000..f699d54 --- /dev/null +++ b/libpsi-core/src/core/runtime.rs @@ -0,0 +1,25 @@ +use super::{ClassicalRegister, QuantumBit, QuantumCircuit}; + +#[allow(unused)] +pub struct ExecutationData { + quantum_states: Vec<QuantumBit>, + classical_states: ClassicalRegister, +} + +impl ExecutationData { + pub fn new(quantum_states: Vec<QuantumBit>, classical_states: ClassicalRegister) -> Self { + ExecutationData { + quantum_states, + classical_states, + } + } +} + +pub trait RuntimeBase { + fn get_circuit(&self) -> &QuantumCircuit; +} + +pub trait Runtime<T: RuntimeBase = Self> { + fn new(circuit: QuantumCircuit) -> Self; + fn execute(&self, repeat: usize) -> Vec<ExecutationData>; +} |
