Skip to content

OpenQASM AST for DelayInstruction/QuantumBarrier qubits attribute name is misleading #5

@stephteo

Description

@stephteo

The AST for DelayInstruction and QuantumBarrier defines a qubits attribute, but in oqpy we also use them for frames so the attribute naming is misleading. The typing is not an issue here.

@dataclass
class DelayInstruction(QuantumStatement):
    """
    Delay instruction

    Example::

        delay[start_stretch] $0;
    """

    duration: Expression
    qubits: List[Union[IndexedIdentifier, Identifier]]

@dataclass
class QuantumBarrier(QuantumStatement):
    """
    A quantum barrier instruction

    Example::

        barrier q;
    """

    qubits: List[Expression]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions