microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
dbwy/random_seed

Branches

Tags

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

Clone

HTTPS

Download ZIP

samples/python_interop/teleportation_project/RunTeleport.py

12lines · modecode

1from pathlib import Path
2import qsharp
3
4# set the root folder for the Q# project
5# the root folder of a Q# project is where the qsharp.json file is located
6# make adjustments to the path depending on the location of the qsharp.json file
7
8# this example assumes your Python program is in the same folder as the qsharp.json file
9this_dir = Path(__file__).parent
10qsharp.init(project_root=this_dir)
11
12print(qsharp.eval("RunTeleport.Main()"))