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
Another issue is in the right hand side panel, there is a figure
I think the green and purple initial states (the $|x_0\rangle$ and the $|x_1\rangle$) should also be swapped in the figure. To make the circuit work in this figure, one can test the code by adding additional line
bits= [int(x) forxinnp.binary_repr(basis_id, width=num_wires)]
# add this line to make initial state swappedbits=bits[::-1]
qml.BasisStatePreparation(bits, wires=[0, 1])
Actual behavior
The error pops up when using dev.num_wires
Error: 'DefaultQubit' object has no attribute 'num_wires'
Additional information
No response
Source code
No response
Tracebacks
No response
Check other issues
I have searched existing GitHub issues to make sure the issue does not already exist.
The text was updated successfully, but these errors were encountered:
Hello @maplexgitx0302
Thank you so much for reporting this. Strange that this passed the automatic tests 🤔!
This happens because in the newer versions of PennyLane, default.qubit changes the number of wires dynamically according to the paired circuit. It makes sense that it no longer has the num_wires attribute.
Node number
Codercise F.2.1, Codercise F.2.3
Expected behavior
The code in F.2.1 and F.2.3
seems not work. This can be simply fixed by
Another issue is in the right hand side panel, there is a figure
I think the green and purple initial states (the$|x_0\rangle$ and the $|x_1\rangle$ ) should also be swapped in the figure. To make the circuit work in this figure, one can test the code by adding additional line
Actual behavior
The error pops up when using
dev.num_wires
Additional information
No response
Source code
No response
Tracebacks
No response
Check other issues
The text was updated successfully, but these errors were encountered: