microsoft/qdk

Public

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

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v1.1.3

Branches

Tags

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

Clone

HTTPS

Download ZIP

samples/language/MultiFileProject/src/Main.qs

19lines · modecode

1/// # Sample
2/// Multi File Project
3///
4/// # Description
5/// Organizing code into multiple Q# source files is an important part of
6/// writing readable and maintainable code. In this project, we have `Main.qs`,
7/// and `Particle.qs`, which defines a new namespace for particle operations.
8/// The presence of a Q# manifest file (`qsharp.json`) tells the compiler
9/// to include all Q# files under `src/`.
10namespace MyQuantumApp {
11 open Particle;
12 @EntryPoint()
13 operation Main() : Unit {
14 let particleA = Particle(0, 0, 0);
15 let particleB = Particle(1, 1, 1);
16
17 let particleC = addParticles(particleA, particleB);
18 }
19}
20