All Projects → microsoft → Quantum

microsoft / Quantum

Licence: mit
Microsoft Quantum Development Kit Samples

Programming Languages

python
139335 projects - #7 most used programming language
Jupyter Notebook
11667 projects
Q#
14 projects
C#
18002 projects
powershell
5483 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to Quantum

iqsharp
Microsoft's IQ# Server.
Stars: ✭ 112 (-96.76%)
Mutual labels:  quantum, qsharp, quantum-development-kit, qdk
QuantumResources
A collection of resources for Quantum Computing
Stars: ✭ 43 (-98.75%)
Mutual labels:  quantum, quantum-computing, quantum-development-kit, qdk
learn-qc-with-python-and-qsharp
Companion code for Learn Quantum Computing with Python and Q# Book by Dr. Sarah Kaiser and Dr. Chris Granade 💖
Stars: ✭ 62 (-98.2%)
Mutual labels:  quantum, quantum-computing, qsharp, quantum-development-kit
Quantum Learning
This repository contains the source code used to produce the results presented in the paper "Machine learning method for state preparation and gate synthesis on photonic quantum computers".
Stars: ✭ 89 (-97.42%)
Mutual labels:  jupyter-notebook, quantum-computing, quantum
Quantumkatas
Tutorials and programming exercises for learning Q# and quantum computing
Stars: ✭ 3,713 (+7.53%)
Mutual labels:  jupyter-notebook, quantum-computing, qsharp
Quantumcomputingbook
Companion site for the textbook Quantum Computing: An Applied Approach
Stars: ✭ 386 (-88.82%)
Mutual labels:  jupyter-notebook, quantum-computing, quantum
qram
Library for Q# implementing various qRAM proposals
Stars: ✭ 46 (-98.67%)
Mutual labels:  quantum-computing, quantum-development-kit, qdk
Qpga
Simulations of photonic quantum programmable gate arrays
Stars: ✭ 68 (-98.03%)
Mutual labels:  jupyter-notebook, quantum-computing, quantum
Pyepr
Powerful, automated analysis and design of quantum microwave chips & devices [Energy-Participation Ratio and more]
Stars: ✭ 81 (-97.65%)
Mutual labels:  jupyter-notebook, quantum-computing, quantum
Teach Me Quantum
⚛ 10 week Practical Course on Quantum Information Science and Quantum Computing - with Qiskit and IBMQX
Stars: ✭ 118 (-96.58%)
Mutual labels:  jupyter-notebook, quantum-computing, quantum
qcl
Quantum Computation Language port from http://tph.tuwien.ac.at/~oemer/qcl.html
Stars: ✭ 29 (-99.16%)
Mutual labels:  quantum, quantum-computing
quantumjava
Samples related to "Quantum Computing for Java Developers"
Stars: ✭ 86 (-97.51%)
Mutual labels:  quantum, quantum-computing
Quantumlibraries
Q# libraries for the Quantum Development Kit
Stars: ✭ 316 (-90.85%)
Mutual labels:  quantum-computing, quantum
Interlin-q
A Quantum Interconnect Simulator for Distributed Quantum Algorithms
Stars: ✭ 32 (-99.07%)
Mutual labels:  quantum, quantum-computing
unitaryhack
Rules and information for the 2021 unitaryHACK event hosted by @unitaryfund
Stars: ✭ 16 (-99.54%)
Mutual labels:  quantum, quantum-computing
qc portfolio optimization
A program that implements the portfolio optimization experiments using a hybrid quantum computing algorithm from arXiv:1911.05296. The code was developed as part of the 2020 Quantum mentorship program. Many thanks to my mentor Guoming Wang from Zapata Computing!
Stars: ✭ 21 (-99.39%)
Mutual labels:  quantum, quantum-computing
Quantum-Computing-Resources
This repository contains the best resources for learning practical quantum computing. This repository will be updated frequently.
Stars: ✭ 60 (-98.26%)
Mutual labels:  quantum, quantum-computing
Quantum-Computer-Simulator-with-Algorithms
C++ simulator of quantum registers and quantum algorithms
Stars: ✭ 15 (-99.57%)
Mutual labels:  quantum, quantum-computing
miniqubit
Quantum emulator of the IBM Quantum experience
Stars: ✭ 24 (-99.3%)
Mutual labels:  quantum, quantum-computing
qibo
A framework for quantum computing with hardware acceleration.
Stars: ✭ 120 (-96.52%)
Mutual labels:  quantum, quantum-computing

Microsoft Quantum Development Kit Samples

Binder

These samples demonstrate the use of the Quantum Development Kit for a variety of different quantum computing tasks.

Each sample is self-contained in a folder, and demonstrates how to use Q# to develop quantum applications.

A small number of the samples have additional installation requirements beyond those for the rest of the Quantum Development Kit. These are noted in the README.md files for each sample, along with complete installation instructions.

Getting started

You can find instructions on how to install the Quantum Development Kit in our online documentation, which also includes an introduction to quantum programming concepts.

For a quick guide on how to set up a development environment from scratch using Visual Studio Code or Visual Studio Codespaces, see here.

A Docker image definition is also provided for your convenience, see here for instructions on how to build and use it.

First samples

If you're new to quantum or to the Quantum Development Kit, we recommend starting with the Getting Started samples.

After setting up your development environment using one of the options above, try to browse to samples/getting-started/teleportation via the terminal and run dotnet run. You should see something like the following:

Round 1: Sent False, got False.
Teleportation successful!
Round 2: Sent True, got True.
Teleportation successful!
Round 3: Sent False, got False.
Teleportation successful!
Round 4: Sent False, got False.
Teleportation successful!
Round 5: Sent False, got False.
Teleportation successful!
Round 6: Sent False, got False.
Teleportation successful!
Round 7: Sent True, got True.
Teleportation successful!
Round 8: Sent False, got False.
Teleportation successful!

Congratulations, you can now start quantum programming!

Going further

As you go further with quantum development, we provide several different categories of samples for you to explore:

  • Algorithms: These samples demonstrate various quantum algorithms, such as database search and integer factorization.
  • Arithmetic: These samples show how to coherently transform arithmetic data.
  • Characterization: These samples demonstrate how to learn properties of quantum systems from classical data.
  • Chemistry: These samples demonstrate the use of the Quantum Chemistry library.
  • Diagnostics: These samples show how to diagnose and test Q# applications.
  • Error Correction: These samples show how to work with quantum error correcting codes in Q# programs.
  • Interoperability: These samples show how to use Q# with different host languages.
  • Machine Learning: These samples demonstrate how to train simple sequential models on half-moons and wine datasets.
  • Numerics: The samples in this folder show how to use the numerics library.
  • Runtime: These samples show how to work with the Q# simulation runtime.
  • Simulation: These samples show how to simulate evolution under different Hamiltonians.

We also encourage taking a look at the unit tests used to check the correctness of the Quantum Development Kit samples.

Setting up your development environment

This repo contains several configuration files that will make it easy to get started with coding. Below we lay out some instructions for getting started with VSCode or with Jupyter notebooks.

Visual Studio Code

If you prefer to develop code locally, we recommend to install an editor such as Visual Studio Code. Make sure to install the .NET Core SDK 3.1 or later on your local machine. For more detailed instructions on how to set up VS Code for development with the QDK, go to our docs here.

Once you have installed VS Code and the .NET Core SDK, download this repository to your computer and open the folder in VS Code. The editor will automatically recognize the files in the .vscode folder and request you to install the recommended extension. This includes the Microsoft Quantum Development Kit for Visual Studio Code extension, which is the fastest way to get started with the QDK.

Open a terminal to start running your first samples (see here).

Running a Jupyter Notebook with Docker

Another way to quickly start developing in Q# is to use Docker and launch a Jupyter notebook on your local machine. You can use the included Dockerfile to create a docker image with all the necessary libraries to use the Quantum Development Kit to build quantum applications in C#, Python or Jupyter.

Once you have installed Docker, you can use the following commands to get you started:

To build the docker image and tag it iqsharp:

docker build -t iqsharp .

To run the image in the container named iqsharp-container with interactive command-line and redirect container port 8888 to local port 8888 (needed to run jupyter):

docker run -it --name iqsharp-container -p 8888:8888 iqsharp /bin/bash

From the corresponding container command line, you can run the C# version of the Teleportation sample using:

cd ~/samples/getting-started/teleportation && dotnet run

Similarly, you can run the Python version of the Teleportation sample using:

cd ~/samples/getting-started/teleportation && python host.py

Finally, to start Jupyter Notebook within the image for the Teleportation sample, use:

cd ~/samples/getting-started/teleportation && jupyter notebook --ip=0.0.0.0 --no-browser 

Once Jupyter has started, you can open in your browser the Teleportation notebook (you will need a token generated by jupyter when it started on the previous step):

http://localhost:8888/notebooks/Notebook.ipynb

Once you're done, to remove container named iqsharp-container:

docker rm --force iqsharp-container
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].