pub struct UnitaryExpression { /* private fields */ }Implementations§
Source§impl UnitaryExpression
impl UnitaryExpression
pub fn new<T: AsRef<str>>(input: T) -> Self
pub fn identity<S: Into<String>, T: Into<Radices>>(name: S, radices: T) -> Self
pub fn set_radices(&mut self, new_radices: Radices)
pub fn transpose(&mut self)
pub fn dagger(&mut self)
pub fn classically_multiplex( expressions: &[&UnitaryExpression], new_dim_radices: &[usize], ) -> UnitarySystemExpression
pub fn classically_control( &self, positions: &[usize], new_dim_radices: &[usize], ) -> UnitarySystemExpression
pub fn embed( &mut self, sub_matrix: UnitaryExpression, top_left_row_idx: usize, top_left_col_idx: usize, )
pub fn otimes<U: AsRef<UnitaryExpression>>(&self, other: U) -> Self
pub fn dot<U: AsRef<UnitaryExpression>>(&self, other: U) -> Self
pub fn get_arg_map<C: ComplexScalar>( &self, args: &[C::R], ) -> HashMap<&str, C::R>
pub fn eval<C: ComplexScalar>(&self, args: &[C::R]) -> UnitaryMatrix<C>
Methods from Deref<Target = NamedExpression>§
Trait Implementations§
Source§impl AsRef<NamedExpression> for UnitaryExpression
impl AsRef<NamedExpression> for UnitaryExpression
Source§fn as_ref(&self) -> &NamedExpression
fn as_ref(&self) -> &NamedExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl AsRef<UnitaryExpression> for UnitaryExpression
impl AsRef<UnitaryExpression> for UnitaryExpression
Source§fn as_ref(&self) -> &UnitaryExpression
fn as_ref(&self) -> &UnitaryExpression
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for UnitaryExpression
impl Clone for UnitaryExpression
Source§fn clone(&self) -> UnitaryExpression
fn clone(&self) -> UnitaryExpression
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnitaryExpression
impl Debug for UnitaryExpression
Source§impl Deref for UnitaryExpression
impl Deref for UnitaryExpression
Source§impl DerefMut for UnitaryExpression
impl DerefMut for UnitaryExpression
Source§impl From<UnitaryExpression> for NamedExpression
impl From<UnitaryExpression> for NamedExpression
Source§fn from(value: UnitaryExpression) -> Self
fn from(value: UnitaryExpression) -> Self
Converts to this type from the input type.
Source§impl From<UnitaryExpression> for TensorExpression
impl From<UnitaryExpression> for TensorExpression
Source§fn from(value: UnitaryExpression) -> Self
fn from(value: UnitaryExpression) -> Self
Converts to this type from the input type.
Source§impl<C: ComplexScalar> From<UnitaryMatrix<C>> for UnitaryExpression
impl<C: ComplexScalar> From<UnitaryMatrix<C>> for UnitaryExpression
Source§fn from(value: UnitaryMatrix<C>) -> Self
fn from(value: UnitaryMatrix<C>) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UnitaryExpression
impl PartialEq for UnitaryExpression
Source§impl QuditSystem for UnitaryExpression
impl QuditSystem for UnitaryExpression
Source§fn num_qudits(&self) -> usize
fn num_qudits(&self) -> usize
Returns the number of qudits in the system. Read more
Source§fn is_qubit_only(&self) -> bool
fn is_qubit_only(&self) -> bool
Checks if the system consists only of qubits (2-level systems). Read more
Source§fn is_qutrit_only(&self) -> bool
fn is_qutrit_only(&self) -> bool
Checks if the system consists only of qutrits (3-level systems). Read more
Source§fn is_qudit_only<T>(&self, radix: T) -> bool
fn is_qudit_only<T>(&self, radix: T) -> bool
Checks if the system consists only of qudits with a specified radix. Read more
Source§fn is_homogenous(&self) -> bool
fn is_homogenous(&self) -> bool
Checks if the system is homogenous, i.e., all qudits have the same radix. Read more
Source§impl TryFrom<TensorExpression> for UnitaryExpression
impl TryFrom<TensorExpression> for UnitaryExpression
impl Eq for UnitaryExpression
impl StructuralPartialEq for UnitaryExpression
Auto Trait Implementations§
impl Freeze for UnitaryExpression
impl RefUnwindSafe for UnitaryExpression
impl Send for UnitaryExpression
impl Sync for UnitaryExpression
impl Unpin for UnitaryExpression
impl UnwindSafe for UnitaryExpression
Blanket Implementations§
Source§impl<'short, T, Target> AsGeneralizedRef<'short, &'short Target> for T
impl<'short, T, Target> AsGeneralizedRef<'short, &'short Target> for T
fn as_generalized_ref(&'short self) -> &'short Target
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more