[−][src]Struct dqcsim::common::converter::UnitaryGateConverter
Converter implementation for unitary gates based on a matrix converter.
The matrix converter takes a matrix and a number of control qubits as input for detection. The number of control qubits is wrapped in an Option, but in the detection direction this is always Some, so it can just be unwrapped. In the other direction, None means that the number of control qubits can be freely derived from the number of qubit arguments, while Some places a constraint on the number of expected control qubits.
Trait Implementations
impl<M> Converter for UnitaryGateConverter<M> where
M: Converter<Input = (Matrix, Option<usize>)>,
M::Output: FromArb + ToArb,
[src]
M: Converter<Input = (Matrix, Option<usize>)>,
M::Output: FromArb + ToArb,
type Input = Gate
The more generic detector input type = constructor output type.
type Output = (Vec<QubitRef>, ArbData)
The more specific detector output type = constructor input type.
fn detect(&self, gate: &Gate) -> Result<Option<Self::Output>>
[src]
fn construct(&self, output: &Self::Output) -> Result<Gate>
[src]
impl<M> From<M> for UnitaryGateConverter<M> where
M: Converter<Input = (Matrix, Option<usize>)>,
[src]
M: Converter<Input = (Matrix, Option<usize>)>,
Auto Trait Implementations
impl<M> RefUnwindSafe for UnitaryGateConverter<M> where
M: RefUnwindSafe,
M: RefUnwindSafe,
impl<M> Send for UnitaryGateConverter<M> where
M: Send,
M: Send,
impl<M> Sync for UnitaryGateConverter<M> where
M: Sync,
M: Sync,
impl<M> Unpin for UnitaryGateConverter<M> where
M: Unpin,
M: Unpin,
impl<M> UnwindSafe for UnitaryGateConverter<M> where
M: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,