Skip to content

Commit

Permalink
qctoolkit test setup
Browse files Browse the repository at this point in the history
  • Loading branch information
M-superposition committed Jul 5, 2018
1 parent ad49f12 commit 7eb183d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions MATLAB/+qc/qctoolkitTestSetup.m
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
%% --- Test setup without AWG and Alazar (only qctoolkit) -----------------
global plsdata
plsdata = struct( ...
'path', 'C:\Users\Pascal\Janeway\Cerfontaine\Code\qc-toolkit-pulses', ...
'path', 'Z:\code\qc-toolkit-pulses', ...
'awg', struct('inst', [], 'hardwareSetup', [], 'sampleRate', 2e9, 'currentProgam', '', 'registeredPrograms', struct(), 'defaultChannelMapping', struct(), 'defaultWindowMapping', struct(), 'defaultParametersAndDicts', {{}}, 'defaultAddMarker', {{}}), ...
'dict', struct('cache', [], 'path', 'C:\Users\Pascal\Janeway\Cerfontaine\Code\qc-toolkit-dicts'), ...
'dict', struct('cache', [], 'path', 'Z:\code\qc-toolkit-dicts'), ...
'qc', struct('figId', 801), ...
'daq', struct('inst', [], 'defaultOperations', {{}}, 'reuseOperations', false) ...
);
Expand All @@ -17,10 +17,10 @@
% Need the triton_200 repo on the path (for awgctrl)

% Path for Triton 200 backups
loadPath = 'C:\Users\Pascal\Janeway\Common\GaAs\Triton 200\Backup\DATA\workspace';
loadPath = 'Y:\GaAs\Triton 200\Backup\DATA\workspace';
pulsePath = plsdata.path;
dictPath = plsdata.dict.path;
tunePath = 'C:\Users\Pascal\Janeway\Cerfontaine\Code\dev\+tune\data';
tunePath = 'Z:\DATA';

% Loading
try
Expand All @@ -32,7 +32,8 @@
info = dir(fullfile(tunePath, 'smdata_recent.mat'));
fprintf('Loaded smdata from %s\n', datestr(info.datenum));
try
copyfile(fullfile(loadPath, 'tunedata_recent.mat'), fullfile(tunePath, 'tunedata_recent.mat'));
% copyfile(fullfile(loadPath, 'tunedata_recent.mat'), fullfile(tunePath, 'tunedata_recent.mat'));
copyfile(fullfile(loadPath, 'tunedata_2018_06_25_21_08.mat'), fullfile(tunePath, 'tunedata_recent.mat'));
catch err
warning(err.getReport());
end
Expand All @@ -51,7 +52,7 @@

global tunedata
global plsdata
tunedata.run{tunedata.runIndex}.opts.loadFile = 'C:\Users\Pascal\Janeway\Common\GaAs\Triton 200\Backup\DATA\tune#most_recent_file';
tunedata.run{tunedata.runIndex}.opts.loadFile = 'Y:\GaAs\Triton 200\Backup\DATA\tune';
import tune.tune

plsdata.path = pulsePath;
Expand All @@ -65,7 +66,7 @@
% Initializes hardware setup
% Can also be used for deleting all programs/resetting but then also need to setup Alazar again, i.e. the cell above and the three cells below )
plsdata.awg.hardwareSetup = [];
qc.setup_tabor_awg('realAWG', false, 'simulateAWG', true, 'taborDriverPath', 'C:\Users\Pascal\Janeway\Cerfontaine\Code\tabor');
qc.setup_tabor_awg('realAWG', false, 'simulateAWG', true, 'taborDriverPath', 'Z:\code\python-TaborDriver');

% AWG default settings
awgctrl('default');
Expand All @@ -75,7 +76,7 @@
% Execute after setting up the AWG since needs hardware setup initialized
% Need to test whether need to restart Matlab if execute
% qc.setup_alazar_measurements twice
% qc.setup_alazar_measurements('nQubits', 2, 'nMeasPerQubit', 4, 'disp', true);
qc.setup_alazar_measurements('nQubits', 2, 'nMeasPerQubit', 4, 'disp', true);

% Qctoolkit
plsdata.qc.backend = py.qctoolkit.serialization.FilesystemBackend(pulsePath);
Expand All @@ -84,4 +85,6 @@

% Tune
tunedata.run{tunedata.runIndex}.opts.path = tunePath;

disp('done');
% -------------------------------------------------------------------------

0 comments on commit 7eb183d

Please sign in to comment.