Skip to main content

InjectOperation

Struct InjectOperation 

Source
pub struct InjectOperation<L: Layer, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response>(/* private fields */);

Implementations§

Source§

impl<L: Layer, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> InjectOperation<L, F, G, H>

Source

pub fn new(op: L::Operation) -> Self

Trait Implementations§

Source§

impl<L: Layer + CXGate, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> CXOperation<InjectLayer<L, F, G, H>> for InjectOperation<L, F, G, H>
where L::Operation: Operation<L> + CXOperation<L>,

Source§

fn cx(c: L::Qubit, t: L::Qubit) -> Self

Source§

impl<L: Layer + HGate, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> HOperation<InjectLayer<L, F, G, H>> for InjectOperation<L, F, G, H>
where L::Operation: Operation<L> + HOperation<L>,

Source§

fn h(q: L::Qubit) -> Self

Source§

impl<L: Layer, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> Operation<InjectLayer<L, F, G, H>> for InjectOperation<L, F, G, H>
where L::Operation: Operation<L>,

Source§

fn initialize() -> Self

Source§

fn measure(q: L::Qubit, s: L::Slot) -> Self

Source§

impl<L: Layer + PauliGate, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> PauliOperation<InjectLayer<L, F, G, H>> for InjectOperation<L, F, G, H>

Source§

fn x(q: L::Qubit) -> Self

Source§

fn y(q: L::Qubit) -> Self

Source§

fn z(q: L::Qubit) -> Self

Source§

impl<L: Layer + SGate, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> SOperation<InjectLayer<L, F, G, H>> for InjectOperation<L, F, G, H>
where L::Operation: Operation<L> + SOperation<L>,

Source§

fn s(q: L::Qubit) -> Self

Source§

fn sdg(q: L::Qubit) -> Self

Source§

impl<L: Layer + TGate, F: Fn(&mut L, &[L::Operation]) -> L::Requested, G: Fn(&mut L, &mut L::Buffer) -> L::Response, H: Fn(&mut L, &[L::Operation], &mut L::Buffer) -> L::Response> TOperation<InjectLayer<L, F, G, H>> for InjectOperation<L, F, G, H>
where L::Operation: Operation<L> + TOperation<L>,

Source§

fn t(q: L::Qubit) -> Self

Source§

fn tdg(q: L::Qubit) -> Self

Auto Trait Implementations§

§

impl<L, F, G, H> Freeze for InjectOperation<L, F, G, H>

§

impl<L, F, G, H> RefUnwindSafe for InjectOperation<L, F, G, H>

§

impl<L, F, G, H> Send for InjectOperation<L, F, G, H>

§

impl<L, F, G, H> Sync for InjectOperation<L, F, G, H>

§

impl<L, F, G, H> Unpin for InjectOperation<L, F, G, H>

§

impl<L, F, G, H> UnsafeUnpin for InjectOperation<L, F, G, H>

§

impl<L, F, G, H> UnwindSafe for InjectOperation<L, F, G, H>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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 T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.