From 2517ab53fbcc7c98316a48a2295860cf45f43206 Mon Sep 17 00:00:00 2001 From: Pablo Andres-Martinez Date: Tue, 3 Oct 2023 16:00:40 -0700 Subject: [PATCH] Warning now using warnings module --- pytket/extensions/cutensornet/mps/mps.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pytket/extensions/cutensornet/mps/mps.py b/pytket/extensions/cutensornet/mps/mps.py index 762958cc..a5f40f64 100644 --- a/pytket/extensions/cutensornet/mps/mps.py +++ b/pytket/extensions/cutensornet/mps/mps.py @@ -174,9 +174,10 @@ def __init__( self.zero = value_of_zero if value_of_zero > self._atol / 1000: - logging.warning( + warnings.warn( "Your chosen value_of_zero is relatively large. " - "Faithfulness of final fidelity estimate is not guaranteed." + "Faithfulness of final fidelity estimate is not guaranteed.", + UserWarning, ) self.k = k