From a3d2f6f603f4001e9c6c7b043d317bc0c92ff6c1 Mon Sep 17 00:00:00 2001 From: Erick Date: Mon, 4 Dec 2023 11:35:39 -0500 Subject: [PATCH] Move logic to devices --- pennylane_lightning/core/__init__.py | 8 -------- pennylane_lightning/lightning_gpu/lightning_gpu.py | 4 ++-- pennylane_lightning/lightning_kokkos/lightning_kokkos.py | 4 ++-- pennylane_lightning/lightning_qubit/lightning_qubit.py | 4 ++-- 4 files changed, 6 insertions(+), 14 deletions(-) diff --git a/pennylane_lightning/core/__init__.py b/pennylane_lightning/core/__init__.py index 7155c76345..d3a37803e8 100644 --- a/pennylane_lightning/core/__init__.py +++ b/pennylane_lightning/core/__init__.py @@ -13,12 +13,4 @@ # limitations under the License. """PennyLane lightning module.""" -from pathlib import Path from ._version import __version__ - - -lightning_qubit_config_file = Path(__file__).parent / "src" / "lightning_qubit.toml" -lightning_kokkos_config_file = Path(__file__).parent / "src" / "lightning_kokkos.toml" -lightning_gpu_config_file = Path(__file__).parent / "src" / "lightning_gpu.toml" - -__all__ = ["__version__", "lightning_qubit_config_file", "lightning_kokkos_config_file", "lightning_gpu_config_file"] diff --git a/pennylane_lightning/lightning_gpu/lightning_gpu.py b/pennylane_lightning/lightning_gpu/lightning_gpu.py index 040aec99c6..827e7a26db 100644 --- a/pennylane_lightning/lightning_gpu/lightning_gpu.py +++ b/pennylane_lightning/lightning_gpu/lightning_gpu.py @@ -18,9 +18,9 @@ """ from warnings import warn +from pathlib import Path import numpy as np -from pennylane_lightning.core import lightning_gpu_config_file as config_file from pennylane_lightning.core.lightning_base import ( LightningBase, LightningBaseFallBack, @@ -231,7 +231,7 @@ class LightningGPU(LightningBase): # pylint: disable=too-many-instance-attribut operations = allowed_operations observables = allowed_observables _backend_info = backend_info - config = config_file + config = Path(__file__).parents[1] / "core" / "src" / "lightning_gpu.toml" def __init__( self, diff --git a/pennylane_lightning/lightning_kokkos/lightning_kokkos.py b/pennylane_lightning/lightning_kokkos/lightning_kokkos.py index 974ea86e8b..d9c2fee5f5 100644 --- a/pennylane_lightning/lightning_kokkos/lightning_kokkos.py +++ b/pennylane_lightning/lightning_kokkos/lightning_kokkos.py @@ -18,9 +18,9 @@ """ from warnings import warn +from pathlib import Path import numpy as np -from pennylane_lightning.core import lightning_kokkos_config_file as config_file from pennylane_lightning.core.lightning_base import ( LightningBase, LightningBaseFallBack, @@ -186,7 +186,7 @@ class LightningKokkos(LightningBase): operations = allowed_operations observables = allowed_observables _backend_info = backend_info - config = config_file + config = Path(__file__).parents[1] / "core" / "src" / "lightning_kokkos.toml" def __init__( self, diff --git a/pennylane_lightning/lightning_qubit/lightning_qubit.py b/pennylane_lightning/lightning_qubit/lightning_qubit.py index ab959eb3fd..2bc530954d 100644 --- a/pennylane_lightning/lightning_qubit/lightning_qubit.py +++ b/pennylane_lightning/lightning_qubit/lightning_qubit.py @@ -18,9 +18,9 @@ """ from warnings import warn +from pathlib import Path import numpy as np -from pennylane_lightning.core import lightning_qubit_config_file as config_file from pennylane_lightning.core.lightning_base import ( LightningBase, LightningBaseFallBack, @@ -187,7 +187,7 @@ class LightningQubit(LightningBase): operations = allowed_operations observables = allowed_observables _backend_info = backend_info - config = config_file + config = Path(__file__).parents[1] / "core" / "src" / "lightning_qubit.toml" def __init__( self,