Giter Site home page Giter Site logo

braket.jl's Introduction

Braket.jl

Braket.jl is not an officially supported AWS product.

This package is a Julia implementation of the Amazon Braket SDK allowing customers to access Quantum Hardware and Simulators.

This is experimental software, and support may be discontinued in the future. For a fully supported SDK, please use the Python SDK. We may change, remove, or deprecate parts of the API when making new releases. Please review the CHANGELOG for information about changes in each release.

Stable docs Latest docs CI codecov

Installation & Prerequisites

You do not need a Python installation or the Python Amazon Braket SDK installed to use this package. However, to use the Amazon Braket Local Simulators you'll need to install the sub-package PyBraket.jl, included in this repository. See its README for more information.

All necessary Julia packages will be installed for you when you run Pkg.add("Braket") or ] instantiate (if you're doing a dev install).

If you want to run tasks on Amazon Braket's managed simulators or QPUs or run managed jobs, you will need an AWS account and to have onboarded with the Amazon Braket service. Braket.jl can load your AWS credentials from your environment variables or your ~/.aws/config file thanks to the AWS.jl package.

Usage Notes

Keep in mind that the first qubit has index 0, not index 1. Some Amazon Braket Hybrid Jobs return results as pickled objects, which are currently not decompressible using Braket.jl. In such cases you may need to download and extract the results using PyBraket.jl and the Amazon Braket SDK.

Examples

Constructing a simple circuit:

using Braket

c = Circuit()
c = H(c, 0) # qubits are 0-indexed
c = CNot(c, 0, 1)
c = Probability(c)

Measuring expectation values on a QPU:

using Braket, Braket.Observables

c = Circuit()
c = H(c, 0)
c = CNot(c, 0, 1)
c = Expectation(c, Observables.X()) # measure X on all qubits

dev = AwsDevice("arn:aws:braket:::device/qpu/ionq/ionQdevice")
res = result(dev(c, shots=10))

TODO and development roadmap

As Amazon Braket expands its featureset, we welcome contributions and development from the Julia community.

What's currently implemented in pure Julia:

  • All of the Amazon Braket schemas.
  • Submitting Amazon Braket Hybrid Jobs
  • Local jobs
  • Building and submitting circuits to managed simulators and QPUs
  • Reading results from managed simulators and QPUs
  • Cancelling tasks and jobs
  • Fetching quantum task and device information from AWS
  • Searching device information and looking up availability windows
  • Noise models
  • Convenience Circuit features
  • Pretty printing of Circuits
  • Cost tracking
  • All gates and noise operations
  • Analog Hamiltonian Simulation

Features to add:

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

braket.jl's People

Contributors

kshyatt-aws avatar pitmonticone avatar amazon-auto avatar dilumaluthge avatar zmohammad01 avatar maolinml avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.