Skip to content

Commit

Permalink
feat: Add log
Browse files Browse the repository at this point in the history
  • Loading branch information
andrea-pasquale committed May 14, 2024
1 parent c9fbe07 commit 4336866
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Auxiliary functions to run CHSH protocol."""

from qibo.config import log

READOUT_BASIS = ["ZZ", "ZX", "XZ", "XX"]


Expand All @@ -20,4 +22,5 @@ def compute_chsh(frequencies, basis, i):
try:
return chsh / nshots
except ZeroDivisionError:
log.warning("Zero number of shots, returning zero.")
return 0

0 comments on commit 4336866

Please sign in to comment.