-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
56 lines (47 loc) · 893 Bytes
/
main.py
File metadata and controls
56 lines (47 loc) · 893 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import numpy as np
from gates import *
import time
import resource
import itertools
# resource.setrlimit(resource.RLIMIT_AS, (2147483648, 2147483648))
s = [
q() for _ in range(3)
]
# Simple 3 Qubit, entangled, circuit expirement.
c = [
["H", s[0]],
["H", s[1]],
["H", s[2]],
# #! LEVEL 2
["Z", s[2]],
["CZ", s[0], s[1]],
#! LEVEL 3
["H", s[0]],
["H", s[1]],
["H", s[2]],
]
# c = [
# ["H", s[0]],
# ["H", s[1]],
# ["CNOT", s[1], s[0]],
# ["H", s[0]]
# ]
# c = [
# ["H", s[0]],
# ["H", s[1]],
# ["CZ", s[0], s[1]],
# ["H", s[0]],
# ["H", s[1]],
# ["z", s[0]],
# ["z", s[1]],
# ["CZ", s[0], s[1]],
# ["H", s[0]],
# ["H", s[1]],
# ]
# c = [
# ["H", s[x]] for x in range(4098)
# ]
start = time.time()
run(s, shots=10000, circuit=c)
end = time.time()
# print("Time took>", end - start)