diff --git a/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/utils.py b/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/utils.py index fea6225d1..d18fc97d7 100644 --- a/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/utils.py +++ b/src/qibocal/protocols/characterization/two_qubit_interaction/chsh/utils.py @@ -17,4 +17,7 @@ def compute_chsh(frequencies, basis, i): chsh += (-1) ** (int(outcome[0]) + int(outcome[1])) * freq[outcome][i] aux += 1 nshots = sum(freq[x][i] for x in freq) - return chsh / nshots + try: + return chsh / nshots + except ZeroDivisionError: + return 0