Saving a graph as an image
by: Kevin Broløs
(Feyn version 3.0 or newer)
Feyn models are represented as graphs in SVG and they can be saved to disk using the savefig
function on the Model
.
Example
import feyn
ql = feyn.QLattice()
models = ql.sample_models(['Hello'], 'World')
model = models[0]
model.savefig('model.svg')