https://github.com/agnostiqhq/covalent-braket-plugin
Executor plugin interfacing Covalent with Amazon Braket Hybrid Jobs
Science Score: 39.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 2 DOI reference(s) in README -
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Executor plugin interfacing Covalent with Amazon Braket Hybrid Jobs
Basic Info
- Host: GitHub
- Owner: AgnostiqHQ
- License: apache-2.0
- Language: Python
- Default Branch: develop
- Homepage: https://covalent.xyz
- Size: 414 KB
Statistics
- Stars: 8
- Watchers: 9
- Forks: 1
- Open Issues: 7
- Releases: 26
Topics
Metadata Files
README.md
[](https://github.com/AgnostiqHQ/covalent)
[](https://github.com/AgnostiqHQ/covalent-braket-plugin)
[](https://github.com/AgnostiqHQ/covalent-braket-plugin/actions/workflows/tests.yml)
[](https://codecov.io/gh/AgnostiqHQ/covalent-braket-plugin)
[](https://www.apache.org/licenses/LICENSE-2.0)
Covalent Braket Hybrid Jobs Plugin
Covalent is a Pythonic workflow tool used to execute tasks on advanced computing hardware. This executor plugin interfaces Covalent with AWS Braket Hybrid Jobs
Installing
To use this plugin with Covalent, install it with pip:
pip install covalent-braket-plugin
Usage Example
The following workflow prepares a uniform superposition of the single-qubit standard basis states and measures it.
```python import covalent as ct from covalentbraketplugin.braket import BraketExecutor import os
AWS resources to pass to the executor
credentialsfile = "~/.aws/credentials" profile = "default" s3bucketname = "brakets3bucket" ecrimageuri = "111223344.dkr.ecr.us-east-1.amazonaws.com/amazon-braket-ecr-repo:latest" iamrole_name = "covalent-braket-iam-role"
ex = BraketExecutor( profile=profile, credentials=credentialsfile, s3bucketname=s3bucketname, ecrimageuri=ecrimageuri, braketjobexecutionrolename=iamrolename, quantumdevice="arn:aws:braket:::device/quantum-simulator/amazon/sv1", classicaldevice="ml.m5.large", storage=30, timelimit=300, )
@ct.electron(executor=ex) def simplequantumtask(num_qubits: int): import pennylane as qml
# These are passed to the Hybrid Jobs container at runtime
device_arn = os.environ["AMZN_BRAKET_DEVICE_ARN"]
s3_bucket = os.environ["AMZN_BRAKET_OUT_S3_BUCKET"]
s3_task_dir = os.environ["AMZN_BRAKET_TASK_RESULTS_S3_URI"].split(s3_bucket)[1]
device = qml.device(
"braket.aws.qubit",
device_arn=device_arn,
s3_destination_folder=(s3_bucket, s3_task_dir),
wires=num_qubits,
)
@qml.qnode(device=device)
def simple_circuit():
qml.Hadamard(wires=[0])
return qml.expval(qml.PauliZ(wires=[0]))
res = simple_circuit().numpy()
return res
@ct.lattice def simplequantumworkflow(numqubits: int): return simplequantumtask(numqubits=num_qubits)
dispatchid = ct.dispatch(simplequantumworkflow)(1) resultobject = ct.getresult(dispatchid, wait=True)
We expect 0 as the result
print("Result:", result_object.result) ```
To run such workflows, users must have AWS credentials allowing access
to Braket, ECR, S3, and some other services. These permissions must be
defined in an IAM Role (called "covalent-braket-iam-role" in this
example). The AWS
documentation has more information about managing Braket
access.
Overview of Configuration
See the RTD for how to configure this executor.
Required Cloud Resources
In order to run your workflows with covalent there are a few notable resources that need to be provisioned first. Particularly an S3 bucket must be created, an IAM role with the AmazonBraketFullAccess policy, and a private ECR repo with an uploaded image for the tasks to use.
For more information regarding which cloud resources need to be provisioned visit our read the docs RTD guide for this plugin.
Release Notes
Release notes are available in the Changelog.
Citation
Please use the following citation in any publications:
W. J. Cunningham, S. K. Radha, F. Hasan, J. Kanem, S. W. Neagle, and S. Sanand. Covalent. Zenodo, 2022. https://doi.org/10.5281/zenodo.5903364
License
Covalent is licensed under the Apache 2.0 License. See the LICENSE file or contact the support team for more details.
Owner
- Name: Agnostiq
- Login: AgnostiqHQ
- Kind: organization
- Email: contact@agnostiq.ai
- Location: Toronto
- Website: https://agnostiq.ai
- Twitter: AgnostiqHQ
- Repositories: 37
- Profile: https://github.com/AgnostiqHQ
Developing Software for Advanced Computing
GitHub Events
Total
- Watch event: 1
- Push event: 4
Last Year
- Watch event: 1
- Push event: 4
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| CovalentOpsBot | c****t | 43 |
| Alejandro Esquivel | ae@a****d | 22 |
| Faiyaz Hasan | f****z@a****i | 10 |
| Will Cunningham | w****l@a****i | 9 |
| Venkat Bala | 1****a | 6 |
| Scott Wyman Neagle | s****t@a****i | 4 |
| Casey Jao | c****y@a****i | 3 |
| WingCode | s****4@g****m | 2 |
| jkanem | j****m@g****m | 1 |
| Scott Wyman Neagle | w****a@p****m | 1 |
| Sankalp Sanand | s****p@a****i | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 20
- Total pull requests: 57
- Average time to close issues: about 1 month
- Average time to close pull requests: 3 days
- Total issue authors: 6
- Total pull request authors: 11
- Average comments per issue: 0.6
- Average comments per pull request: 0.84
- Merged pull requests: 50
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- AlejandroEsquivel (9)
- cjao (4)
- scottwn (3)
- kessler-frost (2)
- wjcunningham7 (1)
- jkanem (1)
Pull Request Authors
- AlejandroEsquivel (23)
- FyzHsn (9)
- venkatBala (7)
- scottwn (5)
- cjao (3)
- wjcunningham7 (3)
- kessler-frost (2)
- dependabot[bot] (2)
- jkanem (1)
- pre-commit-ci[bot] (1)
- WingCode (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 49 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 29
- Total maintainers: 1
pypi.org: covalent-braket-plugin
Covalent Braket Plugin
- Homepage: https://github.com/AgnostiqHQ/covalent-braket-plugin
- Documentation: https://covalent-braket-plugin.readthedocs.io/
- License: Apache License 2.0
-
Latest release: 0.13.0
published about 3 years ago
Rankings
Maintainers (1)
Dependencies
- amazon-braket-pennylane-plugin ==1.6.9
- boto3 ==1.24.35
- covalent ==0.177.0
- docker ==5.0.3
- pytest ==6.2.5 test
- pytest-mock ==3.6.1 test
- EndBug/add-and-commit v9 composite
- actions/checkout v3 composite
- actions/checkout master composite
- peterjgrainger/action-changelog-reminder v1.3.0 composite
- actions/checkout v2 composite
- actions/setup-python v4 composite
- aws-actions/configure-aws-credentials v1 composite
- docker/build-push-action v2 composite
- docker/setup-buildx-action v2 composite
- docker/setup-qemu-action v2 composite
- actions/checkout v3 composite
- pilosus/action-pip-license-checker main composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- ncipollo/release-action v1 composite
- actions-ecosystem/action-get-latest-tag v1 composite
- actions/checkout v3 composite
- actions/setup-python v2 composite
- codecov/codecov-action v3 composite
- actions/checkout v1 composite
- tj-actions/changed-files v18.4 composite
- ${COVALENT_BASE_IMAGE} latest build