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

Merge current AutoQASM code from Braket SDK repo #1

Merged
merged 1,233 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1233 commits
Select commit Hold shift + click to select a range
2dd29dd
prepare release v1.61.0
Nov 6, 2023
9dfb98c
update development version to v1.61.1.dev0
Nov 6, 2023
9bfd34c
feature: support FreeParameter binding via `make_bound_program` (#779)
laurencap Nov 6, 2023
8dd8c7d
documentation: Improve docstring for make_bound_circuit (#784)
laurencap Nov 6, 2023
885b980
prepare release v1.61.0.post0
Nov 7, 2023
5408783
update development version to v1.61.1.dev0
Nov 7, 2023
7c2f958
Update decorators.md
rmshaffer Nov 7, 2023
f6e2f9a
Fix measurement of physical qubits (#788)
rmshaffer Nov 7, 2023
6b46755
Merge branch 'main' into feature/autoqasm
rmshaffer Nov 7, 2023
5ed43f3
feature: Add get_compiled_circuit convenience method (#787)
laurencap Nov 8, 2023
94dfa76
prepare release v1.62.0
Nov 9, 2023
7f28109
update development version to v1.62.1.dev0
Nov 9, 2023
77690e6
feature: Add support for FreeParameters in AutoQASM conditional state…
laurencap Nov 10, 2023
c345fdb
feat: support freeparameter in AutoQASM pulse instruction (#794)
yitchen-tim Nov 14, 2023
45c051a
feat: support AutoQASM program in AwsDevice.run (#795)
yitchen-tim Nov 14, 2023
87d48ff
feat: Support FreeParameter expressions in AutoQASM programs (#798)
rmshaffer Nov 15, 2023
4524ed0
Merge branch 'main' into feature/autoqasm
rmshaffer Nov 15, 2023
f1a549a
update: default no longer returning RETIRED devices from get_devices …
krneta Nov 15, 2023
0485562
doc: Add matrix expressions to docstrings (#756)
ykharkov Nov 16, 2023
20ac4e4
Fix broken link to example notebook (#802)
rmshaffer Nov 17, 2023
176c6a7
prepare release v1.62.1
Nov 17, 2023
44a2bbb
update development version to v1.62.2.dev0
Nov 17, 2023
8cdf8a4
feat: remove *args from api decorators (#803)
ajberdy Nov 17, 2023
5d8e38c
infra: code freeze workflow (#767)
ajberdy Nov 20, 2023
ab8e4d7
Merge branch 'main' into feature/autoqasm
rmshaffer Nov 21, 2023
2fff311
feat: build autoqasm program directly from main decorator (#804)
ajberdy Dec 4, 2023
ca581c0
feat: support free parameters in aq range indices (#820)
ajberdy Dec 4, 2023
8e8cdaa
Add Forte 1 device (#827)
speller26 Dec 5, 2023
8a8ef4e
feat: Allow reservation ARN in task and job creation (#826)
guomanmin Dec 5, 2023
c6ff90f
prepare release v1.63.0
Dec 5, 2023
75e0bfd
update development version to v1.63.1.dev0
Dec 5, 2023
5450a46
Merge branch 'main' into feature/autoqasm
rmshaffer Dec 5, 2023
aea53ae
infra: bump pypa/gh-action-pypi-publish from 1.8.10 to 1.8.11 (#825)
dependabot[bot] Dec 5, 2023
2bb1e74
update: adding a test to check for circular imports (#812)
krneta Dec 6, 2023
dedfb72
infra: no unfrozen prefix when variable is not present (#810)
ajberdy Dec 6, 2023
608a8dc
feat: add str, repr and getitem to BasisState (#808)
ajberdy Dec 6, 2023
788b8b6
prepare release v1.64.0
Dec 7, 2023
372cd53
update development version to v1.64.1.dev0
Dec 7, 2023
d47c6fc
infra: allow tox to use logical processors (#824)
AbeCoull Dec 7, 2023
bc126bc
infra: ignore rsyncdir warning raised by rsync testing in pytest-cov …
AbeCoull Dec 7, 2023
f4bef51
feat: qasm highlighting with display (#831)
ajberdy Dec 11, 2023
37bad90
infra: bump actions/setup-python from 4.7.1 to 5.0.0 (#833)
dependabot[bot] Dec 11, 2023
7787d27
infra: Install only tox for python-package workflow (#791)
AbeCoull Dec 11, 2023
12f1387
fix: make filter more convenient (#718)
jcjaskula-aws Dec 12, 2023
c1eb664
prepare release v1.64.1
Dec 12, 2023
f44ab58
update development version to v1.64.2.dev0
Dec 12, 2023
91ab4f5
docs: update main decorator type annotation (#835)
ajberdy Dec 12, 2023
568bf9d
feature: Support OpenQASM annotations in AutoQASM programs (#838)
rmshaffer Dec 15, 2023
b6f7d2d
Merge branch 'main' into feature/autoqasm
rmshaffer Dec 15, 2023
af8ddf8
Resolve error from merge
rmshaffer Dec 15, 2023
228f080
fix: treating OpenQASM builtin types as constants (#829)
krneta Dec 18, 2023
d95f937
add magic state distillation notebook (#823)
yitchen-tim Dec 18, 2023
b33191f
prepare release v1.64.2
Dec 19, 2023
d45c9c8
update development version to v1.64.3.dev0
Dec 19, 2023
5d8d04c
feat: add U and GPhase gates (#799)
jcjaskula-aws Dec 20, 2023
c262352
Merge branch 'main' into feature/autoqasm
rmshaffer Dec 21, 2023
1b35781
prepare release v1.65.0
Dec 21, 2023
788b198
update development version to v1.65.1.dev0
Dec 21, 2023
5850e06
update commit hash of mcm-sim (#843)
yitchen-tim Dec 21, 2023
fe741da
simplify looping reset in AutoQASM notebook (#844)
yitchen-tim Dec 22, 2023
212dcee
doc: Update AutoQASM docs to reflect recent changes (#845)
rmshaffer Dec 22, 2023
3102be7
Merge branch 'main' into feature/autoqasm
rmshaffer Dec 22, 2023
d5af538
fix: validate out circuits that contain only non-zero-qubit gates (#842)
jcjaskula-aws Dec 22, 2023
b7ab260
prepare release v1.65.1
Dec 25, 2023
8018fcb
update development version to v1.65.2.dev0
Dec 25, 2023
ad92350
Merge branch 'main' into feature/autoqasm
rmshaffer Jan 4, 2024
86a2f81
feat: update job name to use metadata (#853)
ajberdy Jan 10, 2024
81a74cd
prepare release v1.66.0
Jan 11, 2024
4b5f690
update development version to v1.66.1.dev0
Jan 11, 2024
9db5465
Merge branch 'main' into feature/autoqasm
rmshaffer Jan 18, 2024
7df9aa7
feat: add queue position to the logs for tasks and jobs (#821)
AbeCoull Jan 22, 2024
354d369
prepare release v1.67.0
Jan 23, 2024
0dcf117
update development version to v1.67.1.dev0
Jan 23, 2024
df390e3
feat: update S3 locations for jobs (#857)
ajberdy Jan 25, 2024
9a5f70d
prepare release v1.68.0
Jan 25, 2024
9b09837
update development version to v1.68.1.dev0
Jan 25, 2024
cc28083
infra: remove flake8-rst-docstring linter (#858)
AbeCoull Jan 25, 2024
343f2be
fix: add force flag for import testing (#864)
AbeCoull Jan 29, 2024
6d1d7fc
prepare release v1.68.1
Jan 29, 2024
db0f1f2
update development version to v1.68.2.dev0
Jan 29, 2024
6f20c32
infra: bump codecov/codecov-action from 3.1.4 to 3.1.5 (#863)
dependabot[bot] Jan 30, 2024
058108c
fix: update batch circuit to limit repeat calls (#865)
AbeCoull Jan 30, 2024
5667ecc
fix: update S3 uri regex for AWS sessions (#860)
AbeCoull Jan 30, 2024
8f797cc
prepare release v1.68.2
Jan 31, 2024
458249d
update development version to v1.68.3.dev0
Jan 31, 2024
e07672e
fix: Allow identities in PauliString observable (#867)
speller26 Feb 2, 2024
dfb5f2e
prepare release v1.68.3
Feb 5, 2024
f4f5955
update development version to v1.68.4.dev0
Feb 5, 2024
b5371f1
Merge branch 'main' into feature/autoqasm
laurencap Feb 5, 2024
4e3e9d9
feat: update OQpy to version 0.3.5 (#697)
jcjaskula-aws Feb 5, 2024
2977520
prepare release v1.69.0
Feb 6, 2024
2f1de8a
update development version to v1.69.1.dev0
Feb 6, 2024
9d8b741
fix: let price tracker checks skip over devices without execution win…
AbeCoull Feb 7, 2024
d74f253
feat: support qubits as subroutine args (#849)
ajberdy Feb 7, 2024
6818b6e
infra: update schema version to latest in setup.py (#870)
guomanmin Feb 7, 2024
20686bc
prepare release v1.69.1
Feb 8, 2024
adde1af
update development version to v1.69.2.dev0
Feb 8, 2024
671ea84
feat: Support noise models in DM simulators (#850)
yitchen-tim Feb 8, 2024
64a331d
feature: Add support for returning values from AutoQASM main (#871)
laurencap Feb 9, 2024
4180000
prepare release v1.70.0
Feb 12, 2024
14b2072
update development version to v1.70.1.dev0
Feb 12, 2024
ee91567
Do not autodeclare FreeParameter in OQpy (#872)
jcjaskula-aws Feb 13, 2024
3917b30
prepare release v1.70.1
Feb 13, 2024
d09d3a4
update development version to v1.70.2.dev0
Feb 13, 2024
8cc8b3b
fix: Sort input parameters when doing testing equality of two PulseSe…
jcjaskula-aws Feb 13, 2024
a0c7a13
Porting oqpy 0.3.5 upgrade to AutoQASM (#869)
jcjaskula-aws Feb 13, 2024
fa1d1ee
Merge branch 'main' into feature/autoqasm
rmshaffer Feb 13, 2024
b16cf75
prepare release v1.70.2
Feb 14, 2024
d53bcb5
update development version to v1.70.3.dev0
Feb 14, 2024
e11bb31
infra: update docstrings to be ruff compatible (#778)
AbeCoull Feb 16, 2024
3082b4c
Merge branch 'main' into feature/autoqasm
rmshaffer Feb 19, 2024
0d23ac1
infra: reuse AWS calls across integ tests (#797)
AbeCoull Feb 19, 2024
a6e617a
docs: add note about using env variables for endpoint (#878)
ajberdy Feb 19, 2024
c5662a1
feature: Follow up with AutoQASM return statement fixes (#876)
laurencap Feb 20, 2024
23858e4
maintenance: remove deadcode (#880)
laurencap Feb 20, 2024
c542924
Merge branch 'main' into feature/autoqasm
rmshaffer Feb 20, 2024
ccae267
change: Modify AutoQASM to consume autograph from diastatic-malt pack…
rmshaffer Feb 20, 2024
c0daba3
feature: Add support for returning tuples of values from aq.main (#882)
laurencap Feb 20, 2024
1c6a962
fix: use the caller's account id based on the session (#883)
AbeCoull Feb 20, 2024
7b1ffe4
fix: remove test with job creation with qpu (#889)
virajvchaudhari Feb 21, 2024
576b15c
prepare release v1.70.3
Feb 21, 2024
c19120e
update development version to v1.70.4.dev0
Feb 21, 2024
ff56a1f
Remove xfail test that has new bug report (#888)
laurencap Feb 21, 2024
d723235
documentation: Update example notebooks to use AutoQASM return statem…
laurencap Feb 23, 2024
879133c
feat: update log stream prefix for new jobs (#887)
ajberdy Feb 23, 2024
09099c0
prepare release v1.71.0
Feb 26, 2024
3769c77
update development version to v1.71.1.dev0
Feb 26, 2024
ac47de8
feat: FreeParameterExpression division (#885)
speller26 Feb 26, 2024
9d71155
prepare release v1.72.0
Feb 27, 2024
5136069
update development version to v1.72.1.dev0
Feb 27, 2024
0f9ff8d
fix: escape slash in metrics prefix (#897)
ajberdy Feb 28, 2024
732661d
prepare release v1.72.1
Feb 28, 2024
f437817
update development version to v1.72.2.dev0
Feb 28, 2024
7ff8d31
feature: Support AutoQASM return statements for pulse (#886)
laurencap Feb 28, 2024
0370766
infra: pin numpy to less than 2.x until we prepare for the migration …
AbeCoull Feb 29, 2024
4314100
fix: validate FreeParameter name (#895)
jcjaskula-aws Mar 1, 2024
f4d642a
test: Resolve integration test job ARNs becoming UUIDs (#900)
AbeCoull Mar 2, 2024
4b3f990
infra: bump pypa/gh-action-pypi-publish from 1.8.11 to 1.8.12 (#901)
dependabot[bot] Mar 4, 2024
8f2f2a2
prepare release v1.72.2
Mar 4, 2024
4ff8f6f
update development version to v1.72.3.dev0
Mar 4, 2024
4b97599
infra: Use Codecov token (#903)
speller26 Mar 4, 2024
b4245ea
infra: bump codecov/codecov-action from 3.1.5 to 4.0.1 (#868)
dependabot[bot] Mar 4, 2024
c49176b
feature: update circuit drawing (#846)
jcjaskula-aws Mar 6, 2024
da081b7
prepare release v1.73.0
Mar 7, 2024
b4955aa
update development version to v1.73.1.dev0
Mar 7, 2024
5deeac3
fix: allow for braket endpoint to be set within the jobs (#902)
AbeCoull Mar 7, 2024
1057756
prepare release v1.73.1
Mar 11, 2024
1106c6c
update development version to v1.73.2.dev0
Mar 11, 2024
9811b9b
infra: bump codecov/codecov-action from 4.0.1 to 4.1.0 (#906)
dependabot[bot] Mar 11, 2024
40219cd
infra: bump pypa/gh-action-pypi-publish from 1.8.12 to 1.8.14 (#907)
dependabot[bot] Mar 11, 2024
f4dc0ac
feat: Explicit build API for AutoQASM main program (#841)
rmshaffer Mar 12, 2024
95a95c0
Merge branch 'main' into feature/autoqasm
rmshaffer Mar 12, 2024
ebe3a8b
Change allow_implicit_build default to False (#909)
rmshaffer Mar 12, 2024
628781d
fix: increase tol value for our integ tests (#912)
krneta Mar 13, 2024
9e3ccda
prepare release v1.73.2
Mar 13, 2024
22955b1
update development version to v1.73.3.dev0
Mar 13, 2024
5e5b2f3
test: add in the protocol for the ssl context (#911)
AbeCoull Mar 13, 2024
6029c56
fix: store account id if already accessed (#908)
AbeCoull Mar 14, 2024
5ab4460
prepare release v1.73.3
Mar 18, 2024
fc624bb
update development version to v1.73.4.dev0
Mar 18, 2024
4e9ae75
feat: Allow sets of calibrations in batches (#859)
jcjaskula-aws Mar 18, 2024
314bf59
fix: batch tasking passing lists to single tasks (#917)
AbeCoull Mar 21, 2024
1751ec9
prepare release v1.74.0
Mar 21, 2024
661529a
update development version to v1.74.1.dev0
Mar 21, 2024
5e8f043
feature: Provide access to global qubit register inside AutoQASM prog…
rmshaffer Mar 27, 2024
ff34cd4
Merge branch 'main' into feature/autoqasm
rmshaffer Mar 27, 2024
8618fcb
fix: temporarily pin the schemas version (#924)
AbeCoull Mar 27, 2024
baf2ff2
prepare release v1.74.1
Mar 27, 2024
182b923
update development version to v1.74.2.dev0
Mar 27, 2024
cfbdd50
fix: change schemas constraint (#927)
AbeCoull Mar 27, 2024
c42d46e
feat: upgrade to pydantic 2.x (#926)
AbeCoull Mar 27, 2024
a526546
prepare release v1.75.0
Mar 28, 2024
5884b1f
update development version to v1.75.1.dev0
Mar 28, 2024
fa3455c
Replace usage of Optional and Union in type hints (#925)
rmshaffer Mar 28, 2024
d6209ee
fix: restore the dependent test back to pennylane (#928)
AbeCoull Mar 28, 2024
4bb8f63
Merge branch 'main' into feature/autoqasm
rmshaffer Mar 28, 2024
61ae9dd
Merge branch 'main' into feature/autoqasm
rmshaffer Mar 28, 2024
ecf30b6
doc: fix GPI2 gate matrix representation (#919)
AbeCoull Mar 28, 2024
e98aead
feature: add support for OpenQASM measure on a subset of qubits (#904)
ashlhans Apr 1, 2024
600baf2
prepare release v1.76.0
Apr 1, 2024
d5580dc
update development version to v1.76.1.dev0
Apr 1, 2024
790ede5
fix: iterative variable assignments in AutoQASM (#930)
rmshaffer Apr 2, 2024
c57a9ba
fix: prevent repeated measurements on a qubit (#937)
ashlhans Apr 5, 2024
943da39
Fix declaration bug introduced by PR #930 (#938)
rmshaffer Apr 5, 2024
ec9c00f
Merge branch 'main' into feature/autoqasm
rmshaffer Apr 5, 2024
b98bce5
fix: Support single-register measurements in `from_ir` (#934)
ashlhans Apr 5, 2024
1beeaac
prepare release v1.76.1
Apr 8, 2024
e93b8a7
update development version to v1.76.2.dev0
Apr 8, 2024
1de7dbe
fix: backwards compatiblity for local detuning (#942)
AbeCoull Apr 8, 2024
e17918b
prepare release v1.76.2
Apr 8, 2024
5b21c12
update development version to v1.76.3.dev0
Apr 8, 2024
64a2536
fix: Replace pkg_resources with importlib.metadata (#935)
tachikoma-li Apr 9, 2024
c687223
doc: Improve gphase unitary matrix definition in docstring (#944)
rmshaffer Apr 9, 2024
bc8e56a
prepare release v1.76.3
Apr 9, 2024
3ea6899
update development version to v1.76.4.dev0
Apr 9, 2024
e2da4ff
feat: rename shifting field to local detuning (#943)
AbeCoull Apr 9, 2024
bf07507
prepare release v1.77.0
Apr 10, 2024
f556567
update development version to v1.77.1.dev0
Apr 10, 2024
1e8d67f
Merge branch 'main' into feature/autoqasm
rmshaffer Apr 10, 2024
dbd65a9
Update mcm-sim commit hash
rmshaffer Apr 10, 2024
78a4969
fix: add measure qubit targets in braket_program_context (#947)
ashlhans Apr 10, 2024
fc045fa
prepare release v1.77.1
Apr 10, 2024
a60d715
update development version to v1.77.2.dev0
Apr 10, 2024
e1564a4
fix: remove shifting field from testing (#948)
AbeCoull Apr 10, 2024
da70fff
prepare release v1.77.2
Apr 10, 2024
04d8a95
update development version to v1.77.3.dev0
Apr 10, 2024
18aa64e
fix: measure target qubits are required (#940)
ashlhans Apr 11, 2024
7831de0
prepare release v1.77.3
Apr 11, 2024
53aba5e
update development version to v1.77.4.dev0
Apr 11, 2024
b1cd32d
doc: correct gphase matrix representation (#946)
rmshaffer Apr 12, 2024
a18d445
prepare release v1.77.3.post0
Apr 15, 2024
6e9a2dc
update development version to v1.77.4.dev0
Apr 15, 2024
5ed6590
fix: discretize method now takes None as an arg (#950)
AbeCoull Apr 15, 2024
de993f7
Merge branch 'main' into feature/autoqasm
rmshaffer Apr 15, 2024
0a90fa6
doc: Correct miscellaneous spelling mistakes in docstrings (#952)
mbeach-aws Apr 15, 2024
3499577
prepare release v1.77.4
Apr 16, 2024
9388a25
update development version to v1.77.5.dev0
Apr 16, 2024
f69c824
fix: remove optional discretization fields (#953)
AbeCoull Apr 16, 2024
f66a21a
prepare release v1.77.5
Apr 16, 2024
0e22849
update development version to v1.77.6.dev0
Apr 16, 2024
3698931
fix: if rydberg local is not pulled, pass in None (#959)
AbeCoull Apr 17, 2024
c3eb8b6
prepare release v1.77.6
Apr 17, 2024
9bda244
update development version to v1.77.7.dev0
Apr 17, 2024
0cd4531
feat: add phase RX gate (#945)
AbeCoull Apr 17, 2024
2bdd033
Merge branch 'main' into feature/autoqasm
rmshaffer Apr 17, 2024
b492031
Feature: Code refactoring with Sourcery (#954)
mbeach-aws Apr 17, 2024
c1a941f
prepare release v1.78.0
Apr 18, 2024
07d9e1e
update development version to v1.78.1.dev0
Apr 18, 2024
8193c7c
Merge branch 'main' into feature/autoqasm
rmshaffer Apr 22, 2024
d966222
feature: Direct Reservation context manager (#955)
mbeach-aws May 3, 2024
84c3bb7
doc: correct the example in the measure docstring (#965)
ashlhans May 3, 2024
72af596
Raise an error when a MainProgram is nested inside another MainProgra…
rmshaffer May 6, 2024
d62e288
feat: Add gate modifiers and additional supported gates to AutoQASM (…
rmshaffer May 6, 2024
15ac8ee
Merge branch 'main' into feature/autoqasm
rmshaffer May 6, 2024
ee8e544
Merge branch 'main' into feature/autoqasm
rmshaffer May 7, 2024
34ab0ca
Rearrange files, delete unnecessary folders
rmshaffer May 7, 2024
77fd314
Update files in repository root
rmshaffer May 7, 2024
1c75aad
Replace autoqasm import paths
rmshaffer May 7, 2024
e2f079d
Lint
rmshaffer May 7, 2024
8e39283
Add _sdk folder
rmshaffer May 7, 2024
c7cc442
Put version directly in setup.py
rmshaffer May 7, 2024
ffe52ef
Readme updates for standalone repo
rmshaffer May 7, 2024
98f5f92
Update workflows
rmshaffer May 7, 2024
959355d
Workflow updates
rmshaffer May 7, 2024
965d73d
Delete duplicate readme
rmshaffer May 7, 2024
4fcd0f8
Update simulator commit hash comments
rmshaffer May 7, 2024
79020a8
Update notebook import cell formatting
rmshaffer May 7, 2024
7e2a770
Lint example notebooks
rmshaffer May 7, 2024
32821c3
Enable sphinx build
rmshaffer May 7, 2024
acad083
Update mcm-sim branch hashes and comments
rmshaffer May 7, 2024
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
39 changes: 39 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[run]
parallel = True
branch = True
source =
src
omit =
**/braket/ir/*
**/braket/device_schema/*
**/braket/schema_common/*
**/braket/task_result/*
**/braket/simulator/*
*/site-packages/braket/*

[paths]
source =
src
*/site-packages/braket

[report]
show_missing = True
ignore_errors = True
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Skipping import testing
from importlib.metadata import entry_points

# Don't complain if tests don't hit defensive assertion code:
raise NotImplementedError

# Avoid situation where system version causes coverage issues
if sys.version_info.minor == 9:

[html]
directory = build/coverage

[xml]
output = build/coverage/coverage.xml
5 changes: 5 additions & 0 deletions .git-template/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
if [ -f .pre-commit-config.yaml ]; then
echo 'pre-commit configuration detected, but `pre-commit install` was never run' 1>&2
exit 1
fi
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Bug report
about: File a report to help us reproduce and fix the problem
title: ''
labels: 'bug'
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To reproduce**
A clear, step-by-step set of instructions to reproduce the bug.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots or logs**
If applicable, add screenshots or logs to help explain your problem.

**System information**
A description of your system. Please provide:
- **Amazon Braket Python SDK version**:
- **Amazon Braket Python Schemas version**:
- **Amazon Braket Python Default Simulator version**:
- **Python version**:

**Additional context**
Add any other context about the problem here.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://forums.aws.amazon.com/tags/braket
about: Use AWS Developer Forums to ask and answer questions
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Documentation request
about: Request improved documentation
title: ''
labels: 'documentation'
assignees: ''

---

**What did you find confusing? Please describe.**
A clear and concise description of what you found confusing. Ex. I tried to [...] but I didn't understand how to [...]

**Describe how documentation can be improved**
A clear and concise description of where documentation was lacking and how it can be improved.

**Additional context**
Add any other context or screenshots about the documentation request here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest new functionality for this library
title: ''
labels: 'feature'
assignees: ''

---

**Describe the feature you'd like**
A clear and concise description of the functionality you want.

**How would this feature be used? Please describe.**
A clear and concise description of the use case for this feature. Please provide an example, if possible.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
commit-message:
prefix: infra
22 changes: 22 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
*Issue #, if available:*

*Description of changes:*

*Testing done:*

## Merge Checklist

_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request._

#### General

- [ ] I have read the [CONTRIBUTING](https://github.com/amazon-braket/amazon-braket-sdk-python/blob/main/CONTRIBUTING.md) doc
- [ ] I used the commit message format described in [CONTRIBUTING](https://github.com/amazon-braket/amazon-braket-sdk-python/blob/main/CONTRIBUTING.md#commit-your-change)
- [ ] I have updated any necessary documentation, including [READMEs](https://github.com/amazon-braket/amazon-braket-sdk-python/blob/main/README.md) and [API docs](https://github.com/amazon-braket/amazon-braket-sdk-python/blob/main/CONTRIBUTING.md#documentation-guidelines) (if appropriate)

#### Tests

- [ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
- [ ] I have checked that my tests are not configured for a specific region or account (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
34 changes: 34 additions & 0 deletions .github/scripts/update_dependency.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

import fileinput
from pathlib import Path

# Here we replace the `amazon-braket-sdk` dependency to point to the file system; otherwise
# pip will install them separately, allowing it to override the version of
# any mutual dependencies with the sdk. By pointing to the file system, pip will be
# forced to reconcile the dependencies in setup.py with the dependencies of the sdk,
# and raise an error if there are conflicts. While we can't do this for every upstream
# dependency, we can do this for the ones we own to make sure that when the sdk updates
# its dependencies, these upstream github repos will not be impacted.

package = "amazon-braket-sdk"
path = Path.cwd().parent.resolve()

for line in fileinput.input("setup.py", inplace=True):
# Update the amazon-braket-sdk dependency in setup.py to use the local path. This
# would help catch conflicts during the installation process.
replaced_line = (
line if package not in line else f'"{package} @ file://{path}/{package}-python",\n'
)
print(replaced_line, end="")
29 changes: 29 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Check code format

on:
pull_request:
branches:
- main
- feature/**

permissions:
contents: read

jobs:
check-code-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install tox
- name: Run code format checks
run: |
tox -e linters_check
49 changes: 49 additions & 0 deletions .github/workflows/code-freeze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Code Freeze

on:
pull_request:
branches:
- main
workflow_dispatch:

permissions:
contents: read

env:
FROZEN: ${{ vars.FROZEN }}
UNFROZEN_PREFIX: ${{ vars.UNFROZEN_PREFIX }}

jobs:
check-pr-frozen-status:
runs-on: ubuntu-latest
steps:
- name: Fetch PR data and check if merge allowed
if: env.FROZEN == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PR_DATA=$(curl -s \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }})
BRANCH_NAME=$(echo $PR_DATA | jq .head.ref -r)
PR_TITLE=$(echo $PR_DATA | jq .title -r)

echo $BRANCH_NAME
echo $PR_TITLE

# if it's not a critical fix
if ! [[ "$PR_TITLE" == fix\(critical\):* ]]; then
# and there's an unfrozen prefix
if ! [[ -z $UNFROZEN_PREFIX ]]; then
# check if the branch matches unfrozen prefix
if [[ "$BRANCH_NAME" != $UNFROZEN_PREFIX* ]]; then
echo "Error: You can only merge from branches that start with '$UNFROZEN_PREFIX', or PRs titled with prefix 'fix(critical): '."
exit 1
fi
# repo is fully frozen
else
echo "Error: You can only merge PRs titled with prefix 'fix(critical): '."
exit 1
fi
fi
31 changes: 31 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish distribution to PyPI

on:
release:
types: [published]

permissions:
contents: read

jobs:
build-and-publish:
name: Build and publish distribution to PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: '3.x'
- name: Install wheel
run: python -m pip install --user --upgrade wheel
- name: Install twine
run: python -m pip install --user --upgrade twine
- name: Install setuptools
run: python -m pip install --user --upgrade setuptools
- name: Build a binary wheel and a source tarball
run: python setup.py sdist bdist_wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450 # release/v1
with:
password: ${{ secrets.pypi_token }}
50 changes: 50 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
push:
branches:
- main
pull_request:
branches:
- main
- feature/**

permissions:
contents: read

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install tox
- name: Run unit tests
run: |
tox -e unit-tests
- name: Run AutoQASM example notebooks
run: |
pip install -e .
pip install notebook matplotlib
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/1_Getting_started_with_AutoQASM.ipynb
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/2_Expressing_classical_control_flow.ipynb
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/3_1_Iterative_phase_estimation.ipynb
jupyter nbconvert --to html --execute --ExecutePreprocessor.kernel_name=python3 ./examples/3_2_magic_state_distillation.ipynb
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab # v4.1.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ strategy.job-index }} == 0
Loading
Loading