How to execute an individual electron#

In order to execute an individual electron, we can decorate it with both the electron and lattice decorator as shown below.

import covalent as ct

def product(x, y):
    return x * y


Ensure that Covalent services have been started properly before attempting to execute the lattice.

dispatch_id = ct.dispatch(product)(2, 3)

Executing the individual electron will return a dispatch id that can be used to query the subtask computation result.