-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDriver.cs
More file actions
29 lines (26 loc) · 894 Bytes
/
Copy pathDriver.cs
File metadata and controls
29 lines (26 loc) · 894 Bytes
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
using System;
using Microsoft.Quantum.Simulation.Simulators;
namespace Quantum.DecoratingTheTree
{
class Driver
{
static void Main(string[] args)
{
using (var qsim = new QuantumSimulator())
{
var result = GroversSearch_Main.Run(qsim).Result.ToArray();
// Convert the result into a tree decoration instruction
for (int i = 0; i < 3; ++i) {
for (int j = 0; j < 2 - i; ++j)
Console.Write(" ");
for (int j = i*i; j < (i+1)*(i+1); j++)
Console.Write(result[j] ? "0" : "X");
Console.WriteLine();
}
Console.WriteLine(" |");
Console.WriteLine("Press any key to continue...");
Console.ReadKey();
}
}
}
}