microsoft/qdk

Public

mirrored fromhttps://github.com/microsoft/qdkAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
minestarks/learning-katas-mvp

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

samples/python_interop/teleportation_project/src/RunTeleport.qs

19lines · modecode

1namespace RunTeleport {
2 import TeleportOperations.Teleport.*; // references the Teleport.qs file
3
4 operation Main() : Unit {
5 use msg = Qubit();
6 use target = Qubit();
7
8 H(msg);
9 Teleport(msg, target); // calls the Teleport() operation from Teleport.qs
10 H(target);
11
12 if M(target) == Zero {
13 Message("Teleported successfully!");
14
15 Reset(msg);
16 Reset(target);
17 }
18 }
19}
20