From 2b0fe76e99040cd138f38c2284853c0ff545cc04 Mon Sep 17 00:00:00 2001 From: Matthew <46650770+mho291@users.noreply.github.com> Date: Thu, 18 Jul 2024 17:07:38 +0800 Subject: [PATCH] Move "from qibo import Circuit" to get_noisy_circuit function --- src/qibo/models/error_mitigation.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qibo/models/error_mitigation.py b/src/qibo/models/error_mitigation.py index 6da47ea019..ff3dbd9c7b 100644 --- a/src/qibo/models/error_mitigation.py +++ b/src/qibo/models/error_mitigation.py @@ -5,7 +5,7 @@ import numpy as np from scipy.optimize import curve_fit -from qibo import Circuit, gates +from qibo import gates from qibo.backends import GlobalBackend, _check_backend, _check_backend_and_local_state from qibo.config import raise_error @@ -69,6 +69,8 @@ def get_noisy_circuit( :class:`qibo.models.Circuit`: circuit with the inserted gate pairs or with global folding. """ + from qibo import Circuit # pylint: disable=import-outside-toplevel + if global_unitary_folding: # pragma: no cover # Create a copy of input circuit without measurements