discopy.quantum.pennylane.tk_op_to_pennylane(tk_op, str_map)[source]#

Extract the operation, parameters and wires from a pytket Op, and return the corresponding PennyLane operation.

  • tk_op (pytket.circuit.Op) – The pytket Op to convert.

  • str_map (dict[str, sympy.core.symbol.Symbol]) – A mapping from strings to SymPy symbols (necessary as circ.to_tk() does not copy symbol references).


  • qml.operation.Operation – The PennyLane operation equivalent to the input pytket Op.

  • list of (torch.FloatTensor or sympy.core.symbol.Symbol) – The parameters of the operation.

  • list of int – The wires/qubits to apply the operation to.