Skip to main content

How-to Guide

This guide is a collection of step-by-step instructions for tasks that are commonly (and in some cases not so commonly) encountered when using Covalent.

Note

Most of the how-to instructions below are Jupyter notebook files (formerly IPython files; they have an ipynb file extension). You can open a file and run the example on your local machine. To run an example:

  1. Install Jupyter.
  2. Install Covalent.
  3. Start the Covalent server.
  4. Download the IPython (.ipynb) file by selecting the "go to the source" button present next to the heading.
  5. Open the IPython (.ipynb) file in a Jupyter notebook.

The guide covers specific tasks at every phase of the workflow development process:

  1. Constructing workflows
  2. Executing workflows, including using and writing executors
  3. Querying Status and Collecting and Viewing Results

At the end are how-tos on miscellaneous topics including configuration.

Constructing Workflows

Constructing a Task (Electron)

Constructing a Workflow (Lattice)

Adding an Electron to a Lattice

Testing an Electron

Using an Iterable

Looping

Visualizing a Lattice

Adding Constraints to Tasks and Workflows

Waiting For Execution of Another Electron

Transferring Local Files During Workflows

Transferring Files To and From a Remote Host

Transferring Files To and From an S3 Bucket

Transferring Files To and From Azure Blob Storage

Transferring Files To and From Google Cloud Storage

Constructing a Lepton

Using C Code (Leptons)

Adding Pip Dependencies to an Electron

Adding Bash Dependencies to an Electron

Adding Callable Function Dependencies to an Electron

Constructing a Task from Bash Scripts

How to add a directory trigger to a lattice

How to add a time trigger to a lattice

How to define custom selectors for a Quantum Cluster

Executing a Workflow

Managing the Covalent Server

Running a Workflow (Lattice)

Re-executing a Workflow

Executing an Individual Electron

Executing a Lattice Multiple Times

Executing Multiple Lattices

Executing a Lattice as an Electron (Sublattice)

Choosing an Executor For a Task

Executing an Electron in a Conda Environment

Canceling a Running Workflow

Querying and Viewing

Querying the Status of a Lattice in a Notebook

Querying the Status of an Electron

Querying Lattice Execution Time

Querying Multiple Workflows (Lattices)

Getting Results of Previous Workflow Dispatches

Getting the Result of a Task (Electron)

Configuration

Customizing the Configuration