List of commits:
Subject Hash Author Date (UTC)
Add option 'two_sidebands' to trace_out 3f70b4498e116bf89ea2230e4a6b081d8d240bc3 Jason Hoelscher-Obermaier 2017-05-07 08:14:45
Fix bug in meta_ev 25d2497bf41eaf1198d88269dd3460812b38e18f Jason Hoelscher-Obermaier 2017-05-05 17:45:20
Allow plotting of abs. values with log. color scale in plot_CM 2147950f70bb2631656c1c20448eeda106acf6e2 Jason Hoelscher-Obermaier 2017-05-05 16:15:26
Improve plotLogneg 445bec4d79ec7c09efa92a878e9fc9d5b3a6801e Jason Hoelscher-Obermaier 2017-05-05 15:26:31
Add method plot_CM to entanglement_evaluation 54f9ca5aa51e96aedf3dddaa1609438c088a87b8 Jason Hoelscher-Obermaier 2017-05-05 14:29:23
Add option 'color_range' to plot_matrix 7ae27bc20af3faf8947ac07eec66b52851c45f54 Jason Hoelscher-Obermaier 2017-05-05 13:57:06
Improve convenience function plot_matrix 8ebc93c933416a384bc4c6b0ab44a8f6f516b695 Jason Hoelscher-Obermaier 2017-05-05 10:07:33
Fix bug which prevents exporting of pulse_trace if these become very large c2a75103be1264f1fa462d1d2b5c685d8cda32e0 Jason Hoelscher-Obermaier 2017-05-04 15:10:20
Add purity and occupation as properties to entanglement_evaluation f512ccdf6c11f0967feeb1fe11dbd8227307647e Jason Hoelscher-Obermaier 2017-05-04 08:55:34
Allow tracing of individual light modes in trace_out.m bc85fff490d92add04a08b32507d8b99aabc1814 Jason Hoelscher-Obermaier 2017-05-02 16:42:04
Also always save a png in save_fig_pdf.m 1d0ca7530e1efbd861637b7b913d78d3e70b1d15 Jason Hoelscher-Obermaier 2017-05-02 11:26:29
Extend plot_cuts to work with 1-dimensional (vector) meta_evs 3d7fd42b341f66e0d7e6733a4817c53c61f04863 Jason Hoelscher-Obermaier 2017-05-02 10:32:20
Add convenience fcts for plotting: logticks and set_tick_format fff9d4f483232a9377c5fdb4686f1ba1f5b48921 Jason Hoelscher-Obermaier 2017-05-02 10:28:50
Add support for automatic legends to plot_logneg_versus_gamma.m f10bdf863978f2c19acf73ca726de0855d16f9f0 Jason Hoelscher-Obermaier 2017-05-02 09:53:51
Add option to plot to subplots to plot_cuts and plot_logneg_versus_gamma 7037df1212f6ba94e74311c7fcdc1ffde453063d Jason Hoelscher-Obermaier 2017-05-02 09:21:31
Add option 'data_label' to plotLogneg.m 4f37d32ba0720a04e967125d8f02ade1239b27f9 Jason Hoelscher-Obermaier 2017-05-02 09:20:11
Add convenience function save_fig_pdf d482934c055e8805409c96f592ac18dd448ad8f9 Jason Hoelscher-Obermaier 2017-04-28 16:43:02
Add better helper fct plot_matrix for convenient display of correlation matrices etc 6f74f026d6477fd24083046842647ab750c185d7 Jason Hoelscher-Obermaier 2017-04-27 13:35:59
Add option 'shorteng' for legend-formatting in plot_cuts.m 7086bd95820d452f6caa8307b7176d99493dc0dc Jason Hoelscher-Obermaier 2017-04-26 09:54:51
Adapt .editorconfig to work with tsv-files e14c3c5c4898b939ca0a31abbaf35776fd6fc9d0 Jason Hoelscher-Obermaier 2017-04-26 09:28:44
Commit 3f70b4498e116bf89ea2230e4a6b081d8d240bc3 - Add option 'two_sidebands' to trace_out
- allows to specfiy only the mode corresponding to freq \omega
and automatically also trace out the modes corresponding to -\omega
- should also work for several modes
- added corresponding tests to entanglement_evaluation_test
Author: Jason Hoelscher-Obermaier
Author date (UTC): 2017-05-07 08:14
Committer name: Jason Hoelscher-Obermaier
Committer date (UTC): 2017-05-07 08:14
Parent(s): 25d2497bf41eaf1198d88269dd3460812b38e18f
Signing key:
Tree: fcbf877d4b80b8e2727d9af7d3433de151a2125e
File Lines added Lines deleted
data_analysis/@entanglement_evaluation/trace_out.m 30 8
data_analysis/unittests/entanglement_evaluation_test.m 13 0
File data_analysis/@entanglement_evaluation/trace_out.m changed (mode: 100644) (index 962573b..b457615)
... ... function ev_traced = trace_out(ev, modes_to_trace, varargin)
4 4 % have been traced out. That is for which the interesting quantities % have been traced out. That is for which the interesting quantities
5 5 % logneg, physicality, covariance matrices have been recalculated appropriately % logneg, physicality, covariance matrices have been recalculated appropriately
6 6 specify_light_modes = false; specify_light_modes = false;
7 % if false (default): modes_to_trace are taken to refer to mechanical modes
8 % ---> light modes to be traced are infered from them
9 % if false: modes_to_trace are taken to refer directly to the light modes
7 % false (default): modes_to_trace are taken to refer to mechanical modes
8 % (as specified in ev.mech_frequencies)
9 % ---> light modes to be traced are infered from modes_to_trace
10 % true: modes_to_trace are taken to refer directly to the light modes
11 two_sidebands = false;
12 % false (default): only trace out the modes specified directly
13 % true: infer the corresponding modes for the "unintended" sidebands
14 % (same frequency by inverted sign)
15 % from the specified modes and trace them out as well
10 16
11 remaining_args = {varargin{:}};
17 remaining_args = {}; % feed all unused varargin-arguments to get_shotnoise_ind
18 rem_args_count = 1;
12 19 for k=1:2:length(varargin) for k=1:2:length(varargin)
13 20 switch lower(varargin{k}) switch lower(varargin{k})
14 21 case {'light_modes', 'specify_light_modes'} case {'light_modes', 'specify_light_modes'}
15 22 specify_light_modes = varargin{k+1}; specify_light_modes = varargin{k+1};
16 remaining_args{k} = [];
17 remaining_args{k+1} = [];
23 case {'two_sidebands'}
24 two_sidebands = varargin{k+1};
18 25 otherwise otherwise
19 disp(varargin{k})
26 remaining_args{rem_args_count} = varargin{k};
27 remaining_args{rem_args_count+1} = varargin{k+1};
28 rem_args_count = rem_args_count + 2;
20 29 end end
21 30 end end
22 remaining_args = remaining_args(~cellfun('isempty',remaining_args));
31
32 assert(~(specify_light_modes && two_sidebands),...
33 'Options "specify_light_modes" and "two_sidebands" cannot be used at the same time.')
23 34
24 35 ev_traced = ev.copy(); ev_traced = ev.copy();
25 36
 
... ... function ev_traced = trace_out(ev, modes_to_trace, varargin)
49 60 'entanglement_evaluation:trace_out:modes_illegit',... 'entanglement_evaluation:trace_out:modes_illegit',...
50 61 'The modes you specified for tracing out do not seem to be legit.'); 'The modes you specified for tracing out do not seem to be legit.');
51 62
63 if two_sidebands
64 freqs_to_trace = ev.mech_frequencies(modes_to_trace);
65 corresponding_modes = arrayfun(...
66 @(ind)find(ev.mech_frequencies==-freqs_to_trace(ind)),...
67 1:length(freqs_to_trace));
68 modes_to_trace = [modes_to_trace, corresponding_modes];
69 end
70
52 71 mode_indices_new = setdiff(mode_indices_old, modes_to_trace); mode_indices_new = setdiff(mode_indices_old, modes_to_trace);
72 assert(~isempty(mode_indices_new),...
73 'entanglement_evaluation:trace_out:no_modes_remaining',...
74 'You asked me to trace out everything. This will do no good.')
53 75 mech_frequencies_new = mech_frequencies_old(mode_indices_new); mech_frequencies_new = mech_frequencies_old(mode_indices_new);
54 76
55 77 ev_traced.mech_frequencies = mech_frequencies_new; ev_traced.mech_frequencies = mech_frequencies_new;
File data_analysis/unittests/entanglement_evaluation_test.m changed (mode: 100644) (index 7d69cc0..a44c3f2)
... ... function traceout_test(shared)
811 811
812 812 % ev_traced = ev.trace_out([1]); % ev_traced = ev.trace_out([1]);
813 813
814 %% test with two-sideband evaluations
815 ev = load('.ev.mat'); ev = ev.ev;
816 % ev.mech_frequencies
817 % 1.0e+06 * [0.9200 1.0446 -0.9200 -1.0446]
818 ev_traced = ev.trace_out(1, 'two_sidebands', true);
819 assertEqual(ev_traced.mech_frequencies, ev.mech_frequencies([2,4]))
820 ev_traced = ev.trace_out(2, 'two_sidebands', true);
821 assertEqual(ev_traced.mech_frequencies, ev.mech_frequencies([1,3]))
822 test_call = @()ev.trace_out([1,2], 'two_sidebands', true);
823 assertExceptionThrown(test_call,...
824 'entanglement_evaluation:trace_out:no_modes_remaining')
825
826
814 827 function purity_test(shared) function purity_test(shared)
815 828 ev = load('.ev.mat'); ev = ev.ev; ev = load('.ev.mat'); ev = ev.ev;
816 829 ev.calculate_purity; ev.calculate_purity;
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/gutc61/Membrane

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/gutc61/Membrane

Clone this repository using git:
git clone git://git.rocketgit.com/user/gutc61/Membrane

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main