-
Notifications
You must be signed in to change notification settings - Fork 4
/
aramsey_experiment.py
76 lines (50 loc) · 2.64 KB
/
aramsey_experiment.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
67
68
69
70
71
72
73
74
75
#!/usr/bin/env python
from __future__ import division, absolute_import, print_function, unicode_literals
import parameters as p
from ion_trap import IonTrap
from ions import Ion, Chain
from experiment import Experiment
from observables import Observable
class ARamseyExperiment(Experiment):
def __init__(self, trap, chain, lasers, pulse_sequence, observables,
data_storage_path = '/home/trxw/Documents/dfr/codes/quantum_play/ChainSimulator/Data_Storage' ):
self.trap = trap
self.chain = chain
self.lasers = lasers
self.pulse_sequence = pulse_sequence
self.observables = observables
self.data_storage_path = data_storage_path
#super(ARamseyExperiment, self).__init__()
def run(self):
if __name__ == '__main__':
num_of_ions = 3
motional_hilbert_space_dim = 8
chain = Chain( num_of_ions, motional_hilbert_space_dim )
#Define trap:
dummy_trap = IonTrap( p.trap_parameters )
dummy_trap.load( chain )
#Setup lasers:
lasers = {'laser1' : Laser(ion_number = 1, freq = -1, intensity = .1)
'laser5' : Laser(ion_number = 5, freq = 1, intensity = .1)
}
pulse_sequence = [ (laser1, laser1_time),
(laser2, laser2_time),
(laser1, laser1_time),
(laser2, laser2_time),
]
observables = [ Observable('ion1', 'electronic_state')
]
experiment_parameters = {'trap' : trap,
'chain' : chain,
'lasers' : lasers,
'pulse_sequence' : pulse_sequence,
'observables' : observables,
'data_storage_path' : '/home/trxw/Documents/dfr/codes/quantum_play/ChainSimulator/Data_Storage'
}
experiment = ARamseyExperiment( **experiment_parameters )
#Initialize the chian quantum states:
experiment.initialize()
#Run the experiment and collect data:
experiment.run()
#Plot
experiment.plot(observables[0])