atomiq.components.sinara.dac ============================ .. py:module:: atomiq.components.sinara.dac Classes ------- .. autoapisummary:: atomiq.components.sinara.dac.Zotino atomiq.components.sinara.dac.ZotinoChannel atomiq.components.sinara.dac.Fastino atomiq.components.sinara.dac.FastinoChannel Module Contents --------------- .. py:class:: Zotino(zotino_device, *args, max_parallel_arbs = 5, max_arb_samples = 128, **kwargs) Bases: :py:obj:`atomiq.components.electronics.voltagesource.DAC` This class represents the Sinara Zotino 32 Channel DAC. .. hint:: The Zotino provides the ``Zotino.parallel_arb`` context manager which allows to play arbitrary waveforms and ramps on multiple channels in parallel. Example code using this functionallity can be found :ref:`here ` :param zotino_device: The ARTIQ zotino device to use from the device db, e.g. `@zotino_0` :param max_parallel_arbs: Number of channels that can be ramped or played an arbitrary waveform on in parallel. Keep this as low as possible as higher numbers increase the prerun phase length. :param max_arb_samples: Number of samples a arbitrary waveform/ramp can maximally have. Keep this as low as possible as higher numbers increase the prerun phase length. .. py:attribute:: kernel_invariants .. py:attribute:: hold_arbs :value: False .. py:attribute:: _last_update .. py:attribute:: _last_dac_write .. py:attribute:: _presched_dac_counter :value: 0 .. py:attribute:: _zotino_device .. py:attribute:: parallel_arb .. py:attribute:: current_parallel_arb .. py:attribute:: update_i :value: 0 .. py:attribute:: update_times .. 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:: update() Applys the voltages in the DAC register to the outputs. .. hint:: If an update is already scheduled at the current time, this command does nothing. This allows for setting multiple DAC channels in a `parallel` statement without multiple slow updates. .. py:method:: write_dac(channel, voltage) Writes the voltage value `voltage` to the DAC channel `channel`. This method schedules the operation in the past and does not advance the time cursor. :param channel: Channel number :param voltage: Voltage in V .. hint:: This command uses a scheduler which takes care that no write operations occure at the same time to prevent undefined behavior which often do not result in a noticable error. .. py:class:: _SingleChannelArb(zotino_instance, max_samples) Represents an arbitrary voltage signal on a single Zotino channel. .. py:attribute:: active :value: False .. py:attribute:: channel :value: 0 .. py:attribute:: len :value: 0 .. py:attribute:: step_offset .. py:attribute:: i_step :value: 0 .. py:attribute:: zotino .. py:attribute:: values .. py:method:: activate(channel, step_offset, values) .. py:method:: step() .. py:class:: _ParallelArb(zotino_instance, max_parallel, max_samples) Represents a voltage arbitrary signal on multiple channels in parallel .. py:attribute:: zotino .. py:attribute:: arbs .. py:attribute:: start_mu .. py:attribute:: timestep_mu .. py:attribute:: n_arbs :value: 0 .. py:method:: start_record() Defines the starting point of the parallel arbitrary waveform at the current time cursor position and resets previously scheduled arbs .. py:method:: register_arb(channel, arb_values, timestep_mu, start_mu) Add a single channel arbitrary waveform to the parallel arb scheduler :param channel: Zotino channel :param arb_values: List of values which are played sequentially in machine units :param timestep_mu: Time between arb samples. Must be equal for all arbs which are scheduled in parallel :param start_mu: Time offset of the arb in reference to the point where `start_record` was called. Can be negative but must be a multiple of `timestep_mu`. .. py:method:: start() Start the playback of all arbitrary volage signals merged by the `register_arb` method .. py:class:: _ParallelArbsContext(zotino_instance) Context manager which makes all arbitrary waveforms defined within played in parallel. For an usage example, see :ref:`here `. .. py:attribute:: zotino .. py:method:: __enter__() .. py:method:: __exit__(exc_type, exc_value, exc_traceback) .. py:class:: ZotinoChannel(dac_device, channel, *args, **kwargs) Bases: :py:obj:`atomiq.components.electronics.voltagesource.DACChannel` Voltage Source This abstract class represents any device that can output a defined, controllable voltage. :param min_voltage: The minimum voltage the device can output [V] :param max_voltage: The maximum voltage the device can output [V] :param default_ramp_steps: The default number of steps that this device should use if the voltage is ramped. This value is only used if no `ramp_steps` are given in the :func:`ramp_voltage` method. .. py:method:: _set_voltage(voltage, update_dac = True) .. py:method:: _ramp_voltage(duration, voltage_start, voltage_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 VoltageSource .. py:class:: Fastino(fastino_device, parallel_event_delay = 1e-08, *args, **kwargs) Bases: :py:obj:`atomiq.components.electronics.voltagesource.DAC` The Sinara Fast ADC called Fastino :param fastino_device: The ARTIQ fastino device from the `device_db` :param parallel_event_delay: Time by which occuring parallel events in ramps are moved [s] (default: 10ns) .. py:attribute:: kernel_invariants .. py:attribute:: _fastino_device .. py:attribute:: event_slots .. py:attribute:: event_slots_max_idx :value: -1 .. py:attribute:: parallel_event_delay :value: 1e-08 .. 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:: update() .. py:method:: register_event(time) .. py:class:: FastinoChannel(dac_device, channel, *args, **kwargs) Bases: :py:obj:`atomiq.components.electronics.voltagesource.DACChannel` Voltage Source This abstract class represents any device that can output a defined, controllable voltage. :param min_voltage: The minimum voltage the device can output [V] :param max_voltage: The maximum voltage the device can output [V] :param default_ramp_steps: The default number of steps that this device should use if the voltage is ramped. This value is only used if no `ramp_steps` are given in the :func:`ramp_voltage` method. .. py:method:: _ramp_voltage(duration, voltage_start, voltage_end, ramp_timestep = 0.0002, relocate_parallel = True) 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 VoltageSource .. py:method:: _set_voltage(voltage, zero_time = False)