ad9910 package

ad9910.ad9910_server module

Interface for talking to Arduino + AD9910 hardware.

The hardware and Arduino software are described here.

class ad9910.ad9910_server.AD9910Server(config_path='./config.json')

Bases: DeviceServer

Server for communicating with AD9910 + Arduino setup.

The current hardware setup uses an Arduino to program the AD9910 evaluation board over SPI. The AD9910 has a set of 8 single-frequency registers (called the “profiles”) that can be rapidly and phase-coherently switched via external digital inputs. Additionally, the Arduino can hold an array (length < 12) of values (called the “program”), which are advanced by an external trigger input to the Arduino. The program also allows for frequency sweeps, which are useful for performing adiabatic rapid passages (ARPs).

Currently, this server assumes this general architecture; however, it should be straightforward to add new hardware implementations (./devices) in the future.

force_trigger(self, c)

Issue trigger to device over serial (instead of external trigger)

Parameters:

c – LabRAD context

Returns:

inspect_echo(self, c)

For debugging purposes…

TODO: write me later!

Parameters:

c – LabRAD context

Returns:

The echoed string from the Arduino

Return type:

str

name = 'ad9910'
write_data(self, c, program_dump, profiles_dump)

Takes JSON-dumped program and profile strings and send them to the Arduino.

The “program” is a list of output settings that are programmed sequentially to the DDS (stepped through by the trigger input to the Arduino). Each program line can be a single tone::

line = {"mode": "single", "freq": 100, "ampl": 0, "phase": 0}

or a sweep::

line = {"mode": "sweep", "start": 10, "stop": 1, "dt": 10, "nsteps": 1000}

Frequencies are specified in MHz, amplitudes in dB relative to full scale, phases in degrees, and times in ms. The single tone setting above corresponds to a 100 MHz tone with full amplitude and no phase offset. The sweep above is a 10 ms long sweep from 10 MHz to 1 MHz composed of 1000 frequency steps.

Here is an example program list, similar to the one we use for doing the K state preparation::

program = [
    {"mode": "sweep", "start": 10.5, "stop": 7.5, "dt": 70, "nsteps": 10000},
    {"mode": "single", "freq": 80, "ampl": 0, "phase": 0},
    {"mode": "single", "freq": 0, "ampl": 0, "phase": 0},
]
program_dump = json.dumps(program)

The profiles are single tone settings that can be rapidly (and phase-coherently) switched using the P0, P1, and P2 digital inputs on the DDS. The index of the active profile is given by interpreting the list of bits [P2, P1, P0] as an unsigned int (so [P2, P1, P0] = [HIGH, LOW, LOW] is profile 4, [P2, P1, P0] = [LOW, HIGH, LOW] is profile 2, etc.).

Here is an example profiles list::

profiles = [
    # Profile 0 is reserved (used for executing the program list)
    {'profile': 0, 'freq': 0, 'ampl': 0, 'phase': 0},

    # Setup some pulse sequence at 120 MHz
    {'profile': 1, 'freq': 120, 'ampl': 0, 'phase': 0},
    {'profile': 3, 'freq': 120, 'ampl': 0, 'phase': -90},
    {'profile': 2, 'freq': 120, 'ampl': 0, 'phase': 45},
    {'profile': 6, 'freq': 120, 'ampl': 0, 'phase': 135},
    {'profile': 7, 'freq': 120, 'ampl': 0, 'phase': -180},

    # Setup another Ramsey sequence at 220 MHz
    {'profile': 5, 'freq': 220, 'ampl': -10, 'phase': 0},
    {'profile': 4, 'freq': 220, 'ampl': -10, 'phase': 45},
]
profiles_dump = json.dumps(profiles)

Technical note: our TTLs (which drive P0-P2) ring a bit, so changing multiple profile TTLs at the same time may result in an unreliable output. In the example above, the profiles are ordered in a Gray encoding, so they can be stepped through in the above order by changing only one of the profile TTLs in each step. It is fine to omit unused profiles.

This method accepts the json.dumps’ed lists since data must be serialized before transmitting over LabRAD.

Parameters:
  • c – LabRAD context

  • program_dump (str) – JSON-dumped list of program lines

  • profiles_dump (str) – JSON-dumped list of profiles

class ad9910.ad9910_server.Profile(data)

Bases: object

Class for validating the data for a single profile.

__init__(data)
class ad9910.ad9910_server.ProgramLine(data)

Bases: object

Class for validating the data for a line of the program.

__init__(data)