Trait rusq::QuantumMachine
[−]
[src]
pub trait QuantumMachine { fn get_qubits(&self) -> Vec<Qubit>; fn measure(&mut self, qubit: &Qubit) -> MeasuredResult; }
A trait for types representing quantum machines.
The type implementing this must be responsible for the states - namely, the wavefunction.
Currently, only the supporting type is QuantumSimulator.
Required Methods
fn get_qubits(&self) -> Vec<Qubit>
Returns all the qubits in the machine.
fn measure(&mut self, qubit: &Qubit) -> MeasuredResult
Measures the given qubit. Note that the qubit is expected to be projected to the corresponding state.
Implementors
impl QuantumMachine for QuantumSimulator