qnode_to_meta

qnode_to_meta(qnode, *, arg_shapes=None, precision=8)[source]

Convert a QNode directly to a MetaCircuit.

Traces the QNode into a symbolic QuantumScript (trainable arguments seeded with sympy symbols) and applies qscript_to_meta(). The arg_shapes mapping declares per-argument shapes for multi-argument and structured-shape circuits whose shapes can’t be inferred automatically.

Return type:

MetaCircuit