pennylane#
Implements a conversion from quantum DisCoPy circuits to PennyLane circuits.
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=.