-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharbitrary_envelope_detection.py
66 lines (54 loc) · 1.67 KB
/
arbitrary_envelope_detection.py
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
57
58
59
60
61
62
63
64
65
66
from qm.qua import *
import numpy as np
averaging = 10000
wait_min = 0
wait_max = 30000
n_points = 51
wait_list = np.linspace(
wait_min // 4,
wait_max // 4,
n_points,
dtype=int).tolist()
delay = 20 // 4
with program() as envelop:
N = declare(int)
w = declare(int)
I1 = declare(fixed)
Q1 = declare(fixed)
I2 = declare(fixed)
Q2 = declare(fixed)
with for_each_(w, wait_list):
save(w, 'wait')
with for_(N, 0, N < averaging, N + 1):
align('buffer', 'pump', 'qubit_long')
wait(20, 'buffer')
play('arbitrary', 'buffer')
wait(delay, 'pump')
play('square_swap', 'pump')
align('pump', 'qubit_long')
wait(w, 'qubit_long')
play('selective_pi', 'qubit_long')
align('qubit_long', 'readout')
play('clear_ro', 'readout')
measure('meas_clear', 'readout', None,
('optiW1', I1),
('optiW2', Q1))
save(I1, 'I1')
save(Q1, 'Q1')
wait(12500, 'qubit_long')
align('buffer', 'pump', 'qubit_long')
wait(20, 'buffer')
play('arbitrary', 'buffer')
wait(delay, 'pump')
play('square_swap', 'pump')
align('pump', 'qubit_long')
wait(w, 'qubit_long')
wait(200, 'qubit_long')
align('qubit_long', 'readout')
play('clear_ro', 'readout')
measure('meas_clear', 'readout', None,
('optiW1', I2),
('optiW2', Q2))
save(I2, 'I2')
save(Q2, 'Q2')
wait(12500, 'qubit_long')