Plotting mixed state on Bloch sphere

605 views
Skip to first unread message

machi...@gmail.com

unread,
Aug 7, 2013, 5:21:37 AM8/7/13
to qu...@googlegroups.com
Hi,

I'm trying to make a plot representing an (increasingly) mixed state on the Bloch sphere.
Both for the Bloch() and Bloch3d() class, I see some rescaling of the z-component of the vector, even though I only vary the y-component.

Here is an example:
z=0.75
y=0.911

vecs=[
[0,0*y,z],
[0,y*0.5,z],
[0,0.75*y,z]]
sphere = Bloch()
sphere.view=[90,0]
sphere.add_vectors(vecs)
sphere.show()

I also tried to input a few density matrices in the Bloch 3d class (using the add_states function) with constant z, decreasing x and got a similar result.
(see two pictures).

Any suggestions?

Best,

Machiel


example_bloch3d.png
example_Bloch.pdf

jrjoh...@gmail.com

unread,
Aug 7, 2013, 11:48:21 AM8/7/13
to qutip group
Hi Machiel

Thanks for your bug report. I agree that this seems strange, and it is probably a bug. I would guess that the following lines of code in the Bloch.plot_vectors


instead should read something like

   xs3d = self.vectors[k][1] * array([0, 1])
   ys3d = -self.vectors[k][0] * array([0, 1])
   zs3d = self.vectors[k][2] * array([0, 1])

Rob

Paul Nation

unread,
Aug 8, 2013, 12:25:26 AM8/8/13
to qu...@googlegroups.com
This is because the length of the vector is calculated using sqrt(x**2+y**2+z**2).  Therefore your vector length is changing.  For a given state vector, the components of the Bloch vector are x=Tr(rho*sigmax),y=Tr(rho*sigmay),…
Therefore the total vector length is calculated like above.  But perhaps for the input of vectors, we could change this?

---------------------------------------
Paul D. Nation
Assistant Professor
Korea University
Department of Physics
Anam-dong 5, Seongbuk-gu
Seoul 136-713, South Korea
Email: pna...@korea.ac.kr
Phone: +82-02-3290-3092
Web:   nqdl.korea.ac.kr
---------------------------------------

--
You received this message because you are subscribed to the Google Groups "qutip" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qutip+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Attachments:

Machiel Blok

unread,
Aug 29, 2013, 3:38:08 AM8/29/13
to qu...@googlegroups.com
Hi Robert,
Yes thanks, that fixed it
Reply all
Reply to author
Forward
0 new messages