Git Product home page Git Product logo

qsharp's Introduction

Azure Quantum Development Kit

Welcome to the Azure Quantum Development Kit!

This repository contains tooling for the Q# language, specifically:

  • compiler: core compiler logic and command-line tooling
  • fuzz: fuzz testing infrastructure
  • jupyterlab: JupyterLab extension
  • language_service: Q# language service and editor features
  • library: Q# standard library
  • npm: Q# npm package
  • pip: Q# Python pip package
  • playground: simple website for interacting with Q#
  • resource_estimator: Implementation for the Azure Quantum Resource Estimator
  • vscode: Visual Studio Code extension
  • wasm: The bindings and logic for the WebAssembly module
  • widgets: The Q# Jupyter widgets Python package

There are also the tutorials and samples in the ./katas and ./samples directories, respectively.

Code from this repository powers the Q# development experience on https://quantum.microsoft.com.

Building

To build this repository there are dependencies that need to be installed. These are:

The build script will check these dependencies and their versions and fail if not met. (Or run python ./prereqs.py directly to check if the minimum required versions are installed).

To build, in the root directory run python ./build.py. By default this will run a release build of each project, including running tests and checks such as linting. Run with the --help option for detailed usage.

Playground

To run the "playground" locally, build the repository, then cd into the playground directory, and run npm start. This will launch a local web server and output the URL to the console; copy that URL and open it in a browser to use the playground. If you only want to build the functionality necessary to run the playground, you can use python .\build.py --wasm --npm --play.

Python

When building the Python packages (pip and jupyterlab), if the build script does not detect a current Python virtual environment, it will automatically create one under pip/.venv or jupyterlab/.venv. When developing locally, you can use these virtual environments to run the tests by running source .venv/bin/activate (Linux/MacOS) or .venv/Scripts/activate.bat (Windows).

Code editing

The easiest way to develop in this repo is to use VS Code. When you open the project root, by default VS Code will recommend you install the extensions listed in .vscode/extensions.json. These extensions provide language services for editing, as well as linters and formatters to ensure the code meets the requirements (which are checked by the build.py script and CI).

Some settings are recommended (but not enforced) to make development easier. These are in the .vscode/*.shared.json files. If the Workspace Config+ extension is installed, this will automatically apply these settings, as well as overrides from your own corresponding .vscode/*.local.json settings. If you don't install this extension, you can use these as a reference for editing your own .vscode/*.json settings files. (See the extension home page for more details).

Debugging

Besides the usual debugging tools for Rust code and web sites, there is some logging in the code that may be enabled to help troubleshoot. The qsc command-line compiler makes use of the Rust crate env_logger, which enables logging via environment variables, for example RUST_LOG=debug ./target/release/qsc ./samples/Grover.qs.

Citation

If you use Q#, Azure Quantum Development Kit, or Azure Quantum Resource Estimator, please cite as follows:

  • Azure Quantum Development Kit:
@software{Microsoft_Azure_Quantum_Development,
   author = {{Microsoft}},
   license = {MIT},
   title = {{Azure Quantum Development Kit}},
   url = {https://github.com/microsoft/qsharp} }
  • Q# programming language:
@inproceedings{Svore_2018, series={RWDSL2018},
   title={{Q\#: Enabling Scalable Quantum Computing and Development with a High-level DSL}},
   url={http://dx.doi.org/10.1145/3183895.3183901},
   DOI={10.1145/3183895.3183901},
   booktitle={Proceedings of the Real World Domain Specific Languages Workshop 2018},
   publisher={ACM},
   author={Svore, Krysta and Geller, Alan and Troyer, Matthias and Azariah, John and Granade, Christopher and Heim, Bettina and Kliuchnikov, Vadym and Mykhailova, Mariia and Paz, Andres and Roetteler, Martin},
   year={2018},
   month=feb, collection={RWDSL2018} }
  • Azure Quantum Resource Estimator:
@inproceedings{Azure_Quantum_Resource_Estimator,
   author = {van Dam, Wim and Mykhailova, Mariia and Soeken, Mathias},
   title = {{Using Azure Quantum Resource Estimator for Assessing Performance of Fault Tolerant Quantum Computation}},
   year = {2023},
   isbn = {9798400707858},
   publisher = {Association for Computing Machinery},
   address = {New York, NY, USA},
   url = {https://doi.org/10.1145/3624062.3624211},
   doi = {10.1145/3624062.3624211},
   booktitle = {Proceedings of the SC '23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis},
   pages = {1414โ€“1419},
   numpages = {6},
   series = {SC-W '23} }

Feedback

If you have feedback about the content in this repository, please let us know by filing a new issue!

Reporting Security Issues

Security issues and bugs should be reported privately following our security issue documentation.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

For more details, please see CONTRIBUTING.md.

Legal and Licensing

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

qsharp's People

Contributors

swernli avatar minestarks avatar bamarsha avatar billti avatar cesarzc avatar scottcarda-ms avatar sezna avatar idavis avatar dmitryvasilevsky avatar tcnickolas avatar msoeken avatar filipw avatar kuzminrobin avatar ivanbasov avatar dependabot[bot] avatar microsoftopensource avatar eureka-cpu avatar jkingdon-ms avatar v-philkane avatar orpuente-ms avatar aarthims avatar benburrill avatar quackduck avatar wwhitedogi avatar colommar 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.