Skip to content

Commit

Permalink
Exclude discarded shots when asserting decoder prediction size
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarBLG committed Oct 22, 2024
1 parent 34b4168 commit 485c0d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glue/sample/src/sinter/_decoding/_stim_then_decode_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ def sample(self, max_shots: int) -> AnonTaskStats:
raise ValueError("predictions.dtype != np.uint8")
if len(predictions.shape) != 2:
raise ValueError("len(predictions.shape) != 2")
if predictions.shape[0] != num_shots:
raise ValueError("predictions.shape[0] != num_shots")
if predictions.shape[0] != num_shots - num_discards_1:
raise ValueError("predictions.shape[0] != num_shots - num_discards_1")
if predictions.shape[1] < actual_obs.shape[1]:
raise ValueError("predictions.shape[1] < actual_obs.shape[1]")
if predictions.shape[1] > actual_obs.shape[1] + 1:
Expand Down

0 comments on commit 485c0d8

Please sign in to comment.