Skip to content

Add test for converting openqasm3 to cudaq with control modifier(s) #938

Closed

Description

@ryanhill1

Control modifiers are now supported by pyqasm, so would like to add a test case for the following lines in openqasm3_to_cudaq:

# pyqasm unrolls multiple modifiers.
# ctrl isn't supported so multi-ctrl is not an issue at the moment.
assert len(statement.modifiers) <= 1
if len(statement.modifiers) == 1:
mod = statement.modifiers[0]
assert (
mod.modifier == ast.GateModifierName.ctrl
), f"non-ctrl modifiers should've be unrolled: {mod}"
gate = get_gate(name, targs)
kernel.control(gate, qubit_refs[0], *qubit_refs[1:])

Activity

  1. added
    good first issue
    testing 🧪
    transpiler 🚊
    on Mar 19, 2025
  2. added a commit that references this issue on Jun 7, 2026
    6222491
  3. added a commit that references this issue on Sep 4, 2026
    e21f6ab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuetesting 🧪transpiler 🚊

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions