Site Tools


test2

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
test2 [August 24, 2026 at 15:05] Ivan Janevskitest2 [August 24, 2026 at 15:14] (current) Ivan Janevski
Line 2: Line 2:
  
 \usepackage{blochsphere} \usepackage{blochsphere}
-\usetikzlibrary{angles,quotes} 
  
 \begin{document} \begin{document}
  
-\def\thetaAngle{50+\def\thetaAngle{90
-\def\phiAngle{40}+\def\phiAngle{0}
  
-\begin{blochsphere}[radius=3cm,tilt=15,rotation=-20,ball=circle]+\begin{blochsphere}[radius=2cm,tilt=15,rotation=-20,ball=circle]
  
     \drawBallGrid[style={opacity=0.15}]{30}{30}     \drawBallGrid[style={opacity=0.15}]{30}{30}
  
-    \labelLatLon{ket0}{90}{0+    \drawStatePolar[axisarrow=true,statewidth=0.3]{xaxis}{90}{90
-    \labelLatLon{ket1}{-90}{0} +    \drawStatePolar[axisarrow=true,statewidth=0.3]{yaxis}{90}{0} 
-    \labelLatLon{xaxis}{0}{0+    \drawStatePolar[axisarrow=true,statewidth=0.3]{zaxis}{0}{0}
-    \labelLatLon{yaxis}{0}{-90}+
  
-    % blochsphere uses latitude here, hence 90-theta +    %\node[left] at (xaxis) {$x$}; 
-    \labelLatLon{state}{90-\thetaAngle}{-\phiAngle}+    \node[right] at (yaxis) {$y$}
 +    \node[above] at (zaxis) {$z$};
  
-    \draw[->] (0,0) -- (xaxis) node[right] {$x$}+    \drawStatePolar[statecolor=red,statewidth=0.7]{state}{\thetaAngle}{90-\phiAngle
-    \draw[->] (0,0) -- (yaxis) node[right] {$y$}; +    \node[below rightat (state) {$|+\rangle$};
-    \draw[->] (0,0-- (ket0) node[above] {$|0\rangle$};+
  
-    \draw[red,very thick,->] (0,0) -- (state); +    \labelLatLon{north}{90}{0} 
-    \node[right] at (state) {$|\psi\rangle$};+    \labelLatLon{south}{-90}{0}
  
-    \node[below] at (ket1) {$|1\rangle$}; +    \node[above] at (north) {$|0\rangle$}; 
- +    \node[belowat (south) {$|1\rangle$};
-    \coordinate (origin) at (0,0); +
- +
-    % phi: equatorial plane +
-    { +
-        \setDrawingPlane{0}{0} +
- +
-        \draw[current plane,dashed] +
-            (0,0-- +
-            (-90+\phiAngle:{cos(\thetaAngle)*3cm}) +
-            coordinate (projection); +
- +
-        \pic[ +
-            current plane, +
-            draw, +
-            fill=gray, +
-            fill opacity=0.15, +
-            text opacity=1, +
-            "$\phi$", +
-            angle radius=0.7cm, +
-            angle eccentricity=1.35 +
-        ] {angle=xaxis--origin--projection}; +
-    } +
- +
-    % theta: longitudinal plane through |psi> +
-    { +
-        \setLongitudinalDrawingPlane{\phiAngle} +
- +
-        \pic[ +
-            current plane, +
-            draw, +
-            fill=gray, +
-            fill opacity=0.15, +
-            text opacity=1+
-            "$\theta$", +
-            angle radius=0.8cm, +
-            angle eccentricity=1.35 +
-        ] {angle=state--origin--ket0}; +
-    }+
  
 \end{blochsphere} \end{blochsphere}
  
 \end{document} \end{document}
test2.1787583921.md.gz · Last modified: by Ivan Janevski