discopy.quantum.pennylane#
Interface with PennyLane.
Summary#
Implement a pennylane circuit with post-selection. |
Functions
Extract the operation, parameters and wires from a pytket |
|
Extract the operations, and corresponding parameters and wires, from a pytket Circuit. |
|
Return post-selections based on qubit indices. |
|
Return a PennyLaneCircuit equivalent to the input DisCoPy circuit. |
Notes
If probabilities is set to False, the output states of the PennyLane circuit will be exactly equivalent to those of the DisCoPy circuit (for the same parameters).
If probabilities is set to True, the output states of the PennyLane
circuit will be the probabilities of the output states, equivalent
to appending discopy.quantum.circuit.Measure
to all the
open wires in the DisCoPy circuit.
Once a PennyLaneCircuit
has been constructed, it
can be evaluated with eval()
. If the circuit contains only
concrete parameters (i.e. no symbolic parameters), no arguments
should be passed to eval(). If the circuit contains symbolic
parameters, a list of the symbolic parameters and a list of their
associated weights should be passed to eval() as symbols= and
weights=.