From 4a14942cfd301cbfa7f430c143226d9a33ee07fa Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Sat, 16 Nov 2024 13:04:04 +0100 Subject: [PATCH] fix: Avoid reconnections --- src/qibolab/_core/instruments/qblox/cluster.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qibolab/_core/instruments/qblox/cluster.py b/src/qibolab/_core/instruments/qblox/cluster.py index ab9a464fe..87f0a8aa4 100644 --- a/src/qibolab/_core/instruments/qblox/cluster.py +++ b/src/qibolab/_core/instruments/qblox/cluster.py @@ -90,6 +90,9 @@ def sampling_rate(self) -> int: return SAMPLING_RATE def connect(self): + if self.is_connected: + return + self._cluster = find_or_create_instrument( qblox.Cluster, recreate=True, name=self.name, identifier=self.address )