tk_op_to_pennylane

tk_op_to_pennylane#

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

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

Parameters:

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

Returns:

  • 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 sympy.core.symbol.Symbol – The free symbols in the parameters of the operation.

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