Fix docstring formatting and stale Args in EngineProcessor.get_config and list_configs
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 91/100
- Tipo di issue
- Documentazione
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- documentation
Direzione di ricerca
Read the get_config and list_configs docstrings in cirq-google/cirq_google/engine/engine_processor.py around lines 426–476. Compare each Args section with the method signature, correct the stale parameter descriptions and indentation, and format the Returns section as an indented block. Done when the generated EngineProcessor API reference renders both sections correctly.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the issue
The docstrings for cirq_google.EngineProcessor.get_config and cirq_google.EngineProcessor.list_configs in cirq-google/cirq_google/engine/engine_processor.py have formatting errors and stale parameter documentation that break generated API reference docs:
EngineProcessor.get_config (L426–L454)
Returns: The quantum processor config.is on a single line instead of an indented block underReturns:, so the generated reference documentation renders it as raw plain text instead of aReturnssection/table.Args:lists parameters that do not exist on this method:processor_idandrun_name(which also has the typo"if none id provided.").- The description references
run_nameinstead ofdevice_config_revision. config_nameis misdescribed as"The quantum processor's unique identifier."rather than the configuration identifier.
EngineProcessor.list_configs (L456–L476)
- The
Args:andReturns:bodies use 3-space indentation instead of 4-space indentation. Args:listsprocessor_id, which is not a parameter ofEngineProcessor.list_configs.
Explain how to reproduce the bug or problem
Inspect the docstrings in cirq-google/cirq_google/engine/engine_processor.py (lines 426–476) or the generated EngineProcessor reference documentation:
def get_config(
self,
device_config_revision: processor_config.DeviceConfigRevision | None = None,
config_name: str = '',
) -> processor_config.ProcessorConfig | None:
"""Retrieves a ProcessorConfig from an automation run.
If no `run_name` and `config_name` are specified, the internally configured default config
is returned.
Args:
processor_id: The processor unique identifier.
device_config_revision: Specifies either the snapshot_id or the run_name.
config_name: The quantum processor's unique identifier.
run_name: The automation run name. Use 'default'
if none id provided.
Returns: The quantum processor config.
"""
def list_configs(
self, device_config_revision: processor_config.DeviceConfigRevision | None = None
) -> list[processor_config.ProcessorConfig]:
"""Returns list of ProcessorConfigs from the given snapshot.
Args:
processor_id: The processor unique identifier.
device_config_revision: Specifies either the snapshot_id or the run_name.
Returns:
List of ProcessorConfigs for this processor.
"""
Tell us the version of Cirq where this happens
Present on main (and v1.7.0).
- Lingua principale
- Python
- Stelle
- 5.1k
- Fork
- 1.3k
- Merge medio
- 1g 12h
- PR unite (30g)
- 48
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di quantumlib/Cirq
-
Potential missed optimization: `drop_diagonal_before_measurement` leaves an identity `PhasedXZGate` that blocks further removalForse già presa @jangyoujin0917 l’ha presa 22 giorni fa. Apertaarea/gates area/optimization kind/feature-request triage/accepted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
quantumlib/Cirq#8523 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`defer_measurements` ignores `BitMaskKeyCondition.index` and changes circuit behaviorForse di nuovo libera @Tejendra-06 l’ha presa 54 giorni fa e non c’è nessuna pull request aperta. Apertagood for learning help wanted kind/bug-report skill/experienced triage/accepted triage/wont-fix
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
quantumlib/Cirq#8361 · 8 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
kind/feature-request triage/discuss
quantumlib/Cirq#8598 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug-report triage/discuss
Difficoltà 2/5 1-3 ore Idoneità per principianti 57/100
quantumlib/Cirq#8580 ·
I maintainer di solito rispondono entro 1 giorno
-
triage/discuss
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
quantumlib/Cirq#8558 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di quantumlib/Cirq
Issue simili
-
docs(contributing): the two things that silently block a PRForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaavailable documentation good first issue
Difficoltà 1/5 1-3 ore Idoneità per principianti 95/100
Nixitov/Riptide-Native#944 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
JTHCode/secretguard#24 ·
I maintainer di solito rispondono entro 1 giorno
-
area: middleware documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
omarelshamy25x/shamy-hijri#63 ·
I maintainer di solito rispondono entro 1 giorno