{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Quantum Katas and Tutorials as Jupyter Notebooks\n", "\n", "To run the katas and tutorials online, make sure you're viewing this file on Binder (if not, use [this link](https://mybinder.org/v2/gh/Microsoft/QuantumKatas/main?urlpath=/notebooks/index.ipynb)).\n", "\n", "To run the katas and tutorials locally, follow [these installation instructions](https://github.com/microsoft/QuantumKatas/blob/main/README.md#kata-locally).\n", "\n", "> Note that mybinder.org is running with reduced capacity, so getting a virtual machine and launching the notebooks on it might take several attempts. While running the Katas online is the easiest option to get started, if you want to save your progress and enjoy better performance, we recommend you to choose the local option." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Learning path\n", "\n", "Here is the learning path we suggest you to follow if you are starting to learn quantum computing and quantum programming. Once you're comfortable with the basics, you're welcome to jump ahead to the topics that pique your interest!\n", "\n", "#### Quantum Computing Concepts: Qubits and Gates\n", "\n", "* **[Complex arithmetic (tutorial)](./tutorials/ComplexArithmetic/ComplexArithmetic.ipynb)**.\n", " Learn about complex numbers and the mathematics required to work with quantum computing.\n", "* **[Linear algebra (tutorial)](./tutorials/LinearAlgebra/LinearAlgebra.ipynb)**.\n", " Learn about vectors and matrices used to represent quantum states and quantum operations.\n", "* **[The qubit (tutorial)](./tutorials/Qubit/Qubit.ipynb)**.\n", " Learn what a qubit is.\n", "* **[Single-qubit gates (tutorial)](./tutorials/SingleQubitGates/SingleQubitGates.ipynb)**.\n", " Learn what a quantum gate is and about the most common single-qubit gates.\n", "* **[Basic quantum computing gates](./BasicGates/BasicGates.ipynb)**.\n", " Learn to apply the most common gates used in quantum computing.\n", "* **[Multi-qubit systems (tutorial)](./tutorials/MultiQubitSystems/MultiQubitSystems.ipynb)**.\n", " Learn to represent multi-qubit systems.\n", "* **[Multi-qubit gates (tutorial)](./tutorials/MultiQubitGates/MultiQubitGates.ipynb)**.\n", " Learn about the most common multi-qubit gates.\n", "* **[Superposition](./Superposition/Superposition.ipynb)**.\n", " Learn to prepare superposition states.\n", "\n", "#### Quantum Computing Concepts: Measurements\n", "\n", "* **[Single-qubit measurements (tutorial)](./tutorials/SingleQubitSystemMeasurements/SingleQubitSystemMeasurements.ipynb)**.\n", " Learn what quantum measurement is and how to use it for single-qubit systems.\n", "* **[Multi-qubit measurements (tutorial)](./tutorials/MultiQubitSystemMeasurements/MultiQubitSystemMeasurements.ipynb)**.\n", " Learn to use measurements for multi-qubit systems.\n", "* **[Measurements](./Measurements/Measurements.ipynb)**.\n", " Learn to distinguish quantum states using measurements.\n", "* **[Distinguish unitaries](./DistinguishUnitaries/DistinguishUnitaries.ipynb)**\\*.\n", " Learn to distinguish unitaries by designing and performing experiments with them.\n", "* **[Joint measurements](./JointMeasurements/JointMeasurements.ipynb)**\\*.\n", " Learn about using joint (parity) measurements to distinguish quantum states and to perform state transformations.\n", "\n", "#### Q\\# and Microsoft Quantum Development Kit Tools\n", "\n", "* **[Visualization tools (tutorial)](./tutorials/VisualizationTools/VisualizationTools.ipynb)**.\n", " Learn to use the various tools for visualizing elements of Q\\# programs.\n", "\n", "#### Simple Algorithms\n", "\n", "* **[Random number generation (tutorial)](./tutorials/RandomNumberGeneration/RandomNumberGenerationTutorial.ipynb)**.\n", " Learn to generate random numbers using the principles of quantum computing.\n", "* **[Teleportation](./Teleportation/Teleportation.ipynb)**. \n", " Implement standard teleportation protocol and its variations.\n", "* **[Superdense coding](./SuperdenseCoding/SuperdenseCoding.ipynb)**. \n", " Implement the superdense coding protocol.\n", "\n", "#### Quantum Oracles and Simple Oracle Algorithms\n", "\n", "* **[Quantum oracles (tutorial)](./tutorials/Oracles/Oracles.ipynb)**.\n", " Learn to implement classical functions as equivalent quantum oracles. \n", "* **[Marking oracles](./MarkingOracles/MarkingOracles.ipynb)**.\n", " Practice implementing marking oracles for a variety of classical functions.\n", "* **[Exploring Deutsch and Deutsch–Jozsa algorithms (tutorial)](./tutorials/ExploringDeutschJozsaAlgorithm/DeutschJozsaAlgorithmTutorial_P1.ipynb)**.\n", " Learn to implement classical functions and equivalent quantum oracles, \n", " and compare the quantum solution to the Deutsch–Jozsa problem to a classical one.\n", "* **[Deutsch–Jozsa algorithm](./DeutschJozsaAlgorithm/DeutschJozsaAlgorithm.ipynb)**.\n", " Learn about quantum oracles which implement classical functions, and implement Bernstein–Vazirani and Deutsch–Jozsa algorithms.\n", "\n", "#### Grover's Search Algorithm\n", "\n", "* **[Implementing Grover's algorithm](./GroversAlgorithm/GroversAlgorithm.ipynb)**. \n", " Learn about Grover's search algorithm and how to write quantum oracles to use with it.\n", "* **[Exploring Grover's search algorithm (tutorial)](./tutorials/ExploringGroversAlgorithm/ExploringGroversAlgorithmTutorial.ipynb)**.\n", " Learn more about Grover's search algorithm, picking up where the [Grover's algorithm kata](./GroversAlgorithm/GroversAlgorithm.ipynb) left off.\n", "* **[Solving SAT problems using Grover's algorithm](./SolveSATWithGrover/SolveSATWithGrover.ipynb)**. \n", " Explore Grover's search algorithm, using SAT problems as an example. \n", " Learn to implement quantum oracles based on the problem description instead of a hard-coded answer. \n", " Use Grover's algorithm to solve problems with an unknown number of solutions.\n", "* **[Solving graph coloring problems using Grover's algorithm](./GraphColoring/GraphColoring.ipynb)**.\n", " Continue the exploration of Grover's search algorithm, using graph coloring problems as an example.\n", "* **[Solving bounded knapsack problem using Grover's algorithm](./BoundedKnapsack/BoundedKnapsack.ipynb)**.\n", " Learn how solve the variants of knapsack problem with Grover's search.\n", "\n", "#### Tools and Libraries/Building up to Shor's Algorithm\n", "\n", "* **[Quantum Fourier transform](./QFT/QFT.ipynb)**.\n", " Learn to implement quantum Fourier transform and to use it to perform simple state transformations.\n", "* **[Phase estimation](./PhaseEstimation/PhaseEstimation.ipynb)**.\n", " Learn about phase estimation algorithms.\n", "\n", "#### Entanglement Games\n", "\n", "* **[CHSH game](./CHSHGame/CHSHGame.ipynb)**.\n", "* **[GHZ game](./GHZGame/GHZGame.ipynb)**.\n", "* **[Mermin-Peres magic square game](./MagicSquareGame/MagicSquareGame.ipynb)**.\n", "\n", "#### Reversible Computing\n", "\n", "* **[Truth tables](./TruthTables/TruthTables.ipynb)**.\n", " Learn to represent and manipulate Boolean functions as truth tables and to implement them as quantum operations.\n", "* **[Ripple-carry adder](./RippleCarryAdder/RippleCarryAdder.ipynb)**.\n", " Build a ripple-carry adder on a quantum computer.\n", "\n", "#### Miscellaneous\n", "\n", "* **[BB84 protocol](./KeyDistribution_BB84/KeyDistribution_BB84.ipynb)**.\n", " Implement the BB84 key distribution algorithm.\n", "* **[Bit-flip error correcting code](./QEC_BitFlipCode/QEC_BitFlipCode.ipynb)**.\n", " Learn about a 3-qubit error correcting code for protecting against bit-flip errors.\n", "* **[Unitary patterns](./UnitaryPatterns/UnitaryPatterns.ipynb)**.\n", " Learn to implement unitaries with matrices that follow certain patterns of zero and non-zero elements.\n", "* **[Quantum classification (tutorial)](./tutorials/QuantumClassification/ExploringQuantumClassificationLibrary.ipynb)**.\n", " Learn about circuit-centric classifiers and the quantum machine learning library included in the QDK.\n", "\n", "For a full list of Quantum Katas available as Q# projects instead of Jupyter Notebooks, see the [QuantumKatas repository](https://github.com/Microsoft/QuantumKatas#learning-path)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Getting Started with Kata Notebooks and Tutorials\n", "\n", "Each kata notebook presents the tasks of the respective kata (Q# project) in Jupyter Notebook format. This makes getting started with the katas a lot easier - you don't need to install anything locally to try them out!\n", "\n", "Notebook tutorials are designed with Notebook format in mind - in addition to programming exercises they include a lot of theoretical explanations and code samples for you to learn from.\n", "\n", "Make sure you're viewing this file when running Jupyter notebooks on your machine or on Binder (for running on Binder, use [this link](https://mybinder.org/v2/gh/Microsoft/QuantumKatas/main?urlpath=/notebooks/index.ipynb)). From here you can navigate to the individual kata or tutorial notebooks using the links above.\n", "\n", "* Each tutorial or kata notebook contains a sequence of tasks on the topic, progressing from trivial to challenging.\n", "* Each task is defined in a separate code cell, preceded by the description of the task in a Markdown cell.\n", " Your goal is to fill in the blanks in the code (marked with `// ...` comments) with some Q# code that solves the task. \n", "* To verify your solution, run the code cell using Ctrl + Enter (or ⌘ + Enter on macOS). This will invoke the test covering the task and let you know whether it passes or fails, and if it fails, what the error is.\n", "* You can find pointers to reference materials you might need to solve the tasks, both on quantum computing and on Q#, either in the beginning of the tutorial or the kata or next to the task to which they are relevant.\n", "* You can find reference solutions in `ReferenceImplementation.qs` files of the corresponding katas or tutorials.\n", "* A lot of katas and tutorials have *workbooks* - detailed explanations of task solutions. Feel free to look them up if you're stuck!" ] } ], "metadata": { "kernelspec": { "display_name": "Q#", "language": "qsharp", "name": "iqsharp" }, "language_info": { "file_extension": ".qs", "mimetype": "text/x-qsharp", "name": "qsharp", "version": "0.27" } }, "nbformat": 4, "nbformat_minor": 2 }