Fix docstring formatting and stale Args in EngineProcessor.get_config and list_configs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 91/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation
Research direction
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.
Written by the indexing model from the issue text.
Description
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).
- Dominant language
- Python
- Stars
- 5.1k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 48
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from quantumlib/Cirq
-
Potential missed optimization: `drop_diagonal_before_measurement` leaves an identity `PhasedXZGate` that blocks further removalPossibly taken @jangyoujin0917 claimed this 22 days ago. Openarea/gates area/optimization kind/feature-request triage/accepted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
quantumlib/Cirq#8523 · 1 comment ·
Maintainers usually reply within 1 day
-
`defer_measurements` ignores `BitMaskKeyCondition.index` and changes circuit behaviorMay be free again @Tejendra-06 claimed this 54 days ago, and no pull request is open. Opengood for learning help wanted kind/bug-report skill/experienced triage/accepted triage/wont-fix
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
quantumlib/Cirq#8361 · 8 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
kind/feature-request triage/discuss
quantumlib/Cirq#8598 ·
Maintainers usually reply within 1 day
-
kind/bug-report triage/discuss
Difficulty 2/5 1-3 hours Newbie friendliness 57/100
quantumlib/Cirq#8580 ·
Maintainers usually reply within 1 day
-
triage/discuss
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
quantumlib/Cirq#8558 ·
Maintainers usually reply within 1 day
Similar issues
-
docs(contributing): the two things that silently block a PRPossibly taken A pull request linked to this issue is open or already merged. Openavailable documentation good first issue
Difficulty 1/5 1-3 hours Newbie friendliness 95/100
Nixitov/Riptide-Native#944 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
JTHCode/secretguard#24 ·
Maintainers usually reply within 1 day
-
area: middleware documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 ·
Maintainers usually reply within 1 day