Closed XxWirusonxX closed 3 years ago
@XxWirusonxX Is this PR ready for review?
@Theo-Reignier I have a few more to test, more on the problem with measures.
Hey Chon,
I tried to test the block sphere node but a new error message was raised (see below).
In the meantime, I have committed some minor changes such as the node's appearance and formatting.
Hey Chon,
I tried to test the block sphere node but a new error message was raised (see below).
In the meantime, I have committed some minor changes such as the node's appearance and formatting.
Thanks for testing it out @Theo-Reignier :), this error caused by using Official Qiskit
, Yes !! Official Qiskit
is still using a deprecated function from Mathplotlib
therefore, it will pop up such error! Please have a look at the New Requirements from this PR and see if you still want to modify the bloch.py
from Official Qiskit
, or if theres any possible way to get around this problem, feel free to make changes :D
@XxWirusonxX I am not sure I fully understand the issue.
Using x_s, y_s, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M)
would solve the problem ?
@XxWirusonxX I am not sure I fully understand the issue. Using
x_s, y_s, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M)
would solve the problem ?
Yes it will fix the problem.
@XxWirusonxX I am not sure I fully understand the issue. Using
x_s, y_s, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M)
would solve the problem ?Yes it will fix the problem.
In that case we should implement it before merging the PR, can you take care of this @XxWirusonxX ?
@XxWirusonxX I am not sure I fully understand the issue. Using
x_s, y_s, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M)
would solve the problem ?Yes it will fix the problem.
In that case we should implement it before merging the PR, can you take care of this @XxWirusonxX ?
The problem is, Qiskit will not be there until we run the “npm run setup”
Problem solved by using Matplotlib version 3.3.4
I pushed a commit f4c1e2c8e161d6b7c239fce3911abb2e62f7f6a5 to specify in the virtual environment setup script which version of matplotlib
should be used.
@XxWirusonxX Are all the bugs dealt with and is this ready to be merged?
@XxWirusonxX Are all the bugs dealt with and is this ready to be merged?
I believed the bloch sphere diagram node is fine, except the Error code occur whenever the measure node exist in the flow, it is good to go. As Theo mentioned before, its better to keep the Error code in so that people knows that measurements should not be part in the bloch sphere diagram.
Overall, the way to make the BSD Node without problem is abit different from other output diagram.
@XxWirusonxX Are all the bugs dealt with and is this ready to be merged?
I believed the bloch sphere diagram node is fine, except the Error code occur whenever the measure node exist in the flow, it is good to go. As Theo mentioned before, its better to keep the Error code in so that people knows that measurements should not be part in the bloch sphere diagram.
Overall, the way to make the BSD Node without problem is abit different from other output diagram.
Well, even though it is not very useful, you can also use the 'simulator' node and 'IBM-quantum-system' nodes without 'measurement' nodes.
Therefore, I believe it is not that much different, we'll just have to insist on the fact that no 'measurement' nodes should be used with the 'bloch sphere' node.
Ideally, we could handle the error ourselves and display a more user-friendly error message.
For example, the BSD node could search the python shell script
for qc.m(
. If the codes finds qc.m(
then the node throws an error
I am approving because it looks good to me.
However, since I have a recent matplotlib
version on my python shell, I still receive the same error.
I would appreciate if one of you guys with the correct matplotlib
version could test it !
Purpose
Added in Bloch Sphere Diagram Node to the Project. Currently Trying to fix the problem where when the Quantum Circuit included
Measures
, it pops out error. [maybe duplicate the qc intoqc for measures
andqc for diagrams
?]Changes
Added Bloch Sphere to the
Quantum Folder
.New Requirements
Due to the Problem mention here, In order to get Bloch Sphere Diagram Node works, you are require to change the
bloch.py
invenv/lib/python3.9/site-packages/qiskit/visualization/bloch.py
atline 68
from:x_s, y_s, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, renderer.M)
into
x_s, y_s, _ = proj3d.proj_transform(xs3d, ys3d, zs3d, self.axes.M)
or use the following version of Matplotlib: Matplotlib = 3.3.4
else the Bloch Sphere Diagram will not work.