Spaces:
Sleeping
Sleeping
Commit History
-
Code quality cleanup + first unit-test seed
Yuchen YuanPost-audit polish on the bug-fix wave from the last 9 commits: * Hoist function-level constants to module top so they're discoverable and reusable: _FAKE_BACKENDS_AVAILABLE, _FIDELITY_METHODS, _FIDELITY_UNBOUND_POLICIES, _COMPVQC_MAX_QP_VARS, _COMPVQC_ROTATION_GATES. * Move 'import re' from inside _format_exception_for_user to the file's top-level imports. * Standardise validation error phrasing on 'Choose one of: ...' (was a mix of 'Allowed values:' and 'Choose one of:'). * Add the same name-validation rigour to _handle_ibm_backend that _handle_fake_backend has — refuse empty / non-string names with a clear message, and surface IBM's resolution failure through _format_exception_for_user instead of letting it bubble as a 500. * Drop the now-unused '_qpy_bytes' alias from run_cache.py; the one remaining call site uses the canonical name directly. * Drop the trivial _is_known_fake_backend wrapper; inline the membership test at the one …6962cb3