[BUG] Unsupported Controlled QASM operations
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 18/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- compilers, quantum-computing
Línea de trabajo
The error comes from map_qasm_ctrl_op_to_callable, where a TODO notes that controls should be decomposed when not built in. Start by reading that function to see how controlled gates with three or more controls are currently rejected, and check the maintainers' linked issues #32, #121 and #125 for the intended design. Done means the reproducer gate Z_on_two3 with ctrl@ on three qubits validates and produces the expected operations, but the maintainers have not settled on a decomposition approach, so confirm direction in the thread first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Python
- Estrellas
- 29
- Forks
- 33
- Merge medio
- 2 d 4 h
- PR fusionados (30 d)
- 15
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de qBraid/pyqasm
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
enhancement error-handling program-validation
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
Move the QASM 2 printer and its branch pre-processing out of qasm2.pyPosiblemente ocupada @danielgaskins la tomó hace 8 días. Abiertoenhancement qasm2
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
qBraid/pyqasm#447 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[BUG] dumps() emits extern calls without a semicolon, producing unparsable QASMPosiblemente ocupada @Jah-yee la tomó hace 17 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 25/100
qBraid/pyqasm#438 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Parse failures raise ValidationError with an empty message; the ANTLR diagnostic is lostPosiblemente ocupada @tonycoder-hub la tomó hace 10 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 22/100
qBraid/pyqasm#436 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de qBraid/pyqasm
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CLIMADA-project/climada_python#1337 ·
Los mantenedores suelen responder en 3 días
-
tail without reverseAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
8go/matrix-commander#233 ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
documentation enhancement priority:high size:M
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Validate non-divisible effective batch sizes in the Unsloth LoRA backendPosiblemente ocupada @debesh-biswas la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100