Skip to content
Snippets Groups Projects
Commit 563efe06 authored by Sander de Snoo's avatar Sander de Snoo
Browse files

Merge branch 'dev' of https://github.com/stephanlphilips/pulse_lib into dev

parents 2784339b 368d84c2
No related branches found
No related tags found
No related merge requests found
......@@ -199,6 +199,15 @@ class pulselib:
'''
self.digitizer_channels[channel_name].frequency = frequency
def set_digitizer_hw_input_channel(self, channel_name, hw_channel_number):
'''
Sets hardware input channel for Keysight digitizer using FPGA demodulation.
Args:
channel_name (str): name of the channel.
hw_channel_number (int): channel number of input on hardware.
'''
self.digitizer_channels[channel_name].hw_input_channel = hw_channel_number
def set_digitizer_rf_source(self, channel_name, output,
mode='pulsed',
amplitude=0,
......@@ -206,7 +215,6 @@ class pulselib:
startup_time_ns=0,
prolongation_ns=0,
source_delay_ns=0,
trigger_offset_ns=None,
):
'''
Adds a resonator RF source to the digitizer channel.
......@@ -234,16 +242,10 @@ class pulselib:
prolongation time [ns] of the RF source after acquisition end in pulsed mode.
source_delay_ns (float):
delay to be added to the source signal [ns].
trigger_offset_ns (float):
DEPRECATED. This argument has been replaced by startup_time_ns and source_delay_ns.
Note:
The output specification depends on the driver.
Qblox driver only supports module name with channel number(s).
'''
if trigger_offset_ns is not None:
print('Warning: trigger_offset_ns is deprecated. Use startup_time_ns and/or source_delay_ns')
if startup_time_ns == 0:
startup_time_ns = trigger_offset_ns
rf_source = resonator_rf_source(output=output, mode=mode,
amplitude=amplitude,
attenuation=attenuation,
......
from typing import Tuple, Optional, Union, List
from dataclasses import dataclass
@dataclass
class awg_channel:
name: str
awg_name: str
channel_number: int
amplitude: Optional[float] = None
delay: float = 0 # ns
delay: float = 0 # ns
attenuation: float = 1.0
compensation_limits: Tuple[float, float] = (0,0)
compensation_limits: Tuple[float, float] = (0, 0)
bias_T_RC_time: Optional[float] = None
offset: Optional[float] = None # mV
offset: Optional[float] = None # mV
@dataclass
class marker_channel:
name: str
module_name: str # could be AWG or digitizer
channel_number: Union[int,Tuple[int,int]]
module_name: str # could be AWG or digitizer
channel_number: Union[int, Tuple[int, int]]
'''
Keysight: 0 = trigger out channel, 1...4 = analogue channel
Tektronix: tuple = (channel,marker number), int = analogue channel
......@@ -27,8 +29,8 @@ class marker_channel:
hold_ns: float
amplitude: float = 1000
invert: bool = False
delay: float = 0 # ns
sequencer_name : Optional[str] = None
delay: float = 0 # ns
sequencer_name: Optional[str] = None
'''
Qblox only: name of qubit, awg or digitizer channel to use for sequencing
'''
......@@ -55,7 +57,6 @@ class marker_channel:
# measurement_converter generates 1 or 2 raw data outputs depending on iq_out
# Changed [v1.6.0] trigger_offset_ns -> delay + startup_time_ns
@dataclass
class resonator_rf_source:
'''
......@@ -63,12 +64,20 @@ class resonator_rf_source:
The resonator will be driven with the frequency specified for the digitizer
channel and dependent on the mode can be enabled synchronous with acquisitions.
'''
output: Union[str, Tuple[str,int], Tuple[str,List[int]]]
output: Union[str, Tuple[str, int], Tuple[str, List[int]]]
'''
output: one of the following:
(str) name of awg_channel
(str) name of marker channel.
(Tuple[str, int]) name of module and channel number
(Tuple[str, List[int]]) name of module and channel numbers
Configuration for Keysight:
* Marker channel name if digitizer demodulation frequency is None
* tuple(AWG module name, channel number) if digitizer demodulation frequeny is not None
Configuration for Tektronix:
* Marker channel name if digitizer demodulation frequency is None
Configuration for Qblox:
* Marker channel name if digitizer demodulation frequency is None (Not yet supported)
* tuple(QRM module name, list(channel numbers)) if digitizer demodulation frequeny is not None
'''
mode: str = 'pulsed'
'''
......@@ -78,7 +87,7 @@ class resonator_rf_source:
'''
amplitude of the RF source in mV.
'''
attenuation : float = 1.0
attenuation: float = 1.0
'''
Attenuation of the source channel.
'''
......@@ -95,6 +104,7 @@ class resonator_rf_source:
prolongation [ns] of the pulse after acquisition end in pulsed and continuous mode.
'''
@dataclass
class digitizer_channel:
'''
......@@ -104,8 +114,9 @@ class digitizer_channel:
channels is performed simultaneously.
NOTE:
This channel does not specify the physical digitizer input channel.
The digitizer can combine two physical inputs in one output buffer.
On Keysight M3102A with FPGA demodulation this channel does not specify
the physical digitizer input channel, but the data channel number.
The digitizer can combine two physical inputs (I and Q) in one output buffer.
It can also demodulate 1 physcial input to multipe output buffers.
'''
name: str
......@@ -113,14 +124,14 @@ class digitizer_channel:
channel_numbers: List[int]
'''
Channel number to *read* the data from.
This is the number of the output buffer of the digitizer.
For M3102A this is the number of the output buffer of the digitizer.
'''
# @@@ TODO change to 'data_mode': 'Complex' or 'Real' or 'I+Q' or 'Split'??
iq_out: bool = False
'''
Return I/Q data in complex value. If False the imaginary component will be discarded.
Note: sequencer.get_measurement_param has the option to convert to I+Q, amplitude+phase, etc.
'''
phase : float = 0.0
phase: float = 0.0
'''
Phase shift after iq demodulation
'''
......@@ -140,6 +151,10 @@ class digitizer_channel:
'''
Channel delay in ns.
'''
hw_input_channel: int = None
'''
For M3102A this is the physical input channel of the digitizer.
'''
def __post_init__(self):
n_ch = len(self.channel_numbers)
......
This diff is collapsed.
This diff is collapsed.
......@@ -17,7 +17,9 @@ KeysightMocked:
SD2: [Dig1,2]
rf:
SD2:
output: M1
output: [AWG1,4]
frequency: 2e6
amplitude: 400
startup_time: 500
runner: core_tools
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment