Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stephteo opened this issue Sep 26, 2022 · 2 comments

Comments

@stephteo
Copy link
Collaborator

stephteo commented Sep 26, 2022

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]
@stephteo
Copy link
Collaborator Author

stephteo commented Sep 26, 2022

This PR already makes the change to the variable name in Program.delay() and Program.barrier() from qubits to qubits_or_frames. If that is sufficient, we can close this issue.

@stephteo stephteo changed the title OpenQASM AST for DelayInstruction qubits attribute name is misleading OpenQASM AST for DelayInstruction/QuantumBarrier qubits attribute name is misleading Sep 29, 2022
@karalekas
Copy link
Collaborator

sounds like this is an openpulse issue

@karalekas karalekas transferred this issue from another repository Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants