Skip to content

Commit

Permalink
per PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
krneta committed May 2, 2024
1 parent 9031d29 commit 94de55b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 31 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.9'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -e .[test]
pip install tox
- name: Run code format checks
run: |
black --check .
flake8
tox -e linters_check
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
requires-python = ">=3.9"
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License"
Expand Down
24 changes: 12 additions & 12 deletions src/braket/simulator_v2/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@


class StateVectorSimulatorV2(BaseLocalSimulator):
"""A state vector simulator meant to run directly on the user's machine using a Julia backend.
This class wraps a BraketSimulator object so that it can be run and returns
results using constructs from the SDK rather than Braket IR.
"""

DEVICE_ID = "braket_sv_v2"
_device = jlBraketSimulator.StateVectorSimulator(0, 0)

def initialize_simulation(self, **kwargs):
return

"""A simulator meant to run directly on the user's machine using a Julia backend.
This class wraps a BraketSimulator object so that it can be run and returns
results using constructs from the SDK rather than Braket IR.
"""

def run_jaqcd(
self,
circuit_ir: JaqcdProgram,
Expand Down Expand Up @@ -401,6 +401,12 @@ def properties(self) -> GateModelSimulatorDeviceCapabilities:


class DensityMatrixSimulatorV2(BaseLocalSimulator):
"""A density matrix simulator meant to run directly on the user's machine using a Julia backend.
This class wraps a BraketSimulator object so that it can be run and returns
results using constructs from the SDK rather than Braket IR.
"""

DEVICE_ID = "braket_dm_v2"
_device = jlBraketSimulator.DensityMatrixSimulator(0, 0)

Expand Down Expand Up @@ -536,12 +542,6 @@ def run_openqasm(
r.resultTypes = results
return r

"""A simulator meant to run directly on the user's machine using a Julia backend.
This class wraps a BraketSimulator object so that it can be run and returns
results using constructs from the SDK rather than Braket IR.
"""

@property
def properties(self) -> GateModelSimulatorDeviceCapabilities:
observables = ["x", "y", "z", "h", "i", "hermitian"]
Expand Down
14 changes: 0 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,6 @@ commands =
pytest {posargs} --cov-report term-missing --cov-report html --cov-report xml --cov=braket
extras = test

[testenv:integ-tests]
basepython = python3
setenv =
JULIA_PKG_USE_CLI_GIT=true
JULIA_CONDAPKG_BACKEND="Null"
# {posargs} contains additional arguments specified when invoking tox. e.g. tox -- -s -k test_foo.py
deps =
{[test-deps]deps}
allowlist_externals =
pytest
commands =
pytest {posargs} --cov-report term-missing --cov-report html --cov-report xml --cov=braket
extras = test

[testenv:linters]
basepython = python3
skip_install = true
Expand Down

0 comments on commit 94de55b

Please sign in to comment.