aboutsummaryrefslogtreecommitdiff
path: root/libpsi-core/src/core/runtime.rs
blob: 5b0a45f1e633df06cb007838dcb1e50e69693458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use super::{ClassicalRegister, QuantumBit, QuantumCircuit};

#[allow(unused)]
pub struct ExecutationData {
    pub quantum_states: Vec<QuantumBit>,
    pub 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>;
}