Struct ket::process::Process

source ·
pub struct Process { /* private fields */ }

Implementations§

source§

impl Process

source

pub fn new(pid: usize) -> Self

source

pub fn new_ptr() -> Rc<RefCell<Self>>

source

pub fn set_features(&mut self, features: Features)

source

pub fn allocate_qubit(&mut self, dirty: bool) -> Result<Qubit>

source

pub fn free_qubit(&mut self, qubit: &mut Qubit, dirty: bool) -> Result<()>

source

pub fn apply_gate(&mut self, gate: QuantumGate, target: &Qubit) -> Result<()>

source

pub fn apply_plugin( &mut self, name: &str, target: &[&Qubit], args: &str ) -> Result<()>

source

pub fn apply_plugin_ref( &mut self, name: &str, target: &[Rc<RefCell<Qubit>>], args: &str ) -> Result<()>

source

pub fn measure(&mut self, qubits: &mut [&mut Qubit]) -> Result<Future>

source

pub fn measure_ref( &mut self, qubits: &mut [Rc<RefCell<Qubit>>] ) -> Result<Future>

source

pub fn ctrl_push(&mut self, qubits: &[&Qubit]) -> Result<()>

source

pub fn ctrl_push_ref(&mut self, qubits: &[Rc<RefCell<Qubit>>]) -> Result<()>

source

pub fn ctrl_pop(&mut self) -> Result<()>

source

pub fn adj_begin(&mut self) -> Result<()>

source

pub fn adj_end(&mut self) -> Result<()>

source

pub fn get_label(&mut self) -> Result<Label>

source

pub fn open_block(&mut self, label: &Label) -> Result<()>

source

pub fn jump(&mut self, label: &Label) -> Result<()>

source

pub fn branch( &mut self, test: &Future, then: &Label, otherwise: &Label ) -> Result<()>

source

pub fn dump(&mut self, qubits: &[&Qubit]) -> Result<Dump>

source

pub fn dump_ref(&mut self, qubits: &[Rc<RefCell<Qubit>>]) -> Result<Dump>

source

pub fn add_int_op( &mut self, op: ClassicalOp, lhs: &Future, rhs: &Future ) -> Result<Future>

source

pub fn int_set(&mut self, dst: &Future, src: &Future) -> Result<()>

source

pub fn int_new(&mut self, value: i64) -> Result<Future>

source

pub fn prepare_for_execution(&mut self) -> Result<()>

source

pub fn exec_time(&self) -> Option<f64>

source

pub fn set_timeout(&mut self, timeout: u64)

source

pub fn metrics(&self) -> &Metrics

source

pub fn blocks(&self) -> Vec<&CodeBlock>

source

pub fn serialize_metrics(&mut self, data_type: DataType) -> &SerializedData

source

pub fn serialize_quantum_code(&mut self, data_type: DataType) -> &SerializedData

source

pub fn get_serialized_metrics(&self) -> Option<&SerializedData>

source

pub fn get_serialized_quantum_code(&self) -> Option<&SerializedData>

source

pub fn set_result(&mut self, result: ResultData) -> Result<()>

source

pub fn set_serialized_result(&mut self, result: &SerializedData) -> Result<()>

source

pub fn pid(&self) -> usize

Trait Implementations§

source§

impl Debug for Process

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Process

§

impl !Send for Process

§

impl !Sync for Process

§

impl Unpin for Process

§

impl !UnwindSafe for Process

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V