Example with the Agilent N9000A

Import

[1]:
import qcodes as qc
from qcodes_contrib_drivers.drivers.Agilent.Agilent_N9000A import Agilent_N9000A
Logging hadn't been started.
Activating auto-logging. Current session state plus future input saved.
Filename       : C:\Users\ed261978\.qcodes\logs\command_history.log
Mode           : append
Output logging : True
Raw input log  : False
Timestamping   : True
State          : active
Qcodes Logfile : C:\Users\ed261978\.qcodes\logs\200826-14764-qcodes.log

Load instrument

Here the import is done by USB

[10]:
psa = Agilent_N9000A('agilent', 'USB0::0x0957::0x0E0B::MY49370329::INSTR')
Connected to: Agilent Technologies N9000A (serial:MY49370329, firmware:A.04.26) in 0.27s

Initiallization

[11]:
psa.rf_center_frequency(2) # In GHz
psa.resolution_bandwidth(0.2) # In MHz
psa.video_bandwidth(0.2) # In MHz

Measurement

[12]:
print('Power at 1 GHz: ', psa.power(), ' dBm')
Power at 1 GHz:  -60.29117031  dBm
[13]:
print('Power spectral density at 1 GHz: ', psa.power_spectral_density(), ' dBm/Hz')
Power spectral density at 1 GHz:  -123.5143635  dBm/Hz
[ ]: