Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

page_type languages products urlFragment description
This sample demonstrates using Quantum Development Kit to move quantum data with quantum teleportation.

Quantum Teleportation Sample

This sample demonstrates the use of the Quantum Development Kit for quantum teleportation, a sort of "hello, world" for quantum programming.

It shows how to call the teleport quantum samples from 3 different classical host programs, each implemented in a different programming platform:

  • Jupyter Notebook
  • Python
  • C#


Running the Sample

This sample can be run in a number of different ways, depending on your preferred environment.

Jupyter Notebook

From the command line, start Jupyter Notebook and open the Notebook.ipynb file.

jupyter notebook Notebook.ipynb

Python in Visual Studio Code or the Command Line

At a terminal, run the following command:


C# in Visual Studio Code or the Command Line

At a terminal, run the following command:

dotnet run

C# in Visual Studio 2019

Open the folder containing this sample in Visual Studio ("Open a local folder" from the Getting Started screen or "File → Open → Folder..." from the menu bar) and set TeleportationSample.csproj as the startup project. Press Start in Visual Studio to run the sample.


  • TeleportationSample.qs: Q# code defining how to teleport qubit states.
  • Utils.qs: Q# code with some utility operations used to prepare and read |+> and |-> states.
  • Host.cs: C# code to call the operations defined in Q#.
  • TeleportationSample.csproj: Main C# project for the example.
  • a sample Python program to call the Q# teleport operation.
  • Notebook.ipynb: a Jupyter notebook that shows how to implement the Q# teleport operation.
You can’t perform that action at this time.