OQCDevice: shots=0 silently runs the default 1,000 repeats instead of raising
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start in qbraid/runtime/oqc/device.py at the compiler configuration expression identified in the issue, then check the related OQC device tests for shot validation. Verify that omitted shots still use the configured repeat count and that shots=0 raises ValueError; an open linked pull request (#1442) may already be addressing this work.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
OQCDevice.run(..., shots=0) does not fail: it silently runs the task with OQC's default repeat count. Live on the Lucy Simulator (2026-09-24, task 1fff2eb9-16c9-45db-911a-44d380532888), shots=0 returned 1,000 samples ({'00': 516, '11': 484}), and result.details["shots"] was None.
Cause
qbraid/runtime/oqc/device.py builds the compiler config with
repeats=config_values["shots"] or config_values["repeats"],
0 is falsy, so it falls through to the default repeats. On a priced device this runs — and bills — a thousand shots the caller explicitly asked not to run.
Expected
Distinguish "not given" from 0: use repeats only when shots is None, and reject shots < 1 with a ValueError (1 shot works on both Lucy and Toshiko Tokyo-1).
- Lenguaje dominante
- Python
- Estrellas
- 117
- Forks
- 66
- Merge medio
- 1 d 4 h
- PR fusionados (30 d)
- 38
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
- 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/qBraid
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
device.run() fails for QuantumCircuit subclasses (e.g. bound qiskit-nature UCCSD): "Alias 'qiskit' is already registered with a different type"Posiblemente ocupada @DBVamsi la tomó hace 5 días. Abiertobug 🐛
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 43/100
Los mantenedores suelen responder en 1 día
-
qasm3→qasm2 transpile routes through Cirq and fragments classical registers, losing joint measurement counts (OQC)Posiblemente ocupada @danielgaskins la tomó hace 26 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
plot_connectivity_graph lets a non-physical calibration value rescale the whole colormapPosiblemente ocupada @danielgaskins la tomó hace 27 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
Todos los issues de qBraid/qBraid
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pgvector/pgvector-python#169 ·
-
ChaosEngine: backup-remote doctor row passes while consumer mode hides bot memory from gitPosiblemente ocupada @MohabMohie la tomó hoy. Abiertoagentic
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
ShaftHQ/SHAFT_ENGINE#7263 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
huggingface/smolagents#3045 ·
Los mantenedores suelen responder en 1 día