# How to Draw a Bloch Sphere?

Is there any good way of drawing a bloch sphere as shown below? In particular, I am looking for a transparent sphere.

I am aware there is a blochsphere package but it is opaque.

## 3 Answers

You mentioned the blochsphere package in you question, why not simply use it? The opacity can simply be adjusted to your needs.

The following example is modified from http://mirrors.ctan.org/graphics/pgf/contrib/blochsphere/example.tex

\documentclass{standalone}

\usepackage{blochsphere}

\begin{document}

\begin{blochsphere}[radius=1.5 cm,tilt=15,rotation=-20,opacity=0]
\drawBallGrid[style={opacity=0.1}]{30}{30}

\drawGreatCircle[style={dashed}]{-60}{0}{0}
\drawGreatCircle[style={dashed}]{60}{0}{0}

\drawRotationLeft[scale=1.3,style={red}]{-60}{0}{0}{15}
\drawRotationRight[scale=1.3,style={red}]{60}{0}{0}{15}

\node at (-0.8,1.9) {\textcolor{red}{\tiny $J_{12}(t)$}};
\node at (1.1,1.8) {\textcolor{red}{\tiny $J_{23}(t)$}};

\labelLatLon{up}{90}{0};
\labelLatLon{down}{-90}{90};
\node[above] at (up) {{\tiny $\left|1\right>$ }};
\node[below] at (down) {{\tiny $\left|0\right>$}};

\labelLatLon[labelmark=false]{d}{15}{90};
\node at (d) {\color{gray}\fontsize{0.15cm}{1em}\selectfont $60^\circ$};

\labelLatLon[labelmark=false]{d2}{5}{78};
\node at (d2) {\color{gray}\fontsize{0.15cm}{1em}\selectfont $60^\circ$};
\end{blochsphere}
\end{document}


I post my answer. I hope this is helpful for you. Unfortunately I did not put the opacity. I'm sorry.

\documentclass{article}
\usepackage{tikz}
\usepackage{mathtools}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[line cap=round, line join=round, >=Triangle]
\clip(-2.19,-2.49) rectangle (2.66,2.58);
\draw [shift={(0,0)}, lightgray, fill, fill opacity=0.1] (0,0) -- (56.7:0.4) arc (56.7:90.:0.4) -- cycle;
\draw [shift={(0,0)}, lightgray, fill, fill opacity=0.1] (0,0) -- (-135.7:0.4) arc (-135.7:-33.2:0.4) -- cycle;
\draw(0,0) circle (2cm);
\draw [rotate around={0.:(0.,0.)},dash pattern=on 3pt off 3pt] (0,0) ellipse (2cm and 0.9cm);
\draw (0,0)-- (0.70,1.07);
\draw [->] (0,0) -- (0,2);
\draw [->] (0,0) -- (-0.81,-0.79);
\draw [->] (0,0) -- (2,0);
\draw [dotted] (0.7,1)-- (0.7,-0.46);
\draw [dotted] (0,0)-- (0.7,-0.46);
\draw (-0.08,-0.3) node[anchor=north west] {$\varphi$};
\draw (0.01,0.9) node[anchor=north west] {$\theta$};
\draw (-1.01,-0.72) node[anchor=north west] {$\mathbf {\hat{x}}$};
\draw (2.07,0.3) node[anchor=north west] {$\mathbf {\hat{y}}$};
\draw (-0.5,2.6) node[anchor=north west] {$\mathbf {\hat{z}=|0\rangle}$};
\draw (-0.4,-2) node[anchor=north west] {$-\mathbf {\hat{z}=|1\rangle}$};
\draw (0.4,1.65) node[anchor=north west] {$|\psi\rangle$};
\scriptsize
\draw [fill] (0,0) circle (1.5pt);
\draw [fill] (0.7,1.1) circle (0.5pt);
\end{tikzpicture}
\end{document}

• Please do not use font switches such as \bf in LaTeX. They are 20+ years obsolete and not part of the NFSS introduced with LaTeX 2e. They ought not now be used in LaTeX documents at all. And why the $$ to end and immediately begin maths mode? – cfr Dec 24 '16 at 4:14 • The OP didn't want opacity, by the way, so I think a transparent sphere is what s/he desires ;). – cfr Dec 24 '16 at 4:25 • Thank you so much of the changes that you made, make them well. On PCs where I write I have no editor, nor the MikTeX installed. Use Papeeria and Paint for the picture on OS7. You are completely right. Use LaTeX for almost 15 years, and some old habits have remained. If the editor I had used written \ [... \] instead of $$ ... $$. I did not understand the part "And why the$$ to end and immediately begin maths mode?" – Sebastiano Dec 24 '16 at 11:56
• With almost sincerity also use the translator to undestand your message in chat. Although I did not understand English well I make my best wishes for a Merry Christmas even though for me this is a different Christmas from all earlier for family reasons. – Sebastiano Dec 24 '16 at 11:56
• You had e.g. $...$$... so the $$ wasn't for display maths but just ending and then starting maths mode. Nadolig Llawen / Merry Christmas! I hope it is not too sad a holiday for you. – cfr Dec 24 '16 at 13:19 Here is a slightly stripped down and more adaptable version using only TikZ and its angles library. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{angles,quotes} \begin{document} \begin{tikzpicture} % Define radius \def\r{3} % Bloch vector \draw (0,0) node[circle,fill,inner sep=1] (orig) {} -- (\r/3,\r/2) node[circle,fill,inner sep=0.7,label=above:$\vec{a}$] (a) {}; \draw[dashed] (orig) -- (\r/3,-\r/5) node (phi) {} -- (a); % Sphere \draw (orig) circle (\r); \draw[dashed] (orig) ellipse (\r{} and \r/3); % Axes \draw[->] (orig) -- ++(-\r/5,-\r/3) node[below] (x1) {$x_1$}; \draw[->] (orig) -- ++(\r,0) node[right] (x2) {$x_2$}; \draw[->] (orig) -- ++(0,\r) node[above] (x3) {$x_3$}; %Angles \pic [draw=gray,text=gray,->,"$\phi$"] {angle = x1--orig--phi}; \pic [draw=gray,text=gray,<-,"$\theta\$"] {angle = a--orig--x3};

\end{tikzpicture}
\end{document}