forked from microsoft/QuantumKatas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTasks.qs
46 lines (38 loc) · 1.12 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
44
45
46
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
//////////////////////////////////////////////////////////////////
// This file is a back end for the tasks in random number generation tutorial.
// We strongly recommend to use the Notebook version of the tutorial
// to enjoy the full experience.
//////////////////////////////////////////////////////////////////
namespace Quantum.Kata.RandomNumberGeneration {
open Microsoft.Quantum.Diagnostics;
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Canon;
// Exercise 1.
operation RandomBit () : Int {
use q = Qubit();
// ...
return -1;
}
// Exercise 2.
operation RandomTwoBits () : Int {
// ...
return -1;
}
// Exercise 3.
operation RandomNBits (N : Int) : Int {
// ...
return -1;
}
// Exercise 4.
operation WeightedRandomBit (x : Double) : Int {
// ...
return -1;
}
// Exercise 5.
operation RandomNumberInRange (min : Int, max : Int) : Int {
// ...
return -1;
}
}