Skip to content

Commit

Permalink
initial movement of files 👌
Browse files Browse the repository at this point in the history
  • Loading branch information
andrijapau committed Nov 28, 2024
1 parent 2633ef4 commit 9aa368f
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 603 deletions.
2 changes: 1 addition & 1 deletion doc/introduction/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ a :class:`QNode <pennylane.QNode>`, e.g.,
.. note::
If no interface is specified, PennyLane will automatically determine the interface based on provided arguments and keyword arguments.
See ``qml.workflow.SUPPORTED_INTERFACES`` for a list of all accepted interface strings.
See ``qml.math.SUPPORTED_INTERFACES`` for a list of all accepted interface strings.

.. warning::

Expand Down
2 changes: 1 addition & 1 deletion pennylane/devices/execution_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from dataclasses import dataclass, field
from typing import Optional, Union

from pennylane.math import SUPPORTED_INTERFACE_NAMES
from pennylane.transforms.core import TransformDispatcher
from pennylane.workflow import SUPPORTED_INTERFACE_NAMES


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion pennylane/devices/legacy_facade.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
from dataclasses import replace

import pennylane as qml
from pennylane.math import INTERFACE_MAP
from pennylane.measurements import MidMeasureMP, Shots
from pennylane.transforms.core.transform_program import TransformProgram
from pennylane.workflow.execution import INTERFACE_MAP

from .device_api import Device
from .execution_config import DefaultExecutionConfig
Expand Down
10 changes: 9 additions & 1 deletion pennylane/math/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,20 @@
allequal,
cast,
cast_like,
)
from .interface import (
convert_like,
get_canonical_interface_name,
SupportedInterfaceUserInput,
jpc_interfaces,
SUPPORTED_INTERFACE_NAMES,
INTERFACE_MAP,
get_deep_interface,
get_interface,
in_backprop,
is_abstract,
requires_grad,
is_abstract,
resolve_interface,
)

sum = ar.numpy.sum
Expand Down
3 changes: 2 additions & 1 deletion pennylane/math/multi_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
from numpy import ndarray

from . import single_dispatch # pylint:disable=unused-import
from .utils import cast, cast_like, get_interface, requires_grad
from .interface import get_interface, requires_grad
from .utils import cast, cast_like


# pylint:disable=redefined-outer-name
Expand Down
5 changes: 3 additions & 2 deletions pennylane/math/quantum.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
import pennylane as qml

from . import single_dispatch # pylint:disable=unused-import
from .interface import convert_like, get_interface, is_abstract
from .matrix_manipulation import _permute_dense_matrix
from .multi_dispatch import diag, dot, einsum, get_interface, scatter_element_add
from .utils import allclose, cast, cast_like, convert_like, is_abstract
from .multi_dispatch import diag, dot, einsum, scatter_element_add
from .utils import allclose, cast, cast_like

ABC_ARRAY = np.array(list(ABC))

Expand Down
2 changes: 1 addition & 1 deletion pennylane/math/single_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from packaging.version import Version
from scipy.linalg import block_diag as _scipy_block_diag

from .utils import get_deep_interface, is_abstract
from .interface import get_deep_interface, is_abstract


def _i(name):
Expand Down
Loading

0 comments on commit 9aa368f

Please sign in to comment.