Skip to content

Forward Gaussian widths in execute_with_cdr - #3165

Merged
natestemen merged 1 commit into
unitaryfoundation:mainfrom
vera-rubin:fix/cdr-gaussian-widths
Nov 3, 2026
Merged

natestemen merged 1 commit into
unitaryfoundation:mainfrom
vera-rubin:fix/cdr-gaussian-widths

Conversation

@vera-rubin

Copy link
Copy Markdown
Contributor

Description

execute_with_cdr ignored sigma_select and sigma_replace. We now forward both options and keep omitted widths at 0.5.

Passed: five-case regression, 522 CDR tests, 2612 broader tests (2 xfails, excluding pyQuil QVM tests), Ruff, mypy.

Fixes #3164

License

  • I license this contribution under the terms of the GNU GPL, version 3 and grant Unitary Foundation the right to provide additional permissions as described in section 7 of the GNU GPL, version 3.

AI use

  • The code contains no generative AI work
  • The code is partially written by generative AI
  • The code is fully written by generative AI

Codex generated the patch, regression test and this description.

  • I added unit tests for new code.
  • I used type hints in function signatures.
  • I used Google-style docstrings for functions. No production functions were added.
  • I updated the documentation where relevant. Existing API docs describe the corrected behavior.

AI-assisted.

— ChipLab

Unpack the training width options and preserve defaults when a width is
omitted. Cover custom selection and replacement widths and their defaults.

Assisted-by: Codex

@natestemen natestemen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch: the sigma kwargs were being passed as a single dict under the name kwargs and so never reached generate_training_circuits. Thanks for the fix and the test.

@natestemen
natestemen merged commit 5c1606b into unitaryfoundation:main Nov 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

execute_with_cdr ignores both Gaussian width options

2 participants