-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from experiment (helios) #570
Open
shumpohl
wants to merge
12
commits into
qutech:master
Choose a base branch
from
qutech-lab:helios_pc_2/master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e07213b
Make flatten and balance work on single waveform playbacks
shumpohl 2fd2014
Add a setup function for the Tektronix AWG5014
15bd476
Merge remote-tracking branch 'qutech-lab/triton_200/master'
6e9209b
Modify conf_seq for HBT Sample
b93262a
Add query function for Tek amplitudes as needed for qc.awg_program
f95487c
Use functions pprovided by the driver instead of direct queries
db28104
Merge remote-tracking branch 'qutech-lab/triton_200/master'
16e84cd
Add toSingleWaveform functionality to qc
2c60e59
Fix small errors in setup_tek_awg
9eb642b
Change setup to 1 Qubit
91d713c
Add interface to use atsaverage auto rearm
shumpohl ae63cfb
Merge remote-tracking branch 'origin/feat/alazar_auto_trigger'
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
function setup_tek_awg(varargin) | ||
|
||
global smdata | ||
global plsdata | ||
|
||
defaultArgs = struct( ... | ||
'sampleVoltPerAwgVolt', [util.db('dB2F',-45)*2 util.db('dB2F',-45)*2 util.db('dB2F',-45)*2 util.db('dB2F',-45)*2], ... % 10^(-dB/20)*ImpedanceMismatch | ||
'smChannels', {{'RFA', 'RFB', 'RFC', 'RFD'}}, ... | ||
'tekName', 'AWG5000', ... | ||
'globalTransformation', [], ... | ||
'ip', '169.254.40.80', ... %IP's: | ||
'dcMode', false, ... | ||
'maxPulseWait', 60 ... % Maximum waiting time in s in qc.awg_program before arming DAQ again | ||
); | ||
|
||
args = util.parse_varargin(varargin, defaultArgs); | ||
plsdata.awg.sampleVoltPerAwgVolt = args.sampleVoltPerAwgVolt; | ||
plsdata.awg.dcMode = args.dcMode; | ||
plsdata.awg.triggerStartTime = 0; | ||
plsdata.awg.maxPulseWait = args.maxPulseWait; | ||
plsdata.awg.minSamples = 250; | ||
plsdata.awg.sampleQuantum = 1; | ||
plsdata.awg.globalTransformation = args.globalTransformation; | ||
|
||
for k = 1:numel(args.smChannels) | ||
smChannel = args.smChannels(k); | ||
if ~(smdata.channels(smchanlookup(smChannel)).instchan(1) == sminstlookup(args.tekName)) | ||
error('Channel %s does not belong to %s\n', smChannel, args.tekName); | ||
end | ||
smdata.channels(smchanlookup(smChannel)).rangeramp(end) = 1/args.sampleVoltPerAwgVolt(k); | ||
end | ||
|
||
% Reload qctoolkit TEK AWG integration | ||
qctoolkit_tek = py.importlib.reload(py.importlib.import_module('qctoolkit.hardware.awgs.tektronix')); | ||
|
||
py.importlib.import_module('tek_awg'); | ||
|
||
awg = py.tek_awg.TekAwg.connect_to_ip('169.254.40.80'); | ||
awg.instrument.timeout = py.int(1200000); | ||
% awg = py.tek_awg.TekAwg.connect_raw_visa_socket('169.254.40.80', '4001','@ni'); | ||
% % | ||
tawg=qctoolkit_tek.TektronixAWG(awg, pyargs('synchronize','clear')); | ||
% Only real instrument | ||
smdata.inst(sminstlookup(args.tekName)).data.tawg = tawg; | ||
|
||
plsdata.awg.inst = smdata.inst(sminstlookup(args.tekName)).data.tawg; | ||
if exist('awgctrl_tek.m', 'file') | ||
awgctrl('off') | ||
end | ||
|
||
% Create hardware setup for qctoolkit integration | ||
plsdata.awg.hardwareSetup = py.qctoolkit.hardware.setup.HardwareSetup(); | ||
|
||
% Create python lambda function in Matlab | ||
numpy = py.importlib.import_module('numpy'); | ||
for k = 1:numel(args.sampleVoltPerAwgVolt) | ||
multiply{k} = py.functools.partial(numpy.multiply, double(1./(args.sampleVoltPerAwgVolt(k)))); | ||
end | ||
|
||
% PlaybackChannels can take more than two values (analog channels) | ||
plsdata.awg.hardwareSetup.set_channel('TEK_A', ... | ||
py.qctoolkit.hardware.setup.PlaybackChannel(plsdata.awg.inst, int64(0), multiply{1})); | ||
plsdata.awg.hardwareSetup.set_channel('TEK_B', ... | ||
py.qctoolkit.hardware.setup.PlaybackChannel(plsdata.awg.inst, int64(1), multiply{2})); | ||
plsdata.awg.hardwareSetup.set_channel('TEK_C', ... | ||
py.qctoolkit.hardware.setup.PlaybackChannel(plsdata.awg.inst, int64(2), multiply{3})); | ||
plsdata.awg.hardwareSetup.set_channel('TEK_D', ... | ||
py.qctoolkit.hardware.setup.PlaybackChannel(plsdata.awg.inst, int64(3), multiply{4})); | ||
|
||
% MarkerChannel can only take on two values (digital channels) | ||
plsdata.awg.hardwareSetup.set_channel('TEK_A_MARKER', ... | ||
py.qctoolkit.hardware.setup.MarkerChannel(plsdata.awg.inst, int64(0))); | ||
plsdata.awg.hardwareSetup.set_channel('TEK_B_MARKER', ... | ||
py.qctoolkit.hardware.setup.MarkerChannel(plsdata.awg.inst, int64(1))); | ||
plsdata.awg.hardwareSetup.set_channel('TEK_C_MARKER', ... | ||
py.qctoolkit.hardware.setup.MarkerChannel(plsdata.awg.inst, int64(2))); | ||
plsdata.awg.hardwareSetup.set_channel('TEK_D_MARKER', ... | ||
py.qctoolkit.hardware.setup.MarkerChannel(plsdata.awg.inst, int64(3))); | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[1, 2**64-1]