running the quantum katas - eth z · aka.ms/quantum-katas download the quantum katas open...

71
INSTALL GUIDE aka.ms/qdk-install Install .NET Core SDK Install Visual Studio Code + Extension INSTALLING THE QUANTUM DEVELOPMENT KIT Install Project Templates Download the Quantum Katas Open a kata folder in VS Code RUNNING THE QUANTUM KATAS Run dotnet test KATA DOWNLOAD aka.ms/quantum-katas While everyone settles in, feel free to get started.

Upload: others

Post on 17-May-2020

18 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

INSTALL GUIDE

aka.ms/qdk-install

Install .NET Core SDK

Install Visual Studio Code + Extension

INSTALLING THE QUANTUM DEVELOPMENT KIT

Install Project Templates

Download the Quantum Katas

Open a kata folder in VS Code

RUNNING THE QUANTUM KATAS

Run dotnet test

KATA DOWNLOAD

aka.ms/quantum-katas

While everyone settles in, feel free to get

started.

Page 2: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 3: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 4: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 5: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Practical Cost Estimates

Page 6: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Fe₂S₂

!3,000

1

Progress made through

• Better quantum algorithms

• More complete cost estimates

• Improved classical statistics

Page 7: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Practical Cost Estimates

Debugging Quantum Algorithms

Page 8: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.”

—Brian Kernighan

Page 9: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Practical Cost Estimates

Debugging Quantum Algorithms

Algorithms to Quantum Applications

Page 10: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

full-stack

Page 11: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 12: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 13: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 14: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 15: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 16: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

I’ll be showing Visual Studio Code today, but if you’re using Windows 10 and would prefer to use Visual Studio 2017, great!

Full documentation for using Visual Studio 2017 is available at aka.ms/quantum-katas.

Page 17: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

OPERATIONS

FUNCTIONS

docs.microsoft.com/quantum

Page 18: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Q# Operations and Functions

C# Host Program

Q# Operations and Functions

Q# Operations and Functions

host program

Page 19: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

projects

SOURCE CODE

project fileclassical (C#) source

quantum (Q#) source

COMPILED CODE

bin/Debug/

obj/compiled quantum app

Page 20: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

projects

SOURCE CODE

project fileclassical (C#) source

quantum (Q#) source

COMPILED CODE

bin/Debug/

obj/compiled quantum app

You may also see a solution file(*.sln).

This collects one or more related projects for loading in Visual Studio 2017.

Page 21: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

dotnet

Page 22: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

dotnet dotnet helpdotnet cmd --help

dotnet newMakes a new project.

dotnet buildDownloads all the packages needed by a project and runs the compiler.

dotnet runRuns the project, rebuilding if necessary.

dotnet test

dotnet add packageInstalls a new package into the project.

Page 23: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Let’s start by seeing how Q# and C# work

together to make a complete program.

Page 24: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Int

Double

Bool

Result

Pauli

Range

String

Page 25: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Qubit

Page 26: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Qubit states can be represented as vectors,

0 ≔10, 1 ≔

01.

Operations then transform qubit states by matrix multiplication.

E.g.:

𝐻 ≔1 11 −1

/ 2, 𝑇 ≔1 0

0 𝑒𝑖𝜋4

.

CONCEPTUAL INTRODUCTION AT

aka.ms/quantum-docs/the-qubit

Page 27: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Let’s make things quantum by generating

some random numbers using the

|+⟩ ≔ (|0⟩ + |1⟩) / √2 state.

Page 28: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation Result {

body {

mutable Zero;

using Qubit {

;

set ;

;

}

return

}

}

// Prepare in |0⟩.

// 𝐻|0⟩ = |+⟩.

// Measure ⟨0|.

// Reset to |0⟩.

// Return to// classical host.

Page 29: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Let’s look closer at what’s going on when we call the Hoperation.

operation NextRandomBit() : Result {

body {

mutable result = Zero;

using (qubits = Qubit[1]) {

;

set result = M(qubits[0]);

Reset(qubits[0]);

}

return result;

}

}

// Prepare in |0⟩.

// 𝐻|0⟩ = |+⟩.

// Measure ⟨0|.

// Reset to |0⟩.

// Return to// classical host.

Page 30: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

INPUT IS A STATE

INPUT HAS A STATE

Page 31: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

(More on this later.)

Page 32: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation NextRandomBit() : Result {

body {

mutable result = Zero;

using Qubit {

H(qubits[0]);

set result = M(qubits[0]);

;

}

return result;

}

}

// Prepare in |0⟩.

// H|0⟩ = |+⟩.

// Measure ⟨0|.

// Reset to |0⟩.

// Return to// classical host.

This works because we agree to always prepare qubits in the same state, labeled |0⟩.

Page 33: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

1 0 0 00 1 0 00 0 0 10 0 1 0

CONCEPTUAL INTRODUCTION AT

aka.ms/quantum-docs/multiple-qubits

Page 34: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

We now have everything we need to

make and measure pairs of entangled

qubits.

Page 35: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Q# can help us think conceptually about

algorithms.

Page 36: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 37: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 38: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 39: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 40: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

MOV cx,10loop:

; …dec cxjnz loop

Page 41: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

quantum

think

Page 42: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

let PhaseIncrement = With(QFT, Increment);

Page 43: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

// U⁺ is an example of the adjoint functor.

operation (left : Qubit, right : Qubit) : () {

Controlled

adjoint

}

// Can undo the operation with (Adjoint EPR).

Page 44: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation (

(Qubit[] => () : ),

(Qubit[] => () : ),

Qubit[]

) : () {

body {

outer // 𝑈

inner // 𝑉

(Adjoint outer) // 𝑈⁺

}

}

Communicates the algorithmic pattern 𝑈𝑉𝑈⁺.

E.g.:let PhaseIncrement

= With(QFT, Increment);

Page 45: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 46: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

// Using type parameters, we can express

// that a concept applies across different types.

function <'T, 'U> 'T 'U 'T {

let

return

}

let // pair : (Int, String)

// Returns 3.

Page 47: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

SINGLETON–TUPLE EQUIVALENCE

function Map<'T, 'U>(fn : 'T -> 'U, in : 'T[]) : 'U[] {let n = Length(arr);mutable out = new 'U[n];for (idx in 0..n – 1) { set out[idx] = fn(in[idx]); }return out;

}

'T and ('T) are exactly the same type for all 'T.Thus, all functions take and return a single tuple.

EXAMPLE

Page 48: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation <'T>( 'T => () ) : () {

body {

for (idx in 0..Length(targets) – 1) { op }

}

}

('T => () : Adjoint, Controlled)

EXAMPLE

Page 49: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation QuantumSearch(nIterations : Int, markedQubit : Qubit, databaseRegister: Qubit[]) : () {

body {

StatePreparationOracle(markedQubit, databaseRegister);

// Loop over Grover iterates.

for (idx in 0..nIterations - 1) {

ReflectMarked(markedQubit);

ReflectStart(markedQubit, databaseRegister);

}

}

}

FULL SAMPLE AT

aka.ms/quantum-samples/DatabaseSearch

We can’t directly pass |ψ⟩, but we can pass an operation 𝑂 that prepares |ψ⟩when given qubits in |0⟩.

Page 50: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

We can make teleport much more

reusable with first-class operations.

Page 51: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

{

}

let Fold _

// Returns 12.

// Returns [11; 13; 15].

The same features also make it easier to express some kinds of classical processing in terms of composition and combinations of functions.

Page 52: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation

target : Qubit[]

{ … }

__

target

We can make new functions and operations by specifying a subset of the inputs to a function or operation.

This lets us quickly combine existing callablesto work well together.

Page 53: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

function ComposeImpl<'T, 'U, 'V>(outer : ('U -> 'V), inner : ('T -> 'U), target : 'T) : 'V

{ return outer(inner(target)); }

function Compose<'T, 'U, 'V>

(outer : ('U -> 'V), inner : ('T -> 'U)): ('T -> 'V) {

return ComposeImpl(outer, inner, _);

}

EXAMPLE

Page 54: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation ApplyTwice<'T>(op : 'T => (), target : 'T) : () {

body { op(target); op(target); }

}function SquareOp<'T>(op : 'T => ()) : ('T => ()) {

return ApplyTwice(op, _);

}

EXAMPLE

SquareOp has type ('T => ()) -> ('T => ()).

Page 55: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation (

('T => () : ),

('T => () : ),

) : () {

body {

outer // 𝑈

inner // 𝑉

(Adjoint outer) // 𝑈⁺

}

}

Can quickly express ideas like “conjugate the operation 𝑈 by a Hadamard on each qubit.”

let Conjugate = WithCA(ApplyToEach(H, _),_

);

Conjugate(U);

Page 56: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

We can quickly combine different

operations together using partial

application.

Page 57: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 58: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Read the Docs.

OPERATION AND FUNCTION REFERENCE

aka.ms/qsharp-ref

Page 59: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

INTERPOLATED STRINGS

function Hello() : () {let x = 42;Message($"Hello, {x}."); // Prints “Hello, 42.” to the console.

}

$"{expr}" inserts diagnostic information about expr into a String for use with Message.

EXAMPLE

Page 60: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

ANTHROPIC PRINCIPLE

u (msg);TeleportMessage (msg, there);(Adjoint u)(there);

AssertQubit(Zero, there);

Observed effects must be compatible with their being an observer.

EXAMPLE

We used AssertQubit earlier to test the validity of our teleport operation.

Page 61: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

operation IdentityTeleport(q : Qubit[]) : () {body { using (aux = Qubit[1]) {

Teleport(q[0], aux[0]);SWAP(q[0], aux[0]);

} }}

operation TeleportationTest() : () {body {

// Process assertions are a// special case of state assertions.AssertOperationsEqualReferenced(

IdentityTeleport, NoOp, 1);}

}

EXAMPLE

FULL SAMPLE AT

aka.ms/quantum-samples/UnitTesting

Page 62: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

The only observable effect of functions is their return value.

DumpMachine and Message return (), which has only one valid value ().

This allows for calls to be stripped with no observable consequences.

Page 63: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

Let’s see DumpMachine in action.

Page 64: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the
Page 65: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

KATA DOWNLOAD AND INSTRUCTIONS

aka.ms/quantum-katas

Download the Quantum Katas

Open QuantumKatas.vscode-workspace.

RUNNING THE QUANTUM KATAS

Run Tasks: Run Test Task from theCommand Palette.

Page 66: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

KATA DOWNLOAD AND INSTRUCTIONS

aka.ms/quantum-katas

Download the Quantum Katas

Open QuantumKatas.vscode-workspace.

RUNNING THE QUANTUM KATAS

Run Tasks: Run Test Task from theCommand Palette.

• If you get stuck in Visual Studio Code, search the Command Palette.Ctrl + Shift + P or ⌘ + Shift + P

• ReferenceImplementation.qshas the solutions — don’t look unless you get really stuck!

• Your quick references have a lot of useful information, including function and operation summaries and links to documentation.

HINTS

Page 67: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

KATA DOWNLOAD AND INSTRUCTIONS

aka.ms/quantum-katas

Download the Quantum Katas

Open QuantumKatas.vscode-workspace.

RUNNING THE QUANTUM KATAS

Run Tasks: Run Test Task from theCommand Palette.

Page 68: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

KATA DOWNLOAD AND INSTRUCTIONS

aka.ms/quantum-katas

Download the Quantum Katas

Open QuantumKatas.vscode-workspace.

RUNNING THE QUANTUM KATAS

Run Tasks: Run Test Task from theCommand Palette.

Page 69: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

KATA DOWNLOAD AND INSTRUCTIONS

aka.ms/quantum-katas

Download the Quantum Katas

Open QuantumKatas.vscode-workspace.

RUNNING THE QUANTUM KATAS

Run Tasks: Run Test Task from theCommand Palette.

Page 70: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the

KATA DOWNLOAD AND INSTRUCTIONS

aka.ms/quantum-katas

Download the Quantum Katas

Open QuantumKatas.vscode-workspace.

RUNNING THE QUANTUM KATAS

Run Tasks: Run Test Task from theCommand Palette.

Page 71: RUNNING THE QUANTUM KATAS - ETH Z · aka.ms/quantum-katas Download the Quantum Katas Open QuantumKatas.vscode-workspace. RUNNING THE QUANTUM KATAS Run Tasks: Run Test Task from the