Zero-length dynamic control vectors are misinterpreted as scalar controls
Los mantenedores suelen responder en 1 día
@schweitzpgi ya está trabajando en esto.
Desde el 31/8/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Required prerequisites
- Consult the security policy. If reporting a security vulnerability, do not report the bug using this form. Use the process described in the policy to report the issue.
- Make sure you've read the documentation. Your issue may be addressed there.
- Search the issue tracker to verify that this hasn't already been reported. +1 or comment there if it has.
- If possible, make a PR with a failing test to give us a starting point to work on!
Describe the bug
CUDA-Q fails when a dynamically sized control vector is empty. An empty control set should apply the operation without controls, but the runtime instead treats the vector pointer as a scalar qubit pointer.
Steps to reproduce the bug
import cudaq
@cudaq.kernel
def flip_on_slice(v: cudaq.qview, n: int):
x.ctrl(v[1:n + 1], v[0])
@cudaq.kernel
def controlled(n: int):
q = cudaq.qvector(n + 1)
flip_on_slice(q, n)
mz(q)
print(cudaq.sample(controlled, 0, shots_count=20))
Expected behavior
v[1:1] is an empty control set, so x applies normally to v[0]: { 1:20 }
Is this a regression? If it is, put the last known working version (or commit) here.
Not a regression
Environment
- CUDA-Q version: main
- Python version: N/A
- C++ compiler: N/A
- Operating system: N/A
Suggestions
No response
- Lenguaje dominante
- C++
- Estrellas
- 1.2k
- Forks
- 508
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 100
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Sin 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 NVIDIA/cuda-quantum
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
NVIDIA/cuda-quantum#6035 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 77/100
NVIDIA/cuda-quantum#6034 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NVIDIA/cuda-quantum#6033 ·
Los mantenedores suelen responder en 1 día
-
Point the CUDA-Q Pulse research preview docs to the released cudaq-pulse packagePosiblemente ocupada @fedonman la tomó hace 2 días. Abierto
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
NVIDIA/cuda-quantum#6031 ·
Los mantenedores suelen responder en 1 día
-
Realtime fnv1a_hash sign-extends char, so a non-ASCII handler name gets a platform-dependent function idPosiblemente ocupada @fedonman la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
NVIDIA/cuda-quantum#6029 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NVIDIA/cuda-quantum
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 2 días
-
bug data-types
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ClickHouse/clickhouse-cpp#645 ·
Los mantenedores suelen responder en 1 día
-
bug compatibility difficulty:easy prio:normal
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NatronGitHub/openfx-misc#524 ·
Los mantenedores suelen responder en 1 día
-
[内容提案] 现在C++模块的CMake支持有更新,需要进行同步Abiertodocumentation enhancement help wanted P0
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Awesome-Embedded-Learning-Studio/Tutorial_AwesomeModernCPP#359 ·
Los mantenedores suelen responder en 1 día
-
Type: Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
openscad/openscad#7360 · 2 comentarios ·
Los mantenedores suelen responder en 1 día