microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.22.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

samples/python_interop/teleportation_project/RunTeleport.py

12lines · modepreview

from pathlib import Path
import qsharp

# set the root folder for the Q# project
# the root folder of a Q# project is where the qsharp.json file is located
# make adjustments to the path depending on the location of the qsharp.json file

# this example assumes your Python program is in the same folder as the qsharp.json file
this_dir = Path(__file__).parent
qsharp.init(project_root=this_dir)

print(qsharp.eval("RunTeleport.Main()"))