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:]) |
Control modifiers are now supported by pyqasm, so would like to add a test case for the following lines in
openqasm3_to_cudaq:qBraid/qbraid/transpiler/conversions/openqasm3/openqasm3_to_cudaq.py
Lines 155 to 166 in c4c2381