Skip to content

Commit

Permalink
fix isort
Browse files Browse the repository at this point in the history
  • Loading branch information
astralcai committed Aug 30, 2024
1 parent f627747 commit 2f849ff
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pennylane/devices/default_qubit_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import inspect
import logging
import warnings
import numpy as np

import numpy as np
from packaging.version import Version

try:
Expand Down
11 changes: 3 additions & 8 deletions pennylane/devices/reference_qubit.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@

import numpy as np

from pennylane.typing import Result

import pennylane as qml
from pennylane.typing import Result

from .device_api import Device
from .execution_config import DefaultExecutionConfig
from .preprocess import (
decompose,
validate_measurements,
validate_device_wires,
)
from .modifiers import single_tape_support, simulator_tracking
from .modifiers import simulator_tracking, single_tape_support
from .preprocess import decompose, validate_device_wires, validate_measurements


def sample_state(state: np.ndarray, shots: int, seed=None):
Expand Down
3 changes: 2 additions & 1 deletion pennylane/gradients/vjp.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
of tapes.
"""

import autograd

# pylint: disable=no-member, too-many-branches
import numpy as np

Check notice on line 22 in pennylane/gradients/vjp.py

View check run for this annotation

codefactor.io / CodeFactor

pennylane/gradients/vjp.py#L22

third party import "import numpy as np" should be placed before "import autograd" (wrong-import-order)
import autograd

import pennylane as qml

Expand Down
2 changes: 1 addition & 1 deletion pennylane/numpy/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
it works with the PennyLane :class:`~.tensor` class.
"""

from autograd.numpy import random as _random
from numpy import __version__ as np_version

Check notice on line 20 in pennylane/numpy/random.py

View check run for this annotation

codefactor.io / CodeFactor

pennylane/numpy/random.py#L20

third party import "from numpy import __version__ as np_version" should be placed before "from autograd.numpy import random as _random" (wrong-import-order)
from numpy.random import MT19937, PCG64, SFC64, Philox # pylint: disable=unused-import

Check notice on line 21 in pennylane/numpy/random.py

View check run for this annotation

codefactor.io / CodeFactor

pennylane/numpy/random.py#L21

third party import "from numpy.random import MT19937, PCG64, SFC64, Philox" should be placed before "from autograd.numpy import random as _random" (wrong-import-order)
from autograd.numpy import random as _random
from packaging.specifiers import SpecifierSet
from packaging.version import Version

Expand Down
2 changes: 1 addition & 1 deletion pennylane/qaoa/cycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from collections.abc import Iterable
from typing import Union

import numpy as np
import networkx as nx
import numpy as np

Check notice on line 23 in pennylane/qaoa/cycle.py

View check run for this annotation

codefactor.io / CodeFactor

pennylane/qaoa/cycle.py#L23

third party import "import numpy as np" should be placed before "import networkx as nx" (wrong-import-order)
import rustworkx as rx

import pennylane as qml
Expand Down

0 comments on commit 2f849ff

Please sign in to comment.