pub enum BloqNodeKind {
Quantum(Arc<QuantumNode>),
Classical(Arc<ClassicalNode>),
Region(RegionNode),
}Expand description
What a BloqNode computes.
Variants§
Quantum(Arc<QuantumNode>)
Shared until quantum data is edited. Large physical payloads do not inflate classical node slots or copy during unrelated graph edits.
Classical(Arc<ClassicalNode>)
Shared immutable classical definition. Activation, inputs and provenance belong to this node’s invocation; editing detaches only its definition.
Region(RegionNode)
Structured control-flow region.
Implementations§
Source§impl BloqNodeKind
impl BloqNodeKind
Sourcepub fn try_classical(&self) -> Option<&ClassicalNode>
pub fn try_classical(&self) -> Option<&ClassicalNode>
Borrow a classical definition without changing its sharing.
Sourcepub fn try_classical_mut(&mut self) -> Option<&mut ClassicalNode>
pub fn try_classical_mut(&mut self) -> Option<&mut ClassicalNode>
Detach a shared classical definition before editing it.
Trait Implementations§
Source§impl Clone for BloqNodeKind
impl Clone for BloqNodeKind
Source§fn clone(&self) -> BloqNodeKind
fn clone(&self) -> BloqNodeKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BloqNodeKind
impl Debug for BloqNodeKind
Source§impl<'de> Deserialize<'de> for BloqNodeKind
impl<'de> Deserialize<'de> for BloqNodeKind
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
Auto Trait Implementations§
impl Freeze for BloqNodeKind
impl RefUnwindSafe for BloqNodeKind
impl Send for BloqNodeKind
impl Sync for BloqNodeKind
impl Unpin for BloqNodeKind
impl UnsafeUnpin for BloqNodeKind
impl UnwindSafe for BloqNodeKind
Blanket Implementations§
§impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseMutViaBorrow<BorrowedSelf> for T
fn assign_index(&mut self, index: usize, to: bool)
fn negate_index(&mut self, index: usize)
fn clear_bits(&mut self)
fn assign_random(
&mut self,
bit_count: usize,
random_number_generator: &mut impl RngExt,
)where
BorrowedSelf: BitLength,
§impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
impl<Bits, Other, BorrowedSelf, BorrowedOther> BitwisePairMutViaBorrow<Other, BorrowedSelf, BorrowedOther> for Bits
fn assign(&mut self, other: &Other)
fn bitxor_assign(&mut self, other: &Other)
fn bitand_assign(&mut self, other: &Other)
fn bitor_assign(&mut self, other: &Other)
§impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
impl<T, Other, BorrowedSelf, BorrowedOther> BitwisePairViaBorrow<Other, BorrowedSelf, BorrowedOther> for T
§impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
impl<T, BorrowedSelf> BitwiseViaBorrow<BorrowedSelf> for T
fn index(&self, index: usize) -> bool
fn weight(&self) -> usize
fn parity(&self) -> bool
fn is_zero(&self) -> bool
fn is_unit(&self, index: usize) -> bool
fn support<'a>(&'a self) -> impl SortedIteratorwhere
BorrowedSelf: 'a,
fn max_support(&self) -> Option<usize>
fn min_support(&self) -> Option<usize>
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