extract_ops_from_tk#
- discopy.quantum.pennylane.extract_ops_from_tk(tk_circ)[source]#
Extract the operations, and corresponding parameters and wires, from a pytket Circuit. Return these as lists to use in constructing PennyLane circuit.
- Parameters:
tk_circ (
discopy.quantum.tk.Circuit
) – The pytket circuit to extract the operations from.- Returns:
list of
qml.operation.Operation
– The PennyLane operations extracted from the pytket circuit.list of list of (
torch.FloatTensor
or –sympy.core.symbol.Symbol
) The corresponding parameters of the operations.list of list of int – The corresponding wires of the operations.
set of
sympy.core.symbol.Symbol
– The free symbols in the parameters of the tket circuit.