QTLab
By Reinier & Guen
“If it works, it’s good enough”
Spaghetti code
How would you do this experiment?
“If it’s modular, it’s reusable” (and will save me time later!)
• How would you do this experiment?
QTLab QTLab
QTLab QTLab
Why make modular code? QTLab QTLab QTLab QTLab
vs.
QTLab vs.
Advantages: • Flexible and reusable • Less (user) code • Easy to read by others (if done properly!) Disadvantages: • Can take more time • A bit more thinking ahead required (but mostly done for you by QTLab)
How does QTLab work?
NI VISA
GPIB Devices COM1 USB device That behaves
As COM10
DLL Drivers COM / ActiveX
Python Driver Python Driver
QTLab
Python Driver
Data structure standardized
Creating loops is easy!
QTLab structure
Most important folders and files: • Source – you don’t have to touch it • Examples – look here for examples! • Instrument_plugins – reusable
classes • Init – what happens at startup • Userconfig.py – some settings • Scripts – your main tool for
measuring (see examples)
QTLab GUI • GUI can:
– Inspect and change instrument parameters
– Watch a parameter value (with plot)
– Modify plots
Supported Instruments • ADwin gold (windows only) • Agilent E8257D • Attocube ANC150 • Attocube ARC200 • Cryocon 62 • Cryomagnetics 4G • Cryomagnetics CS4 • Cryomagnetics LM500 • EG&G 5209 • Fianium AOTF • Fluke PM5138A • HP 33120A Arbitrary Waveform Generator • HP 4195A Network analyzer • HP 81110A Pulse generator • HP 8656B, 8657A, 8657B Signal generator • HP 8753C Network analyzer • Keithley 199 DMM • Keithley 2000 DMM • Keithley 2100 DMM • Keithley 2700 DMM • Lakeshore 340 temperature controller • LeCroy Waverunner 44Xi digital oscillosopea • Meadowlark LCVRs
• National Instruments DAQ devices (Windows only) • Newport ESP100 step motor controller • Oxford Instruments ILM 200 • Oxford Instruments IPS 120 • Oxford Instruments Kelvinox IGH • Picoquant Picoharp 300 (windows only) • R&S SMR40 • R&S Step Attenuator • SMC100 newport stepper motor controller • Spectra Physics Millenia pump laser controller • Stanford Research Systems 400 photon counter • Spectrum M2i2030 (Windows only) • Speedlink StrikeFX • Standa USMC stepper motors (Windows only) • Tektronix AWG5014 • Tektronix AWG520 • Thorlabs FTD2XX stepper motor controller • Thorlabs PM100 • Thorlabs PM100D • Winspec spectrometer software • Quantum Transport IVVI, SMS and OptoDAC • Zaber TNM stepper motors
Probably a few more that We don’t know about!
Scripts
• Like matlab, a file that acts as a function
Function arguments
Return values
How to install 1. Look at the QTLab wiki! http://qtwork.tudelft.nl/qtlab 2. Get QTLab source from “git” repository http://qtwork.tudelft.nl/git 3. Install dependencies and
3rd party packages (python, numpy = basic math functions, et al.)
4. Look at the example measurements and start writing your own!
How to collaborate?
In your lab: • Have one person responsible for code • Spend time/effort to write proper code
– Learn python – Comment effectively (~25% comments) – Break program in logical blocks
• Share your code. At least folder on shared drive, better: version control (svn, git)
QTLab QTLab QTLab QTLab
How to collaborate?
Within QT: • Ask around if things have been done
before • Send new instrument drivers to Reinier
(bugfixes as well) [email protected] • Sharing scripts is probably much harder
as different experiments require different approaches.
Take home messages
Why: Complex measurement code can get ugly and time-consuming to (re-)use. How: Invest time & effort in writing modular and well-commented code. What: 1. Sharing is caring 2. Recycle your code and that of others
QTLab
Interactive
• Questions?
• Suggestions?
• Need advice?