microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
e938e457db07d9fd7602266d24d3ce6310f6b6c0

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 · modecode

1from pathlib import Path
2import qsharp
3
4# Import the Q# code from the teleport.qs file
5code = (Path(__file__).parent / "sample.qs").read_text()
6qsharp.eval(code)
7
8# Directly invoke the Main operation defined in the loaded file
9print(qsharp.code.Main())
10