microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.27.0

Branches

Tags

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

Clone

HTTPS

Download ZIP

samples/python_interop/eval_single_file/run.py

9lines · modepreview

from pathlib import Path
import qsharp

# Import the Q# code from the teleport.qs file
code = (Path(__file__).parent / "sample.qs").read_text()
qsharp.eval(code)

# Directly invoke the Main operation defined in the loaded file
print(qsharp.code.Main())