#[non_exhaustive]pub struct ClExpr {
pub bit_posn: Vec<(u32, u32)>,
pub expr: ClOperator,
pub reg_posn: Vec<InputClRegister>,
pub output_posn: ClRegisterBits,
}
Expand description
Data encoding a classical expression.
A classical expression operates over multi-bit registers and/or individual bits, each identified by an index local to the expression.
This is included in a Operation
when the operation is a OpType::ClExpr
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.bit_posn: Vec<(u32, u32)>
Mapping between bit variables in the expression and the position of the
corresponding bit in the args
list.
expr: ClOperator
The encoded expression.
This expression may only refer to bits and registers by their id either
in Self::bit_posn
or Self::reg_posn
, respectively.
reg_posn: Vec<InputClRegister>
A list of registers defined over the input bits, with a local identifier.
expr
may contain references to these registers by their
InputClRegister::index
.
output_posn: ClRegisterBits
The output bits of the expression.
This is a list of bit indices in ClExpr::bit_posn
.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ClExpr
impl<'de> Deserialize<'de> for ClExpr
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for ClExpr
Auto Trait Implementations§
impl Freeze for ClExpr
impl RefUnwindSafe for ClExpr
impl Send for ClExpr
impl Sync for ClExpr
impl Unpin for ClExpr
impl UnwindSafe for ClExpr
Blanket Implementations§
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