Constructing a Workflow (Lattice)#
Lattices are workflows comprised of a sequence of tasks. In your Python code, a lattice is a function with the
To construct a lattice, do the following.
Construct one or more electrons with which to compose the lattice:
import covalent as ct @ct.electron def quadrature(x, y): return sqrt(x**2 + y**2)
Write a function that uses one or more electrons to process the data.
@ct.lattice def quad_workflow(x, y): return quadrature(x, y)