atomiq.components.sinara.mirny ============================== .. py:module:: atomiq.components.sinara.mirny .. autoapi-nested-parse:: Sinara 4456 Mirny (4-channel ADF5356 PLL). Classes ------- .. autoapisummary:: atomiq.components.sinara.mirny.Mirny atomiq.components.sinara.mirny.MirnyChannel Functions --------- .. autoapisummary:: atomiq.components.sinara.mirny._amplitude_to_att_db atomiq.components.sinara.mirny._att_db_to_amplitude Module Contents --------------- .. py:function:: _amplitude_to_att_db(amplitude) .. py:function:: _att_db_to_amplitude(att_db) .. py:class:: Mirny(cpld, *args, **kwargs) Bases: :py:obj:`atomiq.components.primitives.Component` Sinara Mirny 4 Channel PLL/VCO-based microwave frequency synthesizer :param cpld: ARTIQ :class:`artiq.coredevice.mirny.Mirny` instance from the device database (e.g. ``@mirny0_cpld``). .. py:attribute:: kernel_invariants .. py:attribute:: cpld .. py:attribute:: experiment .. py:attribute:: identifier .. py:attribute:: debug_output :value: False .. py:attribute:: core .. py:attribute:: _kernel_invariants .. py:attribute:: _prepare_done :value: False .. py:attribute:: _build_done :value: False .. py:attribute:: _hooks_done :value: [] .. py:attribute:: children :value: [] .. py:attribute:: __in_build :value: True .. py:class:: MirnyChannel(mirny, device, ttl=None, default_attenuation = 0.0, default_powerlevel = 3, freq_limit = (53125000.0, 4000000000.0), **kwargs) Bases: :py:obj:`atomiq.components.electronics.rfsource.RFSource`, :py:obj:`atomiq.components.primitives.Switchable` Single Mirny ADF5356 channel: PLL frequency, step attenuator, and RF switch. :param mirny: Parent :class:`Mirny` board the channels belongs to. :param device: ARTIQ :class:`artiq.coredevice.adf5356.ADF5356` channel device from the `device_db` (e.g. ``@mirny0_ch0``). :param ttl: The ARTIQ device from the `device_db` representing the Urukul fast RF switch, (e.g. ``@ttl_mirny0_sw0``). RF is switched on and off by disabling the PLL chip output (slow). :param default_amplitude: Default amplitude in interval [0,1] applied in ``prerun``. :param default_powerlevel: Default PLL chip power index applied in ``prerun``, this determines the maximum power. Defaults to 3 which is the maximum output power. See `the datasheet `_ for more info. :param freq_limit: Allowed output frequency range in Hz. :param blind: If ``True``, skip the usual :meth:`_prerun` reprogramming (see :class:`~atomiq.components.electronics.rfsource.RFSource`). .. note:: Call :meth:`init` once after power-on before experiments; it is not invoked automatically. .. warning:: The Mirny can not ramp frequencies continuously, between each step there will be a gap of ~1-2ms as the PLL needs to relock. .. py:attribute:: kernel_invariants .. py:attribute:: mirny .. py:attribute:: device .. py:attribute:: default_attenuation :value: 0.0 .. py:attribute:: default_powerlevel :value: 3 .. py:method:: init() Initialize CPLD (if needed) and PLL. Slow; run once after power-on. .. py:method:: _prerun() Specify here what should be done for this component before the run starts. In contrast to the _build() method, the _prerun() routine is executed on the core device before the actual experiment starts. .. py:method:: set_att(attenuation) Set hardware digital attenuation in dB (0–31.5 in 0.5 dB steps). Updates :attr:`attenuation` and keeps :attr:`amplitude` consistent with the mapping used by :meth:`set`. .. py:method:: _set_frequency(frequency) .. py:method:: _set_amplitude(amplitude) .. py:method:: _set_phase(phase) ADF5356 phase offset is not programmed by this Atomiq wrapper. .. py:method:: on() .. py:method:: off() .. py:method:: set_output_power_mu(n) Set PLL chip output power index (0–3); see ADF5356 datasheet. .. py:method:: output_power_mu() .. py:method:: _on_pll() .. py:method:: _off_pll() .. py:attribute:: _shape_changing_arguments :value: ('blind',) Names of the constructor arguments whose *value* (not only their type) changes the shape of the component, i.e. change the types and signatures of class members. The component factory gives objects of the same shape a shared class (and thus a shared compiler specialization). Arguments listed here are compared by value. Definitions along the inheritance hierarchy are merged. .. py:attribute:: amplitude :value: 0.0 .. py:attribute:: frequency :value: 100000000.0 .. py:attribute:: phase :value: 0.0 .. py:attribute:: default_ramp_steps :value: 30 .. py:attribute:: blind :value: False .. py:method:: _prerun_blind() .. py:method:: set_frequency(frequency) .. py:method:: _check_frequency(frequency) .. py:method:: get_frequency() .. py:method:: set_amplitude(amplitude) .. py:method:: _check_amplitude(amplitude) .. py:method:: get_amplitude() .. py:method:: set_phase(phase) .. py:method:: get_phase() .. py:method:: set(frequency = float('nan'), amplitude = float('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). :param frequency: Frequency in Hz (``nan`` to use previous value) :param amplitude: Amplitude (``nan`` to use previous value) :param phase: Phase in rad (default 0.0) .. py:method:: _ramp(duration, frequency_start, frequency_end, amplitude_start, amplitude_end, ramp_timestep = 0.0002) This method implements a stupid ramp on an abstract level. This will most likely work but be slow. If your hardware has native support for ramping, please override this function when you inherit from RFSource .. py:method:: ramp(duration, frequency_start = float('nan'), frequency_end = float('nan'), amplitude_start = float('nan'), amplitude_end = float('nan'), ramp_timestep = float('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´ :param duration: ramp duration [s] :param frequency_start: initial frequency [Hz] :param frequency_end: end frequency [Hz] :param amplitude_start: initial amplitude [0..1] :param amplitude_end: end amplitude [0..1] :param ramp_timesteps: time between steps in the ramp [s] :param ramp_steps: number of steps the whole ramp should have. This takes precedence over `ramp_timesteps` .. py:method:: _arb(duration, samples_amp, samples_freq, samples_phase, repetitions = 1, prepare_only = False, run_prepared = False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=identity_float) .. py:method:: arb(duration, samples_amp = [], samples_freq = [], samples_phase = [], repetitions = 1, prepare_only = False, run_prepared = False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=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 :code:`prepapre_only = True` when the arb should be prepared and with :code:`run_prepared = True` when the prepared arb should be played. In both calls the other parameters have to be passed. :param samples_amp: List of amplitude samples. If this list is empty (default), the amplitude is not modified. :param samples_freq: List of frequency samples. If this list is empty (default), the frequency is not modified. :param samples_phase: List of phase samples. If this list is empty (default), the phase is not modified. :param duration: The time in which the whole sequence of samples should be played back [s]. :param repetitions: Number of times the sequence of all samples should be played. (default 1) :param prepare_only: Only write the sequence to RAM, don't play it. :param run_prepared: Play arb sequence previously prepared with :code:`prepare_only`. :param transform_amp: Function to transform amplitude samples, must take a single argument of type :type:`float` and return a single :type:`float`. :param transform_freq: Function to transform frequency samples (see :code:`transform_amp`). :param transform_phase: Function to transform phase samples (see :code:`transform_amp`). .. py:attribute:: experiment .. py:attribute:: identifier .. py:attribute:: debug_output :value: False .. py:attribute:: core .. py:attribute:: _kernel_invariants .. py:attribute:: _prepare_done :value: False .. py:attribute:: _build_done :value: False .. py:attribute:: _hooks_done :value: [] .. py:attribute:: children :value: [] .. py:attribute:: __in_build :value: True .. py:method:: set_parameter(value, channel = None) .. py:attribute:: channels :type: list[str] .. py:method:: is_on(channel = None) :abstractmethod: .. py:method:: toggle(channel = None) .. py:method:: pulse(pulsetime, channel = '')