Visualizing a Lattice#

You can view the transport graph of a lattice in the Covalent GUI after you send the lattice to the Covalent dispatcher. Sometimes though you’ll want to view the lattice structure before you run it or before it’s even completed. The Covalent Lattice class contains a function that enables you to view a lattice at any time without dispatching it.


  1. Restart Covalent.

  2. Define a lattice.

import covalent as ct

def identity(x):
    return x

def square(x):
    return x * x

def workflow(a):
    val_1 = identity(x=a)
    return square(x=val_1)


To view a lattice at any stage:

  1. Run the Covalent lattice.draw() function.

  1. In the Covalent GUI, go to the Lattice Draw Preview page.

Lattice Graph

See Also#

Managing Covalent

Defining a Lattice

Adding Electrons to Lattices