Enum qasm::AstNode [] [src]

pub enum AstNode {
    QReg(Stringi32),
    CReg(Stringi32),
    Barrier(Argument),
    Reset(Argument),
    Measure(ArgumentArgument),
    ApplyGate(StringVec<Argument>, Vec<String>),
    Opaque(StringVec<Argument>, Vec<String>),
    Gate(StringVec<String>, Vec<String>, Vec<AstNode>),
    If(Stringi32Box<AstNode>),
}

AST Nodes. These can pattern matched to evaluate the ast.

The nodes are representative of what operation should be done, please look at their documentation.

Variants

Represents the initialization of a Quantum Register. The String is the identifier, and the integer is the number of qubits.

Represents the initialization of a Classical Register. The String is the identifier, and the integer is the number of qubits.

Represents a barrier to a qubit / register

Represents reseting a qubit / register

Representing measuremnt of a qubit/register to a bit/register

Represents application of a gate String is the name of the gate. The first arguments is the qubits that the gates are being applied to The second is the parameters (mathematical expressions). Note the mathematic expressions are strings, and must be evaluated

Represents an opaque gate String is the name of the gate. The first arguments is the qubits that the gates are being applied to The second is the parameters (mathematical expressions)

Represents the creation of a gate String is the name of the gate The first is the qubits it acts on, The seconds is the ids of the params. finally, a list of nodes, which the gate applies

Represents a conditional String is classical register i32 is the value to to check if equal. If equal, AstNode is applied.

Trait Implementations

impl Debug for AstNode
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for AstNode
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Clone for AstNode
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for AstNode

impl Sync for AstNode