From 75913da2977758d8ed5a5b5cee3298e8ec7c4bbb Mon Sep 17 00:00:00 2001 From: Abe Coull <85974725+AbeCoull@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:13:13 -0800 Subject: [PATCH] import juliacall after env vars are set --- src/braket/simulator_v2/base_simulator_v2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/braket/simulator_v2/base_simulator_v2.py b/src/braket/simulator_v2/base_simulator_v2.py index 78975fb..e57c33c 100644 --- a/src/braket/simulator_v2/base_simulator_v2.py +++ b/src/braket/simulator_v2/base_simulator_v2.py @@ -32,7 +32,6 @@ def setup_julia() -> None: if "juliacall" in sys.modules: os.environ["PYTHON_JULIACALL_HANDLE_SIGNALS"] = "yes" return - import juliacall # noqa: PLC0415 for k, default in ( ("PYTHON_JULIACALL_HANDLE_SIGNALS", "yes"), ("PYTHON_JULIACALL_THREADS", "auto"), @@ -42,6 +41,8 @@ def setup_julia() -> None: ): os.environ[k] = os.environ.get(k, default) + import juliacall # noqa: PLC0415 + jl = juliacall.Main jl.seval("using BraketSimulator, JSON3") stock_oq3 = """