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.

[1]:
import covalent as ct

@ct.lattice
@ct.electron
def product(x, y):
    return x * y

Note

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

[2]:
dispatch_id = ct.dispatch(product)(2, 3)
print(dispatch_id)
caf6cafb-2c6c-4e87-a1c8-087636644d29

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