Skip to main content

CmdHdr

Struct CmdHdr 

Source
pub struct CmdHdr {
    pub qubit_id: u16,
    pub instr: Cmd,
    pub options: CmdOpt,
}
Expand description

§CQC Command Header

A CQC Command Header identifies the specific instruction to execute, as well as the qubit ID on which to perform this instructions.

A CQC Command Header MUST follow the CQC Header for the following messages:

  • Command
  • Factory
  • GetTime
Field     Length     Meaning
-----     ------     -------
qubit_id  2 bytes    Qubit ID to perform the operation on.
instr     1 byte     Instruction to perform.
options   1 byte     Options when executing the command.

§Notify

If the notify option bit is set, each of these commands return a CQC message Done indicating that execution has completed. Some commands also return additional messages, as described below:

  • New: Returns a NewOk reply followed by an Extra Qubit header with the qubit ID.
  • Measure(InPlace): Returns a MeasOut message followed by a Measurement Outcome header containing the measurement outcome.
  • Recv: Returns a Recv reply followed by an Extra Qubit header with the qubit ID.
  • Epr(Recv): Returns an EprOk reply by an Extra Qubit header and an Entanglement Information header.

Fields§

§qubit_id: u16§instr: Cmd§options: CmdOpt

Implementations§

Source§

impl CmdHdr

Source

pub fn hdr_len() -> u32

Source

pub fn len(&self) -> u32

Trait Implementations§

Source§

impl Debug for CmdHdr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for CmdHdr

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for CmdHdr

Source§

fn eq(&self, other: &CmdHdr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for CmdHdr

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for CmdHdr

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,