forked from microsoft/QuantumKatas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ReferenceImplementation.qs
37 lines (26 loc) · 1.12 KB
/
ReferenceImplementation.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
//////////////////////////////////////////////////////////////////////
// This file contains reference solutions to all tasks.
// You should not modify anything in this file.
// We recommend that you try to solve the tasks yourself first,
// but feel free to look up the solution if you get stuck.
//////////////////////////////////////////////////////////////////////
namespace Quantum.Kata.VisualizationTools {
open Microsoft.Quantum.Intrinsic;
operation LearnSingleQubitState_Reference (q : Qubit) : (Double, Double) {
return (0.9689, 0.2474);
}
operation LearnBasisStateAmplitudes_Reference (qs : Qubit[]) : (Double, Double) {
return (0.3821, 0.339);
}
operation HighProbabilityBasisStates_Reference (qs : Qubit[]) : Int[] {
return [0, 2, 8, 9, 11, 15, 18, 20, 22, 25, 28];
}
operation ReadMysteryOperationMatrix_Reference () : Double {
return 0.5184;
}
operation ReadMysteryOperationTrace_Reference () : (Int, Int, Int) {
return (4, 8, 2);
}
}