Git Product home page Git Product logo

quantum's Introduction

Quantum Development Kit Samples

These samples demonstrate the use of the Quantum Development Kit for a variety of different quantum computing tasks. Each sample is provided as a Visual Studio 2017 C# or F# project under the QsharpSamples.sln solution. The samples are broken down into four broad categories, each of which is described below. Most of the samples consist of a Q# source file with detailed comments explaining the sample and a short classical program (either Program.cs or Program.fs) to call into Q# operations and functions.

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.

0. Introductory Samples

  • TeleportationSample: This sample documents how to write quantum programs with Q#, C#, and Visual Studio, using the development techniques covered in the main documentation.
  • Measurement: This sample goes into more detail about how single- and multiple-qubit measurements are represented in Q#, and how to measure in interesting bases such as the Bell basis.
  • SimpleAlgorithms: This sample covers several different basic quantum algorithms, and how each can be written in Q#.

1. Algorithm Samples

  • DatabaseSearch: This sample demonstrates how to use Grover's algorithm to efficiently search a database represented as a quantum register.
  • IntegerFactorization: This sample demonstrates how to use Shor's algorithm to efficiently factor integers.
  • ReversibleLogicSynthesis: This sample demonstrates how to use reversible logic synthesis to solve the hidden shift problem.
  • CHSHGame: This sample demonstrates a famous nonlocal game which proves that no theory of local hidden variables can ever reproduce all the predictions of quantum mechanics.

2. Characterization and Testing Samples

  • UnitTesting: This sample demonstrates how to use the Quantum Development Kit together with the xUnit framework to check the correctness of quantum programs by testing the correctness and computing the metrics of various small quantum circuits.
  • BitFlipCode: This sample shows how to use a simple quantum error correcting code to protect against errors in a quantum device.
  • PhaseEstimation: This sample introduces iterative phase estimation, an important statistical problem in analyzing the output of quantum programs.

3. Hamiltonian Simulation Samples

  • H₂ Simulation
    • H2SimulationCmdLine: This sample walks through the simulation of molecular hydrogen using the Trotter–Suzuki decomposition.
    • H2SimulationGUI: This sample builds on H2SimulationCmdLine by using the Electron framework and the chart.js package to plot results asynchronously in a cross-platform application.
  • Ising Model Simulation
    • SimpleIsing: This sample walks through constructing the time-evolution operator for the Ising model.
    • IsingGenerators: This sample describes how Hamiltonians may be represented using Microsoft.Quantum.Canon functions.
    • AdiabaticIsing: This sample converts a representation of a Hamiltonian using library data types into unitary time-evolution by the Hamiltonian on qubits.
    • IsingPhaseEstimation: This sample adiabatically prepares the ground state of the Ising model Hamiltonian, and then perform phase estimation to obtain an estimate of the ground state energy.
    • IsingTrotterEvolution: This sample walks through constructing the time-evolution operator for the Ising model using the Trotterization library feature.
  • HubbardSimulation: This sample walks through constructing the time-evolution operator for the 1D Hubbard Simulation model.

4. Interoperability

  • PythonInterop (Windows-only preview): This sample walks through using Python to perform quantum process tomography on an operation written in Q#.

5. Qasm (Quantum Assembler Language)

  • OpenQasm: This sample shows that one can output the a subset of the quantum operations of a Q# application in OpenQASM.
  • Qiskit: This sample shows that one can run the quantum operations of a Q# application by using the OpenQASM output on the IBMQuantumExperience by changing the driver.
  • OpenQasmReader: This sample shows that one can convert OpenQasm 2.0 specifications to Q# methods. This allows one to import algorithms written in OpenQasm 2.0 to be used on the Microsoft Q# Simulator. Appart of the barrier gate (which has no meaning in Q#) all gates are converted to Q# constructions.

quantum's People

Contributors

anpaz avatar rolfhuisman avatar cgranade avatar msoeken avatar martinquantum avatar crazy4pi314 avatar ahelwer avatar bartdesmet avatar cpalmer2020 avatar guanghaolow avatar mlxd avatar tcnickolas avatar russell-taylor avatar tamamcglinn avatar lemj3111 avatar

Watchers

James Cloos 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.