test2
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| test2 [August 24, 2026 at 15:05] – Ivan Janevski | test2 [August 24, 2026 at 15:14] (current) – Ivan Janevski | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| \usepackage{blochsphere} | \usepackage{blochsphere} | ||
| - | \usetikzlibrary{angles, | ||
| \begin{document} | \begin{document} | ||
| - | \def\thetaAngle{50} | + | \def\thetaAngle{90} |
| - | \def\phiAngle{40} | + | \def\phiAngle{0} |
| - | \begin{blochsphere}[radius=3cm, | + | \begin{blochsphere}[radius=2cm, |
| \drawBallGrid[style={opacity=0.15}]{30}{30} | \drawBallGrid[style={opacity=0.15}]{30}{30} | ||
| - | \labelLatLon{ket0}{90}{0} | + | \drawStatePolar[axisarrow=true, |
| - | \labelLatLon{ket1}{-90}{0} | + | \drawStatePolar[axisarrow=true, |
| - | \labelLatLon{xaxis}{0}{0} | + | \drawStatePolar[axisarrow=true, |
| - | \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) |
| + | | ||
| - | \draw[->] (0,0) -- (xaxis) node[right] {$x$}; | + | \drawStatePolar[statecolor=red,statewidth=0.7]{state}{\thetaAngle}{90-\phiAngle} |
| - | | + | \node[below right] at (state) {$|+\rangle$}; |
| - | \draw[->] (0,0) -- (ket0) node[above] | + | |
| - | \draw[red, | + | \labelLatLon{north}{90}{0} |
| - | \node[right] at (state) | + | \labelLatLon{south}{-90}{0} |
| - | \node[below] at (ket1) {$|1\rangle$}; | + | \node[above] at (north) {$|0\rangle$}; |
| - | + | \node[below] at (south) {$|1\rangle$}; | |
| - | \coordinate (origin) at (0,0); | + | |
| - | + | ||
| - | % phi: equatorial plane | + | |
| - | { | + | |
| - | \setDrawingPlane{0}{0} | + | |
| - | + | ||
| - | \draw[current plane, | + | |
| - | | + | |
| - | (-90+\phiAngle: | + | |
| - | 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 | + | |
| - | { | + | |
| - | \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
