diff --git a/src/braket/aws/aws_device.py b/src/braket/aws/aws_device.py index b8b40ebde..8603f648d 100644 --- a/src/braket/aws/aws_device.py +++ b/src/braket/aws/aws_device.py @@ -49,7 +49,7 @@ from braket.devices import Devices from braket.devices.device import Device from braket.emulation import Emulator -from braket.emulation.emulator_passes import ProgramType +from braket.emulation.emulation_passes import ProgramType from braket.ir.blackbird import Program as BlackbirdProgram from braket.ir.openqasm import Program as OpenQasmProgram from braket.parametric.free_parameter import FreeParameter diff --git a/src/braket/aws/aws_emulation.py b/src/braket/aws/aws_emulation.py index 2b380ee95..75ff9ad58 100644 --- a/src/braket/aws/aws_emulation.py +++ b/src/braket/aws/aws_emulation.py @@ -8,7 +8,7 @@ from braket.device_schema.ionq import IonqDeviceCapabilities from braket.device_schema.iqm import IqmDeviceCapabilities from braket.device_schema.rigetti import RigettiDeviceCapabilities -from braket.emulation.emulator_passes.gate_device_passes import ( +from braket.emulation.emulation_passes.gate_device_passes import ( ConnectivityValidator, GateConnectivityValidator, GateValidator, diff --git a/src/braket/emulation/base_emulator.py b/src/braket/emulation/base_emulator.py index 3c6b0b180..769a4df5a 100644 --- a/src/braket/emulation/base_emulator.py +++ b/src/braket/emulation/base_emulator.py @@ -2,7 +2,7 @@ from typing import Iterable, Union -from braket.emulation.emulator_passes import EmulationPass, ProgramType, ValidationPass +from braket.emulation.emulation_passes import EmulationPass, ProgramType, ValidationPass class BaseEmulator: diff --git a/src/braket/emulation/emulation_passes/__init__.py b/src/braket/emulation/emulation_passes/__init__.py new file mode 100644 index 000000000..a54b81cca --- /dev/null +++ b/src/braket/emulation/emulation_passes/__init__.py @@ -0,0 +1,5 @@ +from braket.emulation.emulation_passes.emulation_pass import ( # noqa: F401 + EmulationPass, + ProgramType, +) +from braket.emulation.emulation_passes.validation_pass import ValidationPass # noqa: F401 diff --git a/src/braket/emulation/emulator_passes/emulator_pass.py b/src/braket/emulation/emulation_passes/emulation_pass.py similarity index 100% rename from src/braket/emulation/emulator_passes/emulator_pass.py rename to src/braket/emulation/emulation_passes/emulation_pass.py diff --git a/src/braket/emulation/emulation_passes/gate_device_passes/__init__.py b/src/braket/emulation/emulation_passes/gate_device_passes/__init__.py new file mode 100644 index 000000000..030791be6 --- /dev/null +++ b/src/braket/emulation/emulation_passes/gate_device_passes/__init__.py @@ -0,0 +1,12 @@ +from braket.emulation.emulation_passes.gate_device_passes.connectivity_validator import ( # noqa: F401 E501 + ConnectivityValidator, +) +from braket.emulation.emulation_passes.gate_device_passes.gate_connectivity_validator import ( # noqa: F401 E501 + GateConnectivityValidator, +) +from braket.emulation.emulation_passes.gate_device_passes.gate_validator import ( # noqa: F401 E501 + GateValidator, +) +from braket.emulation.emulation_passes.gate_device_passes.qubit_count_validator import ( # noqa: F401 E501 + QubitCountValidator, +) diff --git a/src/braket/emulation/emulator_passes/gate_device_passes/connectivity_criterion.py b/src/braket/emulation/emulation_passes/gate_device_passes/connectivity_criterion.py similarity index 99% rename from src/braket/emulation/emulator_passes/gate_device_passes/connectivity_criterion.py rename to src/braket/emulation/emulation_passes/gate_device_passes/connectivity_criterion.py index 8a7691946..60ea7272d 100644 --- a/src/braket/emulation/emulator_passes/gate_device_passes/connectivity_criterion.py +++ b/src/braket/emulation/emulation_passes/gate_device_passes/connectivity_criterion.py @@ -7,7 +7,7 @@ from braket.circuits import Circuit from braket.circuits.compiler_directives import StartVerbatimBox from braket.circuits.gate import Gate -from braket.emulation.emulator_passes import ValidationPass +from braket.emulation.emulation_passes import ValidationPass from braket.registers.qubit_set import QubitSet diff --git a/src/braket/emulation/emulator_passes/gate_device_passes/connectivity_validator.py b/src/braket/emulation/emulation_passes/gate_device_passes/connectivity_validator.py similarity index 99% rename from src/braket/emulation/emulator_passes/gate_device_passes/connectivity_validator.py rename to src/braket/emulation/emulation_passes/gate_device_passes/connectivity_validator.py index 51c9f69d4..b858cc6a4 100644 --- a/src/braket/emulation/emulator_passes/gate_device_passes/connectivity_validator.py +++ b/src/braket/emulation/emulation_passes/gate_device_passes/connectivity_validator.py @@ -7,7 +7,7 @@ from braket.circuits import Circuit from braket.circuits.compiler_directives import StartVerbatimBox from braket.circuits.gate import Gate -from braket.emulation.emulator_passes import ValidationPass +from braket.emulation.emulation_passes import ValidationPass from braket.registers.qubit_set import QubitSet diff --git a/src/braket/emulation/emulator_passes/gate_device_passes/gate_connectivity_validator.py b/src/braket/emulation/emulation_passes/gate_device_passes/gate_connectivity_validator.py similarity index 99% rename from src/braket/emulation/emulator_passes/gate_device_passes/gate_connectivity_validator.py rename to src/braket/emulation/emulation_passes/gate_device_passes/gate_connectivity_validator.py index 723707559..b236aa87c 100644 --- a/src/braket/emulation/emulator_passes/gate_device_passes/gate_connectivity_validator.py +++ b/src/braket/emulation/emulation_passes/gate_device_passes/gate_connectivity_validator.py @@ -6,7 +6,7 @@ from braket.circuits.circuit import Circuit from braket.circuits.compiler_directives import EndVerbatimBox, StartVerbatimBox from braket.circuits.gate import Gate -from braket.emulation.emulator_passes import ValidationPass +from braket.emulation.emulation_passes import ValidationPass from braket.registers.qubit_set import QubitSet diff --git a/src/braket/emulation/emulator_passes/gate_device_passes/gate_validator.py b/src/braket/emulation/emulation_passes/gate_device_passes/gate_validator.py similarity index 98% rename from src/braket/emulation/emulator_passes/gate_device_passes/gate_validator.py rename to src/braket/emulation/emulation_passes/gate_device_passes/gate_validator.py index f13e492b9..c628879c3 100644 --- a/src/braket/emulation/emulator_passes/gate_device_passes/gate_validator.py +++ b/src/braket/emulation/emulation_passes/gate_device_passes/gate_validator.py @@ -5,7 +5,7 @@ from braket.circuits.compiler_directives import EndVerbatimBox, StartVerbatimBox from braket.circuits.gate import Gate from braket.circuits.translations import BRAKET_GATES -from braket.emulation.emulator_passes import ValidationPass +from braket.emulation.emulation_passes import ValidationPass class GateValidator(ValidationPass[Circuit]): diff --git a/src/braket/emulation/emulator_passes/gate_device_passes/qubit_count_validator.py b/src/braket/emulation/emulation_passes/gate_device_passes/qubit_count_validator.py similarity index 95% rename from src/braket/emulation/emulator_passes/gate_device_passes/qubit_count_validator.py rename to src/braket/emulation/emulation_passes/gate_device_passes/qubit_count_validator.py index 0ca9d3311..5ddf3cbbb 100644 --- a/src/braket/emulation/emulator_passes/gate_device_passes/qubit_count_validator.py +++ b/src/braket/emulation/emulation_passes/gate_device_passes/qubit_count_validator.py @@ -1,5 +1,5 @@ from braket.circuits import Circuit -from braket.emulation.emulator_passes import ValidationPass +from braket.emulation.emulation_passes import ValidationPass class QubitCountValidator(ValidationPass[Circuit]): diff --git a/src/braket/emulation/emulator_passes/validation_pass.py b/src/braket/emulation/emulation_passes/validation_pass.py similarity index 91% rename from src/braket/emulation/emulator_passes/validation_pass.py rename to src/braket/emulation/emulation_passes/validation_pass.py index 1641a3f79..ab3fa1ec7 100644 --- a/src/braket/emulation/emulator_passes/validation_pass.py +++ b/src/braket/emulation/emulation_passes/validation_pass.py @@ -2,7 +2,7 @@ from abc import abstractmethod -from braket.emulation.emulator_passes.emulator_pass import EmulationPass, ProgramType +from braket.emulation.emulation_passes.emulation_pass import EmulationPass, ProgramType class ValidationPass(EmulationPass[ProgramType]): diff --git a/src/braket/emulation/emulator.py b/src/braket/emulation/emulator.py index ec20563d4..12b56f36f 100644 --- a/src/braket/emulation/emulator.py +++ b/src/braket/emulation/emulator.py @@ -8,7 +8,7 @@ from braket.devices import Device from braket.devices.local_simulator import LocalSimulator from braket.emulation.base_emulator import BaseEmulator -from braket.emulation.emulator_passes import EmulationPass, ProgramType +from braket.emulation.emulation_passes import EmulationPass, ProgramType from braket.ir.openqasm import Program as OpenQasmProgram from braket.tasks import QuantumTask from braket.tasks.quantum_task_batch import QuantumTaskBatch diff --git a/src/braket/emulation/emulator_passes/__init__.py b/src/braket/emulation/emulator_passes/__init__.py deleted file mode 100644 index aac13fe94..000000000 --- a/src/braket/emulation/emulator_passes/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from braket.emulation.emulator_passes.emulator_pass import EmulationPass, ProgramType # noqa: F401 -from braket.emulation.emulator_passes.validation_pass import ValidationPass # noqa: F401 diff --git a/src/braket/emulation/emulator_passes/gate_device_passes/__init__.py b/src/braket/emulation/emulator_passes/gate_device_passes/__init__.py deleted file mode 100644 index 3a5bf20cb..000000000 --- a/src/braket/emulation/emulator_passes/gate_device_passes/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -from braket.emulation.emulator_passes.gate_device_passes.connectivity_validator import ( # noqa: F401 E501 - ConnectivityValidator, -) -from braket.emulation.emulator_passes.gate_device_passes.gate_connectivity_validator import ( # noqa: F401 E501 - GateConnectivityValidator, -) -from braket.emulation.emulator_passes.gate_device_passes.gate_validator import ( # noqa: F401 E501 - GateValidator, -) -from braket.emulation.emulator_passes.gate_device_passes.qubit_count_validator import ( # noqa: F401 E501 - QubitCountValidator, -) diff --git a/test/unit_tests/braket/aws/test_aws_emulation.py b/test/unit_tests/braket/aws/test_aws_emulation.py index 1b4465938..6d0728326 100644 --- a/test/unit_tests/braket/aws/test_aws_emulation.py +++ b/test/unit_tests/braket/aws/test_aws_emulation.py @@ -31,7 +31,7 @@ from braket.devices import Devices from braket.devices.local_simulator import LocalSimulator from braket.emulation import Emulator -from braket.emulation.emulator_passes.gate_device_passes import ( +from braket.emulation.emulation_passes.gate_device_passes import ( ConnectivityValidator, GateConnectivityValidator, GateValidator, diff --git a/test/unit_tests/braket/emulation/test_connectivity_validator.py b/test/unit_tests/braket/emulation/test_connectivity_validator.py index 58709e490..c79ad0106 100644 --- a/test/unit_tests/braket/emulation/test_connectivity_validator.py +++ b/test/unit_tests/braket/emulation/test_connectivity_validator.py @@ -4,7 +4,7 @@ from networkx.utils import graphs_equal from braket.circuits import Circuit -from braket.emulation.emulator_passes.gate_device_passes import ConnectivityValidator +from braket.emulation.emulation_passes.gate_device_passes import ConnectivityValidator @pytest.fixture diff --git a/test/unit_tests/braket/emulation/test_emulator.py b/test/unit_tests/braket/emulation/test_emulator.py index a105ab804..84ac902bb 100644 --- a/test/unit_tests/braket/emulation/test_emulator.py +++ b/test/unit_tests/braket/emulation/test_emulator.py @@ -10,8 +10,8 @@ from braket.default_simulator import DensityMatrixSimulator, StateVectorSimulator from braket.devices import local_simulator from braket.emulation import Emulator -from braket.emulation.emulator_passes import EmulationPass, ProgramType -from braket.emulation.emulator_passes.gate_device_passes import GateValidator, QubitCountValidator +from braket.emulation.emulation_passes import EmulationPass, ProgramType +from braket.emulation.emulation_passes.gate_device_passes import GateValidator, QubitCountValidator class AlwaysFailPass(EmulationPass[ProgramType]): diff --git a/test/unit_tests/braket/emulation/test_gate_connectivity_validator.py b/test/unit_tests/braket/emulation/test_gate_connectivity_validator.py index c9852606b..ec629a4c1 100644 --- a/test/unit_tests/braket/emulation/test_gate_connectivity_validator.py +++ b/test/unit_tests/braket/emulation/test_gate_connectivity_validator.py @@ -5,7 +5,7 @@ from braket.circuits import Circuit, Gate from braket.circuits.noises import BitFlip -from braket.emulation.emulator_passes.gate_device_passes import GateConnectivityValidator +from braket.emulation.emulation_passes.gate_device_passes import GateConnectivityValidator @pytest.fixture diff --git a/test/unit_tests/braket/emulation/test_gate_validator.py b/test/unit_tests/braket/emulation/test_gate_validator.py index 51b57980d..a6de6a509 100644 --- a/test/unit_tests/braket/emulation/test_gate_validator.py +++ b/test/unit_tests/braket/emulation/test_gate_validator.py @@ -4,7 +4,7 @@ from braket.circuits import Circuit, Gate, Instruction from braket.circuits.compiler_directives import StartVerbatimBox from braket.circuits.noises import BitFlip -from braket.emulation.emulator_passes.gate_device_passes import GateValidator +from braket.emulation.emulation_passes.gate_device_passes import GateValidator @pytest.fixture diff --git a/test/unit_tests/braket/emulation/test_qubit_count_validator.py b/test/unit_tests/braket/emulation/test_qubit_count_validator.py index 4e2d536a4..effb21367 100644 --- a/test/unit_tests/braket/emulation/test_qubit_count_validator.py +++ b/test/unit_tests/braket/emulation/test_qubit_count_validator.py @@ -2,7 +2,7 @@ import pytest from braket.circuits import Circuit -from braket.emulation.emulator_passes.gate_device_passes import QubitCountValidator +from braket.emulation.emulation_passes.gate_device_passes import QubitCountValidator @pytest.mark.parametrize(