forked from microsoft/QuantumKatas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTasks.qs
44 lines (36 loc) · 1.27 KB
/
Tasks.qs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
//////////////////////////////////////////////////////////////////
// This file is a back end for the tasks in the tutorial.
// We strongly recommend to use the Notebook version of the tutorial
// to enjoy the full experience.
//////////////////////////////////////////////////////////////////
namespace Quantum.Kata.SingleQubitSystemMeasurements {
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Math;
// Exercise 2. Distinguish |0❭ and |1❭
operation IsQubitZero (q : Qubit) : Bool {
// ...
return false;
}
// Exercise 3. Distinguish |+❭ and |-❭ using Measure operation
operation IsQubitMinus (q : Qubit) : Bool {
// ...
return false;
}
// Exercise 5. Distinguish specific orthogonal states
operation IsQubitPsiPlus (q : Qubit) : Bool {
// ...
return false;
}
// Exercise 6. Distinguish states |A❭ and |B❭
operation IsQubitA (alpha : Double, q : Qubit) : Bool {
// ...
return false;
}
// Exercise 7. Measure state in {|A❭, |B❭} basis
operation MeasureInABBasis (alpha : Double, q : Qubit) : Result {
// ...
return One;
}
}