adding arcs and line segment in Bloch sphere #1682
gaurav-iiser
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Yes it does seem like a good idea, by adding the points in cartesian it should map appropriately. I can make a Pull Request if you'd like? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
So, I was writing a paper and wanted an image with a particular octant of the Bloch sphere highlighted. This octant was to be divided it into three subsets using three arcs [which is say, drawing an arc connecting the point ((1/sqrt(3), 1/sqrt(3), 1/sqrt(3)) with (0,0,1),(0,1,0),(1,0,0) ]. Besides, I also wanted to connect a state from each subset. So, in order to do this, I cloned the repository and modified bloch.py, and produced the desired image for my paper (figure attached)
I then thought it will be useful as a feature for other users who might want to draw an arc on the Bloch sphere or join two points on the Bloch sphere using a line segment. Therefore, I have modified the bloch.py such that it can now draw an arc between any two points on the Bloch sphere by just specifying the cartesian coordinates of the two points, and similarly, a line segment can be drawn. The arc is red and the line segment is a black dashed line.
Before opening a PR, I just wanted to discuss whether it seems like a good idea? I am sure someone will find drawing an arc or drawing a line segment in the visualization of the Bloch sphere useful, just like I did.
(I am just trying to follow the contribution guidelines as I have no experience in contributing to a library whatsoever).
I would really appreciate your responses.
Code-wise: We can simply use
add_line([x,y,z],[a,b,c])
to draw a line segment, orb.add_arc([x,y,z],[a,b,c])
to draw an arc between two points`
Beta Was this translation helpful? Give feedback.
All reactions