blob: f3e52acd48038c2fada95272207f704fa5a441d0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
use super::{ClassicalRegister, QuantumCircuit, QuantumRegister, QuantumState};
pub struct RuntimeData {
pub quantum_register: QuantumRegister,
pub classical_states: ClassicalRegister,
}
impl RuntimeData {
pub fn new(quantum_register: QuantumRegister, classical_states: ClassicalRegister) -> Self {
RuntimeData {
quantum_register,
classical_states,
}
}
}
pub trait Runtime<'a> {
fn new(circuit: &'a QuantumCircuit) -> Self;
fn execute(&self, repeat: usize) -> Vec<RuntimeData>;
fn get_state(&self) -> QuantumState;
fn get_circuit(&self) -> &QuantumCircuit;
}
|