Devlog #6 :)
So Hey People, I am feeling Immensely satisfied that Q Sphere feature is Mostly done.
Also the GateWiki part is also done that tells You about Gate you Clicked on Gates Tray, again to tell you can drag gates into Circuit to build and Tap to know about it. May be I also link blogs on that Later.
Now about Q Sphere Part
Okay , Now let me share about Making of Q Sphere Part, So earlier I was not able to visualize it, but somehow I got to Know about Spherical Coordinates which is dependent on:
- theta: angle of Line from Z Axis
- phi: angle of Line from x Axis
But clicked finally after frustration of not understanding it earlier. Then I gone to Google searching to see 3d visuals and AI to understand how we calculate those angles: So -
-
Based on hamming weights (Means how many 1s in that State, Suppose in
|01>has 1 1s and011have 2 1s ) and total qubits which help us find theta and divide sphere into sort of rings for similar nodes/lines of same hamming weights in same ring. -
Then we find how we calculate phi based on total active states in each ring and slicing ring into same proportion.
I don’t know why but that was a finally a kick for me :)
Finally since you will plot lines and nodes on spherical surface you have to convert theta and phi to coordinates [x, y, z] which you do using polar coordinates. Then after plotting them, a major part of Q sphere is made. now as you can see on 2nd screenshot left side the Sphere shows nodes for respective State. more chances of being 0 is on upper half and more 1 chance on bottom half.
Structured the folders
Also I worked on code Structure to keep all algos separated:
- To parse
stateVectors - Parse the frontend data to
json circuit instructions - Making all q sphere data from stateVectors
- parsing Code to export in Qiskit.
- more such functions too..
So yeah that was work I did, little more things is needed to build, after that project is done. Adding some multi qubit gates is next important thing now.
I would be pushing on Github this Version and Vercel too now. Go check it out.
Namaste!!!
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.