Skip to content

fix(#50): centralize duplicated default constants in utils.py - #102

Merged
Manideep3969 merged 1 commit into
mainfrom
fix/issue-50-duplicated-constants
Aug 20, 2026
Merged

fix(#50): centralize duplicated default constants in utils.py#102
Manideep3969 merged 1 commit into
mainfrom
fix/issue-50-duplicated-constants

Conversation

@Manideep3969

Copy link
Copy Markdown
Owner

Defines DEFAULT_SINGLE_QUBIT_ERROR, DEFAULT_TWO_QUBIT_ERROR, DEFAULT_READOUT_ERROR, DEFAULT_T2_TIME, DEFAULT_SINGLE_QUBIT_GATE_TIME, DEFAULT_TWO_QUBIT_GATE_TIME as module-level constants in utils.py. Replaces 6 hardcoded values across cost_model.py, cutting.py, scheduling.py, and utils.py. All 349 tests pass.

Default error rates (0.0005, 0.01, 0.015), T2 time (150e-6), and gate
durations (50e-9, 300e-9) were hardcoded in cost_model.py, cutting.py,
scheduling.py, and utils.py. Updating one would miss the others.

Fix: Define DEFAULT_SINGLE_QUBIT_ERROR, DEFAULT_TWO_QUBIT_ERROR,
DEFAULT_READOUT_ERROR, DEFAULT_T2_TIME, DEFAULT_SINGLE_QUBIT_GATE_TIME,
DEFAULT_TWO_QUBIT_GATE_TIME as module-level constants in utils.py.
Import and use them in cost_model.py, cutting.py, and scheduling.py.
@Manideep3969
Manideep3969 merged commit b828731 into main Aug 20, 2026
4 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.

1 participant