From e314ddb12e8f2f1d07a7a95f0a4870d36fb98817 Mon Sep 17 00:00:00 2001 From: Yoav Romach Date: Sun, 12 May 2024 23:26:25 +0300 Subject: [PATCH] changed _variable import to public one --- qualang_tools/loops/loops.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qualang_tools/loops/loops.py b/qualang_tools/loops/loops.py index 6e7fd213..c7fa210d 100644 --- a/qualang_tools/loops/loops.py +++ b/qualang_tools/loops/loops.py @@ -10,7 +10,7 @@ import numpy as np import warnings from qm.qua import Cast -from qm.qua._dsl import _Variable +from qm.qua import Variable def from_array(var, array): @@ -27,7 +27,7 @@ def from_array(var, array): elif len(array) == 1: return var, array[0], var <= array[0], var + 1 # Check QUA vs python variables - if not isinstance(var, _Variable): + if not isinstance(var, Variable): raise Exception("The first argument must be a QUA variable.") if (not isinstance(array[0], (np.generic, int, float))) or (isinstance(array[0], bool)): raise Exception("The array must be an array of python variables.") @@ -145,7 +145,7 @@ def qua_arange(var, start, stop, step): :return: QUA for_ loop parameters (var, init, cond, update) as defined in https://qm-docs.qualang.io/api_references/qua/dsl_main?highlight=for_#qm.qua._dsl.for_. """ # Check QUA vs python variables - if not isinstance(var, _Variable): + if not isinstance(var, Variable): raise Exception("The first argument must be a QUA variable.") if ( (not isinstance(start, (np.generic, int, float))) @@ -186,7 +186,7 @@ def qua_linspace(var, start, stop, num): :return: QUA for_ loop parameters (var, init, cond, update) as defined in https://qm-docs.qualang.io/api_references/qua/dsl_main?highlight=for_#qm.qua._dsl.for_. """ # Check QUA vs python variables - if not isinstance(var, _Variable): + if not isinstance(var, Variable): raise Exception("The first argument must be a QUA variable.") if ( (not isinstance(start, (np.generic, int, float))) @@ -227,7 +227,7 @@ def qua_logspace(var, start, stop, num): :return: QUA for_ loop parameters (var, init, cond, update) as defined in https://qm-docs.qualang.io/api_references/qua/dsl_main?highlight=for_#qm.qua._dsl.for_. """ # Check QUA vs python variables - if not isinstance(var, _Variable): + if not isinstance(var, Variable): raise Exception("The first argument must be a QUA variable.") if ( (not isinstance(start, (np.generic, int, float)))