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
Describe the bug
A clear and concise description of what the bug is.
Cuurently circ = Circuit().unitary(matrix=np.array([[0, 1],[1, 0]]), targets=0) is compile-time error on dev variant based on branch in
...
-> 3621 if 2 ** len(targets) != matrix.shape[0]:
3622 raise ValueError("Dimensions of the supplied unitary are incompatible with the targets")
3624 return Instruction(Unitary(matrix, display_name), target=targets)
TypeError: object of type 'int' has no len()
While surprising, this is not unexpected. The docstring of Circuit.unitary says
...
Args:
targets (QubitSet): Target qubits.
...
In alignment with this, the following code work without error:
Describe the bug
A clear and concise description of what the bug is.
Cuurently
circ = Circuit().unitary(matrix=np.array([[0, 1],[1, 0]]), targets=0)
is compile-time error on dev variant based on branch in#993
To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.
System information
A description of your system. Please provide:
Additional context
Add any other context about the problem here.
See #993 (comment)
The text was updated successfully, but these errors were encountered: