Skip to content

Commit

Permalink
Fix isort version
Browse files Browse the repository at this point in the history
  • Loading branch information
maliasadi committed Mar 14, 2024
1 parent 6c758e4 commit 4f0403f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 21 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:

- name: Install dependencies
run:
python -m pip install click==8.0.4 black==23.7.0
python -m pip install click==8.0.4 black==23.7.0 isort==5.13.2

- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3

- name: Run isort
run: isort --profile black ./pennylane_lightning/ ./mpitests ./tests --check --diff

- name: Run Black
run: black -l 100 pennylane_lightning/ tests/ --check
run: black -l 100 pennylane_lightning/ tests/ --check --verbose

format-cpp:
name: Format (C++)
Expand Down
14 changes: 7 additions & 7 deletions pennylane_lightning/lightning_gpu/lightning_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,6 @@
from pennylane.ops.op_math import Adjoint
from pennylane.wires import Wires

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.core._serialize import (
QuantumScriptSerializer,
global_phase_diagonal,
)
from pennylane_lightning.core._version import __version__

# pylint: disable=no-name-in-module, ungrouped-imports
from pennylane_lightning.lightning_gpu_ops.algorithms import (
AdjointJacobianC64,
Expand All @@ -106,6 +99,13 @@
create_ops_listC128,
)

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.core._serialize import (
QuantumScriptSerializer,
global_phase_diagonal,
)
from pennylane_lightning.core._version import __version__

if MPI_SUPPORT:
from pennylane_lightning.lightning_gpu_ops.algorithmsMPI import (
AdjointJacobianMPIC64,
Expand Down
14 changes: 7 additions & 7 deletions pennylane_lightning/lightning_kokkos/lightning_kokkos.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@
from pennylane.ops.op_math import Adjoint
from pennylane.wires import Wires

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.core._serialize import (
QuantumScriptSerializer,
global_phase_diagonal,
)
from pennylane_lightning.core._version import __version__

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.lightning_kokkos_ops.algorithms import (
AdjointJacobianC64,
Expand All @@ -79,6 +72,13 @@
create_ops_listC128,
)

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.core._serialize import (
QuantumScriptSerializer,
global_phase_diagonal,
)
from pennylane_lightning.core._version import __version__

def _kokkos_dtype(dtype):
if dtype not in [np.complex128, np.complex64]: # pragma: no cover
raise ValueError(f"Data type is not supported for state-vector computation: {dtype}")
Expand Down
8 changes: 4 additions & 4 deletions pennylane_lightning/lightning_qubit/lightning_qubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
from pennylane.ops.op_math import Adjoint
from pennylane.wires import Wires

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.core._serialize import QuantumScriptSerializer
from pennylane_lightning.core._version import __version__

# pylint: disable=no-name-in-module, ungrouped-imports
from pennylane_lightning.lightning_qubit_ops.algorithms import (
AdjointJacobianC64,
Expand All @@ -76,10 +80,6 @@
create_ops_listC128,
)

# pylint: disable=import-error, no-name-in-module, ungrouped-imports
from pennylane_lightning.core._serialize import QuantumScriptSerializer
from pennylane_lightning.core._version import __version__

def _state_dtype(dtype):
if dtype not in [np.complex128, np.complex64]: # pragma: no cover
raise ValueError(f"Data type is not supported for state-vector computation: {dtype}")
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pre-commit>=2.19.0
black==23.7.0
clang-tidy~=16.0
clang-format~=16.0
isort
isort~=5.13.2
cmake
custatevec-cu12
pylint

0 comments on commit 4f0403f

Please sign in to comment.