File data_analysis/@entanglement_evaluation/entanglement_evaluation.m changed (mode: 100644) (index 282ac0b..53c52d1) |
1 |
1 |
classdef entanglement_evaluation < handle |
classdef entanglement_evaluation < handle |
2 |
2 |
%ev=entanglement_evaluation creates entanglement_evaluation object which |
%ev=entanglement_evaluation creates entanglement_evaluation object which |
3 |
|
%contains a dual_homo_measurement object together with information about |
|
|
3 |
|
%contains a dual_homo_measurement object together with information about |
4 |
4 |
%the entanglement evaluation |
%the entanglement evaluation |
5 |
5 |
% |
% |
6 |
6 |
%all frequencies should be given in Hz for consistency!! |
%all frequencies should be given in Hz for consistency!! |
|
... |
... |
classdef entanglement_evaluation < handle |
12 |
12 |
% defining input and output |
% defining input and output |
13 |
13 |
measurement@dual_homo_measurement scalar |
measurement@dual_homo_measurement scalar |
14 |
14 |
evaluation_folder |
evaluation_folder |
15 |
|
|
|
|
15 |
|
|
16 |
16 |
% defining the pulsed modes |
% defining the pulsed modes |
17 |
17 |
inverted_evaluation@logical scalar = false |
inverted_evaluation@logical scalar = false |
18 |
18 |
pulse_gammas@double vector =[1] % now a commmon scaling factor for the pulse lengths!! |
pulse_gammas@double vector =[1] % now a commmon scaling factor for the pulse lengths!! |
|
... |
... |
classdef entanglement_evaluation < handle |
22 |
22 |
coupling_rates@double vector % linearized coupling for each mode |
coupling_rates@double vector % linearized coupling for each mode |
23 |
23 |
bare_couplings@double vector % single-photon coupling for each mode |
bare_couplings@double vector % single-photon coupling for each mode |
24 |
24 |
|
|
25 |
|
|
|
|
25 |
|
|
26 |
26 |
kappa@double scalar % cavity linewidth |
kappa@double scalar % cavity linewidth |
27 |
27 |
kappa_in@double scalar % input coupler linewidth |
kappa_in@double scalar % input coupler linewidth |
28 |
28 |
temperature@double scalar % in Kelvin |
temperature@double scalar % in Kelvin |
|
... |
... |
classdef entanglement_evaluation < handle |
34 |
34 |
readout_modes@double matrix %complex |
readout_modes@double matrix %complex |
35 |
35 |
entangling_modes@double matrix %complex |
entangling_modes@double matrix %complex |
36 |
36 |
correlation_functions@cell matrix |
correlation_functions@cell matrix |
37 |
|
|
|
|
37 |
|
|
38 |
38 |
pulse_Q@cell matrix |
pulse_Q@cell matrix |
39 |
39 |
pulse_P@cell matrix |
pulse_P@cell matrix |
40 |
40 |
pulse_X@cell matrix |
pulse_X@cell matrix |
41 |
41 |
pulse_Y@cell matrix |
pulse_Y@cell matrix |
42 |
|
|
|
|
42 |
|
|
43 |
43 |
pulse_CM@cell matrix |
pulse_CM@cell matrix |
44 |
44 |
pulse_CM_calibrated@cell matrix |
pulse_CM_calibrated@cell matrix |
45 |
45 |
pulse_CM_is_physical@cell matrix |
pulse_CM_is_physical@cell matrix |
46 |
46 |
logneg_corrected@cell matrix |
logneg_corrected@cell matrix |
47 |
47 |
end |
end |
48 |
|
|
|
|
48 |
|
|
49 |
49 |
methods |
methods |
50 |
50 |
%% constructor |
%% constructor |
51 |
51 |
function obj = entanglement_evaluation(varargin) |
function obj = entanglement_evaluation(varargin) |
52 |
52 |
obj = parseVararginForMissingFields(obj, varargin{:}); |
obj = parseVararginForMissingFields(obj, varargin{:}); |
53 |
53 |
end |
end |
54 |
|
function obj = blocked_cross_correlation(obj, block_size) |
|
|
54 |
|
function obj = blocked_cross_correlation(obj, varargin) |
|
55 |
|
block_size = 2^ceil(log2(2*obj.samples_per_pulse-1)); |
|
56 |
|
for k=1:2:length(varargin) |
|
57 |
|
switch varargin{k} |
|
58 |
|
case 'blocksize' |
|
59 |
|
block_size = varargin{k+1}; |
|
60 |
|
otherwise |
|
61 |
|
error(['varargin-argument ', varargin{k}, ' not recognized!']); |
|
62 |
|
end |
|
63 |
|
end |
55 |
64 |
for tp=1:obj.tracepairs_no |
for tp=1:obj.tracepairs_no |
56 |
65 |
tr_a = obj.measurement.homotraces(tp,1); |
tr_a = obj.measurement.homotraces(tp,1); |
57 |
66 |
tr_b = obj.measurement.homotraces(tp,2); |
tr_b = obj.measurement.homotraces(tp,2); |
|
... |
... |
classdef entanglement_evaluation < handle |
66 |
75 |
methods(Static, Hidden) |
methods(Static, Hidden) |
67 |
76 |
[optWidth, optLogNeg] = findOptimalPulseWidth(g,kappa,gamma_m, n_bar) |
[optWidth, optLogNeg] = findOptimalPulseWidth(g,kappa,gamma_m, n_bar) |
68 |
77 |
end |
end |
69 |
|
|
|
|
78 |
|
|
70 |
79 |
%% dependent properties and their getters |
%% dependent properties and their getters |
71 |
80 |
properties(Dependent) |
properties(Dependent) |
72 |
81 |
tracepairs_no@double scalar |
tracepairs_no@double scalar |
73 |
|
|
|
|
82 |
|
|
74 |
83 |
samples_per_trace@double scalar |
samples_per_trace@double scalar |
75 |
84 |
pulse_pairs_per_trace@double scalar |
pulse_pairs_per_trace@double scalar |
76 |
|
pulse_duration_seconds@double scalar |
|
77 |
|
|
|
|
85 |
|
pulse_duration_seconds@double scalar |
|
86 |
|
|
78 |
87 |
pulse_timevector@double vector |
pulse_timevector@double vector |
79 |
|
|
|
|
88 |
|
|
80 |
89 |
mech_frequencies_no@double scalar |
mech_frequencies_no@double scalar |
81 |
|
pulse_gammas_no@double scalar |
|
82 |
|
|
|
|
90 |
|
pulse_gammas_no@double scalar |
|
91 |
|
|
83 |
92 |
% get from measurement object |
% get from measurement object |
84 |
93 |
samplingrate@double scalar |
samplingrate@double scalar |
85 |
94 |
signal_power_muW@double matrix |
signal_power_muW@double matrix |
86 |
95 |
|
|
87 |
|
% |
|
|
96 |
|
% |
88 |
97 |
cooperativities@double vector % cooperativity from g, kappa, gamma, T for each mode |
cooperativities@double vector % cooperativity from g, kappa, gamma, T for each mode |
89 |
98 |
nbars@double vector %thermal occupation from T and omega for each mode |
nbars@double vector %thermal occupation from T and omega for each mode |
90 |
99 |
omegas@double vector %mechanical frequencies for each mode |
omegas@double vector %mechanical frequencies for each mode |
|
... |
... |
classdef entanglement_evaluation < handle |
100 |
109 |
methods |
methods |
101 |
110 |
function pulse_pairs_per_trace = get.pulse_pairs_per_trace(obj) |
function pulse_pairs_per_trace = get.pulse_pairs_per_trace(obj) |
102 |
111 |
pulse_pairs_per_trace = floor(obj.samples_per_trace/(2*obj.samples_per_pulse)); |
pulse_pairs_per_trace = floor(obj.samples_per_trace/(2*obj.samples_per_pulse)); |
103 |
|
end |
|
|
112 |
|
end |
104 |
113 |
function pulse_duration_seconds = get.pulse_duration_seconds(obj) |
function pulse_duration_seconds = get.pulse_duration_seconds(obj) |
105 |
114 |
pulse_duration_seconds = obj.samples_per_pulse/obj.samplingrate; |
pulse_duration_seconds = obj.samples_per_pulse/obj.samplingrate; |
106 |
115 |
end |
end |
|
... |
... |
classdef entanglement_evaluation < handle |
156 |
165 |
end |
end |
157 |
166 |
function omegas = get.omegas(obj) |
function omegas = get.omegas(obj) |
158 |
167 |
omegas = zeros(obj.mech_frequencies_no, 1); |
omegas = zeros(obj.mech_frequencies_no, 1); |
159 |
|
for k=1:obj.mech_frequencies_no |
|
|
168 |
|
for k=1:obj.mech_frequencies_no |
160 |
169 |
omegas(k) = 2*pi*obj.mech_frequencies(k); |
omegas(k) = 2*pi*obj.mech_frequencies(k); |
161 |
170 |
end |
end |
162 |
171 |
end |
end |
|
... |
... |
classdef entanglement_evaluation < handle |
177 |
186 |
end |
end |
178 |
187 |
end |
end |
179 |
188 |
end |
end |
180 |
|
end |
|
|
189 |
|
end |