Environment
- PyQASM version: 0.3.2
- Python version: 3.12.8
- Operating system: Windows
What happened?
This may be a feature request, but it looks like a partially stubbed implementation based on #32, #121, and #125.
When attempting to define and run a custom gate with multiple controls:
gate Z_on_two3 aa, ab, ac {
x ac;
ctrl(2) @ z aa, ab, ac;
x ac;
}
ctrl@ gate Z_on_two3 qb[0], qb[1], qb[2];
I encounter the following error:
ValidationError: Unsupported controlled QASM operation: z with 3 controls
Source
The error originates from map_qasm_ctrl_op_to_callable, which currently contains the following comment:
# TODO: decompose controls if not built in
Expected Behavior(?)
Support for decomposing multi-controlled operations (e.g., z with 3+ controls), or clarification on whether this is intentionally unsupported.
Suggestions (Optional)
IDK if this is a semantic decomposition or needs full function decomposition to base gate ie through Solavay Kiteav or Cartan. Id assume it can be left to a semantic decomp as openqasm parsing itself accepts gate modifiers directly. LMK future development intent in this category
Environment
What happened?
This may be a feature request, but it looks like a partially stubbed implementation based on #32, #121, and #125.
When attempting to define and run a custom gate with multiple controls:
I encounter the following error:
Source
The error originates from
map_qasm_ctrl_op_to_callable, which currently contains the following comment:# TODO: decompose controls if not built inExpected Behavior(?)
Support for decomposing multi-controlled operations (e.g.,
zwith 3+ controls), or clarification on whether this is intentionally unsupported.Suggestions (Optional)
IDK if this is a semantic decomposition or needs full function decomposition to base gate ie through Solavay Kiteav or Cartan. Id assume it can be left to a semantic decomp as openqasm parsing itself accepts gate modifiers directly. LMK future development intent in this category