Quantum Katas
repository·main·Indexed 26 days ago
https://github.com/microsoft/quantumkatasA collection of self-paced tutorials and programming exercises designed to teach quantum computing concepts and Q# programming. Using a task-based approach with unit tests, the katas cover topics including basic gates, Grover's search algorithm, the BB84 protocol, Quantum Fourier Transform (QFT), phase estimation, and quantum error-correction via the three-qubit bit-flip code.
What's inside Quantum Katas
- This kata focuses on the three-qubit bit-flip code, the simplest quantum error-correction (QEC) code. It involves encoding a single logical qubit into three physical qubits to protect against single bit-flip errors (X gate errors). This is the quantum version of the classical repetition code, adapted for quantum mechanics where state cloning is impossible.
Overview of the GHZ Game Kata
mainThe GHZ (Greenberger-Horne-Zeilinger) game kata focuses on a nonlocal (entanglement) game. In this scenario, multiple cooperating players play against a referee. Players can share information or qubits before the game begins but are prohibited from communicating once the game starts. The kata demonstrates how quantum entanglement allows players to achieve higher winning probabilities than classical strategies permit.Overview of the TruthTables kata
mainThe TruthTables kata provides an introduction to representing Boolean functions using integers, where each bit represents a truth value for a specific input assignment.Introduction to Single-Qubit Gates Tutorial
mainThis tutorial introduces the fundamental concept of quantum gates and provides a guided walkthrough of the most common single-qubit gates used in quantum computing.Overview of Multi-Qubit Systems tutorial
mainThis tutorial covers the representation and properties of multi-qubit systems in quantum computing.Overview of Multi-Qubit Gates tutorial
mainThis tutorial provides guidance and exercises on applying quantum gates to multi-qubit systems within the Quantum Katas environment.Overview of the BoundedKnapsack Kata
mainThe
BoundedKnapsackquantum kata is a series of exercises focused on using Grover's search algorithm to solve the knapsack optimization problem.Key objectives:
- Implement oracles that represent various parts of the knapsack problem.
- Use these oracles within Grover's algorithm to find an optimal solution.
This kata is based on the circuits described in the paper "Quantum-based algorithm and circuit design for bounded knapsack optimization problem" by Wenjun Hou and Marek Perkowski.
Overview of the Quantum Fourier Transform (QFT) Kata
mainThe Quantum Fourier Transform kata provides exercises to learn the basics of the quantum Fourier transform. It focuses on two primary areas:
- Implementation: Implementing the quantum Fourier transform algorithm.
- Application: Using the QFT to solve simple quantum tasks.
The kata follows the standard algorithm described in Nielsen, M. A. & Chuang, I. L. (2010). Quantum Computation and Quantum Information. pp.217-221 and the lecture notes by John Watrous.
Overview of Grover's Algorithm Kata
mainThe Grover's Algorithm kata focuses on implementing Grover's search algorithm, a fundamental quantum algorithm used to find an input to a black box (oracle) that produces a specific output. The tasks in this kata are aligned with the theoretical explanations found in Quantum Computation and Quantum Information by Nielsen and Chuang (Section 6.1.2).Overview of the Teleportation Kata
mainThe Teleportation kata focuses on the quantum teleportation protocol. This protocol enables the communication of a quantum state using only classical communication and pre-shared quantum entanglement.
For further study, you can refer to:
- The Wikipedia article on Quantum teleportation.
- An interactive demonstration on the Wolfram Demonstrations Project.
- The principle of deferred measurement as applied to the teleportation protocol in Nielsen & Chuang, section 4.4 (pp. 185-187).
Overview of the Graph Coloring Kata
mainThe Graph Coloring kata is an advanced exploration of Grover's search algorithm. It focuses on writing oracles that describe a problem (using graph coloring as the example) rather than the solution itself. It also covers implementing Grover's search to handle problems with an unknown number of solutions.
Prerequisites:
- It is strongly recommended to complete the Grover's Algorithm kata before starting this one.
- For more context on the underlying theory, refer to the Microsoft Learn module or Wikipedia's entry on graph coloring.
Overview of the Distinguish Unitaries kata
mainThe 'Distinguish Unitaries' kata provides tasks where you are presented with a unitary operator and must identify which specific unitary from a provided list it represents. To accomplish this, you must design and execute quantum experiments on the given unitary.