This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
Prepare standalone docs for publication #804
Merged
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
62c4f10
Add standalone executables content (#792)
KittyYeungQ 0a6b474
Refactor C# install page to focus on .NET interop (#801)
db871f0
Update lineranges for microsoft/quantum#346.
cgranade dd7acb3
Markdownlint fixes.
cgranade 406da46
Trivial change to force rebuild.
cgranade 4d85dd6
Update lineranges for microsoft/quantum#346. (#802)
c0e33f0
Add automated check for samples repo branch.
cgranade 34536ad
Debugging action.
cgranade 69d0f00
Fix checkout.
cgranade c4e7447
exit 1 on failure.
cgranade acee10c
Remove debugging steps.
cgranade 7bb7f96
Reset to master.
cgranade 0d0d8b7
Set samples branch back to master (#803)
48d28ac
Patch links in installguide.
cgranade 2765b6c
Merge pull request #806 from MicrosoftDocs/cgranade/patch-install-guide
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check-samples-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Check that samples branch refers to master. | ||
run: | | ||
$configPath = ".openpublishing.publish.config.json"; | ||
$config = Get-Content $configPath | ConvertFrom-Json; | ||
$samplesRepo = $config.dependent_repositories | Where-Object { | ||
$_.url -eq "https://github.com/microsoft/quantum" | ||
} | ||
if ($samplesRepo.branch -ne "master") { | ||
Write-Host "::error file=$configPath::Samples repository branch is not set to master for a PR targeting master." | ||
exit 1; | ||
} | ||
shell: pwsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
--- | ||
title: Execute Q# programs without a driver and a host language | ||
author: KittyYeungQ | ||
ms.author: kitty | ||
ms.date: 4/24/2020 | ||
ms.topic: article | ||
ms.custom: how-to | ||
uid: microsoft.quantum.install.standalone | ||
--- | ||
|
||
# Q# Command Line Applications | ||
|
||
Q# programs can be executed on their own, without a driver in a host language like C#, F#, or Python. | ||
|
||
## Pre-requisites | ||
|
||
- [.NET Core SDK 3.1 or later](https://www.microsoft.com/net/download) | ||
|
||
## Installation | ||
|
||
While you can build Q# command line applications in any IDE, we highly recommend using Visual Studio Code (VS Code) or Visual Studio IDE for your Q# applications. By using VS Code or Visual Studio and the QDK Visual Studio Code extension you gain access to richer functionality. | ||
|
||
- Install [VS Code](https://code.visualstudio.com/download) (Windows, Linux and Mac) | ||
- Install the [QDK extension for VS Code](https://marketplace.visualstudio.com/items?itemName=quantum.quantum-devkit-vscode) | ||
OR | ||
- [Visual Studio](https://visualstudio.microsoft.com/downloads/) 16.3, with the .NET Core cross-platform development workload enabled | ||
- Download and install the [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=quantum.DevKit) | ||
|
||
|
||
## Develop with Q# using VS Code | ||
|
||
Install the Quantum project templates: | ||
|
||
- Go to **View** -> **Command Palette** | ||
- Select **Q#: Install project templates** | ||
|
||
You now have the Quantum Development Kit installed and ready to use in your own applications and libraries. | ||
- Create a new project: | ||
- Go to **View** -> **Command Palette** | ||
- Select **Q#: Create New Project** | ||
- Select **Standalone console application** | ||
- Navigate to the location on the file system where you would like to create the application | ||
- Click on the **Open new project...** button, once the project has been created | ||
|
||
- Inspect the project | ||
- You should see that a file called `Program.qs` created, which is a Q# program that defines a simple operation to print a message to the console. | ||
|
||
- Run the application: | ||
- Go to **Terminal** -> **New Terminal** | ||
- Enter `dotnet run` | ||
- You should see the following text in the output window `Hello quantum world!` | ||
|
||
|
||
> [!NOTE] | ||
> * Workspaces with multiple root folders are not currently supported by the Visual Studio Code extension. If you have multiple projects within one VS Code workspace, all projects need to be contained within the same root folder. | ||
|
||
## Develop with Q# using Visual Studio | ||
|
||
Verify the installation by creating a `Hello World` application | ||
|
||
- Create a new Q# application | ||
- Go to **File** -> **New** -> **Project** | ||
- Type `Q#` in the search box | ||
- Select **Q# Application** | ||
- Select **Next** | ||
- Choose a name and location for your application | ||
- Select **Create** | ||
|
||
- Inspect the project | ||
- You should see that a file called `Program.qs` has been created, which is a Q# program that defines a simple operation to print a message to the console. | ||
|
||
- Run the application | ||
- Select **Debug** -> **Start Without Debugging** | ||
- You should see the text `Hello quantum world!` printed to a console window. | ||
|
||
> [!NOTE] | ||
> * If you have multiple projects within one Visual Studio solution, all projects contained in the solution need to be in the same folder as the solution, or in one of its subfolders. | ||
|
||
|
||
## What's next? | ||
|
||
Now that you have installed the Quantum Development Kit in your preferred environment, you can write and run [your first quantum program](xref:microsoft.quantum.write-program). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
items: | ||
- name: Installation overview | ||
href: index.md | ||
- name: Q# command line applications | ||
href: standalone.md | ||
- name: Q# Jupyter notebooks | ||
href: qjupyter.md | ||
- name: Using Q# with other languages | ||
items: | ||
- name: Using Q# with Python | ||
href: pyinstall.md | ||
- name: Using Q# with .NET | ||
href: csinstall.md |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see #806.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I was looking for this.