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

Inheritance diagram of atomiq.components.electronics.rfsource.RFMixer

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: RFSource

General 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 = -1 corresponds to difference (down-)conversion, sideband = +1 to sum (up-)conversion and higher sideband to harmonics of the IF.

The IF and LO ports are connected to RFSource components:

  • set_frequency() adjusts the frequency of the frequency_control_port input 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 (via RFSource.get_frequency()), i.e. the mixer always follows the frequency attribute of that component.

  • set_amplitude() is forwarded to the amplitude_control_port input.

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 port

  • lo_source (RFSource) -- RFSource component connected to the LO port

  • sideband (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 to False to avoid unnecessary RPC calls. The frequency must then by synced manually by using RFMixer.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=True when using a non-realtime device as a static RF source at IF or LO. If the static source is a sinara device, blind_source=False is 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 = True when the arb should be prepared and with run_prepared = True when 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 with prepare_only.

  • transform_amp -- Function to transform amplitude samples, must take a single argument of type float and return a single float.

  • 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 -1 or nan to indicate no change. If the start frequency/amplitude is set to nan, 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_timesteps

  • ramp_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 (nan to use previous value)

  • amplitude (float) -- Amplitude (nan to 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)