Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Getting Started

Roy Ready edited this page Aug 16, 2022 · 10 revisions

Links

ARTIQ introduction

Advanced Real-Time Infrastructure for Quantum physics (ARTIQ) is software that allows real-time communication with ARTIQ-compatible hardware (e.g., sinara hardware, check the Wiki pages within).

ARTIQ communicates with ethernet connections between the core device (Kasli). Kasil is described on the corresponding repository as "Kasli is low-cost FPGA carrier, capable of controlling at 12 Eurocard extension modules. It can act as either an ARTIQ central core device, or as a satellite connected to the master via DRTIO."

From Paweł Kulik's Master's thesis:

Distributed Real-Time Input/Output (DRTIO) Time and data transfer system that allows ARTIQ real-time I/O channels to be distributed among several satellite devices synchronized and controlled by a central core device.

ARTIQ can control multiple Kasli's at the same time via DRTIO. Kaslis are typically connected together using fibers. Each Kasli can connect to a number of devices (e.g., TTL in/out boards (BNC/SMA DIO), rf synthesizers (Urukul), etc.), and controls these devices.

An distinction of ARTIQ with some other control platform (e.g., pulser) is that you can write code to run in Kasli. This allows writing complex pulse sequences without worrying about using up the memory in the device, and allows pulse sequences to be changed in real time.

The ARTIQ documentation is likely the most helpful source (though not complete and may be slightly outdated). If you are working with a new system, the first step is to establish communication between the computer and the Kasli, and run some simple test programs (e.g., TTL outputs).

Writing experiments

To understand ARTIQ, start by reading the important chapters in the ARTIQ manual. For writing an experiment you should read through the following (sequential) sections of the ARTIQ beta manual:

When you write an experiment, you will also need to refer to

...a lot.

Computer setup and management

To understand how ARTIQ is setup on a computer read:

When managing ARTIQ on a computer Utilities is helpful.

Run ARTIQ control software

ARTIQ control relies on artiq_master. It handles communications with the hardware and scheduling experiments. It allows provides data saving and parameter storing capabilities but we don't use these capabilities. We use vault labrad server for data saving, and parameter_bank for storing parameters.

ARTIQ master setup

This section is only needed for computers that run experiments. We run artiq_master automatically when we run the artiq labrad server. If the artiq server is stopped, artiq_master is terminated too. The artiq server provides functions to control experiments and get/set DDS or TTL parameters.

Copy "artiq_config.py" from code/pydux/lib/config to code/config. The computer may have a repository storing experiment-specific control code (e.g., spock/bones). The repository should be cloned in the "code" folder if not already there. Experiment-specific applets and experiments should be placed in this repository (ARTIQ experiment repository). Change "artiq_master_command" in artiq_config.py to artiq_master -g -r __repository_path__ --experiment-subdir experiments\run. -g allows repository version control with ARTIQ experiments, i.e., only code that has been committed will be used when running an experiment. Git hooks can be used to automatically refresh the repository. --experiment-subdir sets the subdirectory in the repository that all experiments are saved in.

Create "experiment/tools" folder in the ARTIQ experiment repository. Add __init__.py in all new folders created. Create "initialize_sinara.py" and "pmt.py" in this folder. The two files should contain _InitializeSinara which inherits from jax.experiments.common.initialize_sinara.InitializeSinara, and _PMT which inherits from jax.experiments.common.pmt.PMT. Set "initialization_experiment" in artiq_config.py to ("experiments\\tools\\initialie_sinara.py", "_InitializeSinara"), and set "background_experiment" in artiq_config.py to ("experiments\\tools\\pmt.py", "_PMT"). The underscores hides the two experiment from the experiment scanner.

After running artiq server, the ARTIQ dashboard can be opened by running artiq_dashboard in a command line (we use our own dashboards). It connects to artiq_master and provides GUI to control ARTIQ. It can create and destroy GUIs based on PyQt5 on-demand in the dashboard while showing logs for all GUIs.

ARTIQ applets

GUI clients should be written as ARTIQ applets. Applets can be created dynamically in the dashboard, so they can be turned on only when needed, and they can turned off and on without restarting the dashboard. The log display in the dashboard provides a good way to debug those applets.

Use $python -m __applet_path__ in the applet window of the dashboard to run an applet. The __applet_path__ is the same as how you would import the module (e.g., $python -m jax.applets.dds).

See ARTIQ applets for more details about writing an applet.

ARTIQ experiment

ARTIQ experiments can be used to control both sinara hardware or any other hardware. See ARTIQ experiments for more details.