Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

OQCDevice: shots=0 silently runs the default 1,000 repeats instead of raising

Abierto
#1,441 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@danielgaskins ya está trabajando en esto.

Desde el 24/9/2026.

  • #1442 de @danielgaskins — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
api, backend

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

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de qBraid/qBraid

Todos los issues de qBraid/qBraid

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.