Skip to content

fix: validate logical register parameters - #4

Merged
Pyhroff merged 3 commits into
masterfrom
fix/register-input-validation-20261010
Oct 11, 2026
Merged

Pyhroff merged 3 commits into
masterfrom
fix/register-input-validation-20261010

Conversation

@Pyhroff

@Pyhroff Pyhroff commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Validate register dimensions before starting a simulation, preventing empty-register division by zero.
  • Require an odd surface-code distance of at least 3.
  • Require finite noise probabilities in [0, 1] and integer-or-None seeds.
  • Add regression tests for invalid parameters and a valid deterministic register result.

Validation status

  • The default branch currently has no configured CI workflow, so this PR may not receive automated checks until the existing CI-enabling PR is merged.
  • Common token, private-key, and credential-assignment pattern scan found no matches.
  • Changed paths are backend/qec/register.py and new backend/tests/test_register.py; these do not overlap files changed by the existing open PRs.

Per repository merge policy, leave this PR open unless all configured CI checks can be verified green.

@Pyhroff
Pyhroff merged commit 2c7bd4b into master Oct 11, 2026
1 check 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.

1 participant