Skip to content

Commit

Permalink
change: Rename emulator_passes directory to emulation_passes
Browse files Browse the repository at this point in the history
  • Loading branch information
ltnln committed Jul 30, 2024
1 parent 3b500a3 commit 7d7279e
Show file tree
Hide file tree
Showing 21 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion src/braket/aws/aws_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/braket/aws/aws_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/braket/emulation/base_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions src/braket/emulation/emulation_passes/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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,
)
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
Original file line number Diff line number Diff line change
@@ -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]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
2 changes: 1 addition & 1 deletion src/braket/emulation/emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/braket/emulation/emulator_passes/__init__.py

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion test/unit_tests/braket/aws/test_aws_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/unit_tests/braket/emulation/test_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/unit_tests/braket/emulation/test_gate_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7d7279e

Please sign in to comment.