[−][src]Enum q1tsim::gates::Parameter
Enumeration for parameters (usually angles) to a gate. This can either be a direct floating points value, or a reference to one. In the latter case, the value of the parameter can be changed outside the circuit, which can be useful to e.g. to reexecute a circuit with the end state of the last excution, but with a different value for a parameter. For reference parameters, a name is associated with the parameter for the description, since its value can change.
Variants
Direct(f64)
Direct value
Reference value, mutable outside the circuit, with its name
Reference parameter from external code
Methods
impl Parameter
[src]
pub fn from_refcell(cell: &Rc<RefCell<f64>>, name: &str) -> Self
[src]
Create a new reference parameter from cell
with name name
.
pub fn value(&self) -> f64
[src]
Return the current value of the parameter
Trait Implementations
impl From<f64> for Parameter
[src]
impl From<CParameter> for Parameter
[src]
fn from(p: CParameter) -> Parameter
[src]
impl Display for Parameter
[src]
Auto Trait Implementations
impl !Sync for Parameter
impl !Send for Parameter
impl Unpin for Parameter
impl !UnwindSafe for Parameter
impl !RefUnwindSafe for Parameter
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
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.
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,