You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use the circuit drawer with qml.ControlledQubitUnitary raises the error TypeError: unsupported format string passed to numpy.ndarray.__format_
import pennylane as qml
from pennylane import numpy as np
dev = qml.device("default.qubit", wires=3)
U = np.array([[ 0.94877869, 0.31594146], [-0.31594146, 0.94877869]])
@qml.qnode(dev)
def circuit():
qml.ControlledQubitUnitary(U, control_wires=[0, 1], wires=2)
return qml.probs(range(3))
circuit()
circuit.draw()
Expected behavior: circuit.draw() returns a string representing the circuit
Actual behavior: circuit.draw() raises the error TypeError: unsupported format string passed to numpy.ndarray.__format_
Issue description
Trying to use the circuit drawer with
qml.ControlledQubitUnitary
raises the errorTypeError: unsupported format string passed to numpy.ndarray.__format_
Expected behavior:
circuit.draw()
returns a string representing the circuitActual behavior:
circuit.draw()
raises the errorTypeError: unsupported format string passed to numpy.ndarray.__format_
Reproduces how often:
Always
System information:
Tracebacks
The text was updated successfully, but these errors were encountered: