Skip to content

Commit

Permalink
Merge pull request #980 from qiboteam/default-threshold
Browse files Browse the repository at this point in the history
Set default threshold to 0
  • Loading branch information
alecandido authored Aug 14, 2024
2 parents 4f14594 + 0ca412b commit ff75eca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/qibolab/qubits.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class Qubit:
mean_exc_states: List[float] = field(default_factory=lambda: [0, 0])

# parameters for single shot classification
threshold: Optional[float] = None
threshold: float = 0.0
iq_angle: float = 0.0
kernel: Optional[np.ndarray] = field(default=None, repr=False)
# required for mixers (not sure if it should be here)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_instruments_rfsoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ def test_classify_shots(dummy_qrc):
target_shots = np.array([1, 1, 0, 0, 0, 0, 0])

assert (target_shots == shots).all()
with pytest.raises(ValueError):
instrument.classify_shots(i_val, q_val, qubit1)
shots = instrument.classify_shots(i_val, q_val, qubit1)
assert shots.shape == (7,)


def test_merge_sweep_results(dummy_qrc):
Expand Down

0 comments on commit ff75eca

Please sign in to comment.