• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

sandialabs / LoQS / 29874064839

21 Jul 2026 10:31PM UTC coverage: 87.765% (+5.4%) from 82.395%
29874064839

push

github

web-flow
Replace RepTuple enum structure with class-based structure (#95)

* Fix InstrumentRep gaps and add rep serialization fixtures

Found during test-coverage gap analysis for the
RepTuple/GateRep/InstrumentRep enum-to-class refactor (issue 72).

- npsvstate.py: input_reps omitted ZBASIS_OUTCOME_OPERATION_DICT
  despite implementing it.
- qsimstate.py: unsupported InstrumentRep now raises cleanly instead
  of hitting an unrelated assertion first.
- stimdictmodel.py: fix silent qubit-drop when merging a generic STIM
  circuit-string template across qubits; now raises if a template
  isn't self-indexed, with new regression tests.
- Add pre-refactor JSON/HDF5 serialization fixtures (with regenerable
  generator scripts) for RepTuple/DictNoiseModel/STIMDictNoiseModel,
  to validate the future legacy-decode shim against real bytes.

* Add test coverage for reps, DictNoiseModel, and PyGSTiNoiseModel

Found during test-coverage gap analysis for the
RepTuple/GateRep/InstrumentRep enum-to-class refactor (issue 72).

- test_reps.py: RepTuple validator tests and full reps_v1 fixture
  round-trip (JSON + HDF5).
- test_dictmodel.py: DictNoiseModel construction, gate/instrument
  dispatch, and dictmodel_v1 fixture round-trip.
- test_pygstimodel.py: PyGSTiNoiseModel gate/instrument rep selection
  against real pyGSTi models, including the previously-untested
  priority-fallback loop.
- test_stimdictmodel.py: add stimdictmodel_v1 fixture round-trip;
  strengthen two tautological tests.

Documents but does not fix: PyGSTiNoiseModel's qubit-label check
makes several constructor branches unreachable, qubit_aliases
doesn't bypass the label-format check as documented, and two
serialization quirks (bool/int coercion, JSON dict-key
stringification).

* Fix PyGSTiNoiseModel dispatch, bool coercion, STIMDictNoiseModel validation

- pygstimodel.py: PyGSTiNoiseModel.__init__ ran a qubit-label-format
  assertion before its type-dispatch chain, so the copy-constructor,
  DictNoiseMode... (continued)

1119 of 1252 branches covered (89.38%)

Branch coverage included in aggregate %.

6305 of 7207 relevant lines covered (87.48%)

0.87 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.94
/internal/encoder/jsonencoder.py


Source Not Available

The file "internal/encoder/jsonencoder.py" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc