microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
alex/testHarnessIntegTests

Branches

Tags

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

Clone

HTTPS

Download ZIP

samples/notebooks/project.ipynb

68lines · modecode

1{
2 "cells": [
3 {
4 "cell_type": "markdown",
5 "metadata": {},
6 "source": [
7 "Initialize Q# with a project root. This will look for a `qsharp.json` at the specified directory and compile the Q# sources included by the manifest."
8 ]
9 },
10 {
11 "cell_type": "code",
12 "execution_count": null,
13 "id": "1e8e4faa",
14 "metadata": {},
15 "outputs": [],
16 "source": [
17 "import qsharp\n",
18 "\n",
19 "qsharp.init(project_root='./test_project')\n"
20 ]
21 },
22 {
23 "cell_type": "markdown",
24 "id": "0a107432",
25 "metadata": {},
26 "source": [
27 "Now we can reference the compiled sources."
28 ]
29 },
30 {
31 "cell_type": "code",
32 "execution_count": null,
33 "id": "9df62352",
34 "metadata": {
35 "vscode": {
36 "languageId": "qsharp"
37 }
38 },
39 "outputs": [],
40 "source": [
41 "%%qsharp\n",
42 "\n",
43 "Sample.Main()\n"
44 ]
45 }
46 ],
47 "metadata": {
48 "kernelspec": {
49 "display_name": "Python 3 (ipykernel)",
50 "language": "python",
51 "name": "python3"
52 },
53 "language_info": {
54 "codemirror_mode": {
55 "name": "ipython",
56 "version": 3
57 },
58 "file_extension": ".py",
59 "mimetype": "text/x-python",
60 "name": "python",
61 "nbconvert_exporter": "python",
62 "pygments_lexer": "ipython3",
63 "version": "3.11.6"
64 }
65 },
66 "nbformat": 4,
67 "nbformat_minor": 5
68}
69