RFMixer¶
Class Arguments
Argument |
Type |
Default Value |
|---|---|---|
if_source |
RFSource |
|
lo_source |
RFSource |
|
sideband |
int |
-1 |
frequency_control_port |
str |
if |
amplitude_control_port |
str |
if |
blind_source |
bool |
False |
default_frequency |
float |
100000000.0 |
default_amplitude |
float |
0.0 |
default_phase |
float |
0.0 |
freq_limit |
tuple |
(0.0, inf) |
amp_limit |
tuple |
(0.0, 1.0) |
blind |
bool |
False |
default_ramp_steps |
np.int32 |
30 |
debug_output |
bool |
False |
Bold arguments are mandatory. For more documentation on the listed arguments refer to the class definition below. If parameters appear in this list but not in the class definition below, please recursively check the linked base classes for the definition of the parameter.
Inheritance Diagram
Example Component Dictionary
{
"rfsource_example": {
"classname": "atomiq.components.electronics.rfsource.RFMixer",
"arguments": {
"if_source": "<mandatory parameter (RFSource)>",
"lo_source": "<mandatory parameter (RFSource)>",
"sideband": -1,
"frequency_control_port": "if",
"amplitude_control_port": "if",
"blind_source": false,
"default_frequency": 100000000.0,
"default_amplitude": 0.0,
"default_phase": 0.0,
"freq_limit": [
0.0,
1e999
],
"amp_limit": [
0.0,
1.0
],
"blind": false,
"default_ramp_steps": 30,
"debug_output": false
}
}
}
Class Description
- class atomiq.components.electronics.rfsource.RFMixer(if_source, lo_source, sideband=-1, frequency_control_port='if', amplitude_control_port='if', blind_source=False, *args, **kwargs)[source]
Bases:
RFSourceGeneral frequency mixer with an RF, an IF and an LO port.
This component represents the signal at the RF port of a frequency mixer, i.e. the mixer is an RFSource itself and can e.g. be used as the rfsource of an AOM. The port frequencies always obey the mixing equation
\[f_\mathrm{rf} = f_\mathrm{lo} + \mathrm{sideband} * f_\mathrm{if}\]where
sideband = -1corresponds to difference (down-)conversion,sideband = +1to sum (up-)conversion and highersidebandto harmonics of the IF.The IF and LO ports are connected to RFSource components:
set_frequency()adjusts the frequency of thefrequency_control_portinput such that the RF output frequency matches the request, given the current frequency of the second input. That frequency is read from the component at kernel runtime (viaRFSource.get_frequency()), i.e. the mixer always follows the frequency attribute of that component.set_amplitude()is forwarded to theamplitude_control_portinput.
Since this is an RFSource, ramps and arbs work through the usual machinery and are forwarded to the corresponding input ports.
- Parameters:
if_source (
RFSource) -- RFSource component connected to the IF portlo_source (
RFSource) -- RFSource component connected to the LO portsideband (
int) -- nonzero integer, +1 for sum (up-), -1 for difference (down-)conversion (default -1)frequency_control_port (
str) -- input port which is adjusted to set the RF output frequency, "if" or "lo" (default "if")amplitude_control_port (
str) -- input port which is adjusted to set the RF output amplitude, "if" or "lo" (default "if")blind_source (
bool) -- Control whether the static source frequency is queried for every frequency update. For slow RPC devices which do not change unexpectedly this can be set toFalseto avoid unnecessary RPC calls. The frequency must then by synced manually by usingRFMixer.sync_static_source().
A Parametrizable is an entity that can be controlled by one or more continuous parameter(s)
- kernel_invariants = {'_amplitude_source', '_frequency_source', '_frequency_static_source', 'amplitude_control_port', 'blind_source', 'frequency_control_port', 'if_source', 'lo_source', 'sideband'}
- static_frequency: float = 0.0
- sync_static_source()[source]
Sync the frequency from the static frequency source.
This function is meant to be used with
blind_source=Truewhen using a non-realtime device as a static RF source at IF or LO. If the static source is a sinara device,blind_source=Falseis recommended.
- arb(duration, samples_amp=[], samples_freq=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=<function identity_float>, transform_freq=<function identity_float>, transform_phase=<function identity_float>)
Play Arbitrary Samples from a List
This method allows to set the output amplitude, frequency an phase according to the values specified in respective lists. The whole sequence is played in the specified duration. The pattern store in the sample list can also be repeated.
Tip
We supports a scheme to prepare the arb function before it is actually used. If that is needed, run this function with
prepapre_only = Truewhen the arb should be prepared and withrun_prepared = Truewhen the prepared arb should be played. In both calls the other parameters have to be passed.- Parameters:
samples_amp (
list[float]) -- List of amplitude samples. If this list is empty (default), the amplitude is not modified.samples_freq (
list[float]) -- List of frequency samples. If this list is empty (default), the frequency is not modified.samples_phase (
list[float]) -- List of phase samples. If this list is empty (default), the phase is not modified.duration (
float) -- The time in which the whole sequence of samples should be played back [s].repetitions (
int32) -- Number of times the sequence of all samples should be played. (default 1)prepare_only (
bool) -- Only write the sequence to RAM, don't play it.run_prepared (
bool) -- Play arb sequence previously prepared withprepare_only.transform_amp -- Function to transform amplitude samples, must take a single argument of type
floatand return a singlefloat.transform_freq -- Function to transform frequency samples (see
transform_amp).transform_phase -- Function to transform phase samples (see
transform_amp).
- get_amplitude()
- Return type:
float
- get_frequency()
- Return type:
float
- get_phase()
- Return type:
float
- ramp(duration, frequency_start=nan, frequency_end=nan, amplitude_start=nan, amplitude_end=nan, ramp_timestep=nan, ramp_steps=-1)
Ramp frequency and amplitude over a given duration. Parameters default to
-1ornanto indicate no change. If the start frequency/amplitude is set tonan, the ramp starts from the last frequency/amplitude which was set. This method advances the timeline by ´duration´- Parameters:
duration (
float) -- ramp duration [s]frequency_start (
float) -- initial frequency [Hz]frequency_end (
float) -- end frequency [Hz]amplitude_start (
float) -- initial amplitude [0..1]amplitude_end (
float) -- end amplitude [0..1]ramp_timesteps -- time between steps in the ramp [s]
ramp_steps (
int32) -- number of steps the whole ramp should have. This takes precedence over ramp_timestepsramp_timestep (float)
- set(frequency=nan, amplitude=nan, phase=0.0)
Set the frequency and amplitude of the DDS channel
Frequency/amplitude are set to the last known value if
float("nan")is passed (default).- Parameters:
frequency (
float) -- Frequency in Hz (nanto use previous value)amplitude (
float) -- Amplitude (nanto use previous value)phase (
float) -- Phase in rad (default 0.0)
- set_amplitude(amplitude)
- Parameters:
amplitude (float)
- set_frequency(frequency)
- Parameters:
frequency (float)
- set_parameter(value, channel=None)
- Parameters:
value (float)
channel (str)
- set_phase(phase)
- Parameters:
phase (float)