Skip to content

draw_graph: Allow external functions without definition to pass through without VisualizationError #2609

Description

@andrijapau

After #2559, we have a more informative error,

import pennylane as qml
from catalyst import *

null_dev = qml.device("null.qubit", wires=1)

@qjit
@qml.transforms.gridsynth(ppr_basis=True)
@qml.qnode(null_dev)
def circuit():
    qml.RZ(1,1)
    return qml.probs()

fig, ax = draw_graph(circuit)()
VisualizationError: Calls to functions without a definition are not yet compatible with 'draw_graph'. Found external function call to rs_decomposition_get_phase.

However, upon further discussion, these empty external functions shouldn't be the blockers for visualization of gridsynth pass. Instead, we should just skip visualizing empty functions and let the program continue.

sc-114575

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions