Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change: nobraket branch #29

Merged
merged 12 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,33 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
# don't run all the jobs at once to avoid wasting CI
max-parallel: 2
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Install juliaup
uses: julia-actions/install-juliaup@v2
with:
channel: '1'
- name: Update Julia registry
shell: julia --project=. --color=yes {0}
run: |
using Pkg
Pkg.Registry.update()
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get Python Simulator
uses: actions/checkout@v4
with:
path: python_sim
- name: Install dependencies
run: |
pip install tox
- name: Run Tests
run: |
cd python_sim
tox -e unit-tests
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
Expand Down
23 changes: 2 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,19 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent"
]
dynamic = ["version", "dependencies"]
dynamic = ["version", "dependencies", "optional-dependencies"]

[project.entry-points."braket.simulators"]
braket_sv_v2 = "braket.simulator_v2.state_vector_simulator_v2:StateVectorSimulatorV2"
braket_dm_v2 = "braket.simulator_v2.density_matrix_simulator_v2:DensityMatrixSimulatorV2"

[project.optional-dependencies]
test = [
"amazon-braket-pennylane-plugin",
"black",
"flake8",
"flake8-rst-docstrings",
"isort",
"pre-commit",
"pylint",
"pytest==7.1.2",
"pytest-benchmark",
"pytest-cov",
"pytest-rerunfailures",
"pytest-xdist",
"sphinx",
"sphinx-rtd-theme",
"sphinxcontrib-apidoc",
"tox"
]

[tool.setuptools]
include-package-data=false
package-data = {"*" = ["*.json"]}

[tool.setuptools.dynamic]
dependencies = {file = "requirements.txt"}
optional-dependencies.test = { file = "requirements-test.txt" }

[tool.isort]
profile = "black"
20 changes: 20 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
amazon-braket-pennylane-plugin
black
flake8
flake8-rst-docstrings
isort
pre-commit
pylint
pytest==7.1.2
pytest-benchmark
pytest-cov
pytest-rerunfailures
pytest-timeout
pytest-xdist
qiskit==1.2.0
qiskit-braket-provider==0.4.1
qiskit-algorithms
sphinx
sphinx-rtd-theme
sphinxcontrib-apidoc
tox
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
juliacall==0.9.20
juliacall==0.9.22
numpy
amazon-braket-schemas>=1.20.2
amazon-braket-sdk>=1.83.0
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ test=pytest
[tool:pytest]
xfail_strict = true
addopts =
--verbose
--verbose -n auto --durations=0 --durations-min=1 --dist worksteal
testpaths = test/unit_tests

[flake8]
Expand Down
7 changes: 5 additions & 2 deletions src/braket/juliapkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
"packages": {
"BraketSimulator": {
"uuid": "76d27892-9a0b-406c-98e4-7c178e9b3dff",
"url": "https://github.com/amazon-braket/BraketSimulator.jl.git",
"rev": "main"
"version": "0.0.4"
},
"JSON3": {
"uuid": "0f8b85d8-7281-11e9-16c2-39a750bddbf1",
"version": "1.14.0"
}
}
}
1 change: 0 additions & 1 deletion src/braket/simulator_v2/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from braket.simulator_v2.density_matrix_simulator_v2 import ( # noqa: F401
DensityMatrixSimulatorV2,
)
from braket.simulator_v2.julia_import import jl, jlBraketSimulator # noqa: F401
from braket.simulator_v2.state_vector_simulator_v2 import ( # noqa: F401
StateVectorSimulatorV2,
)
Expand Down
Loading
Loading