Python 量子運算(四):北極與南極
2022/11/25
-----
Fig. 4.1. The North and South Poles.
-----
等號與全等有何不同
equiv
mapsto
-----
代碼 4.1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # Program 4.1:The North and South Poles import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams['text.usetex'] = True mpl.rcParams['text.latex.preamble'] = r'\usepackage{{amsmath}}' mpl.rcParams['font.size'] = 80 fig, ax = plt.subplots(figsize=(16, 16)) s1 = r'$\vert0\rangle\equiv\begin{bmatrix}1\\0\end{bmatrix}\mapsto(0,0,1)$' s2 = r'$\vert1\rangle\equiv\begin{bmatrix}0\\1\end{bmatrix}\mapsto(0,0,-1)$' ax.text(0.15, 0.65, s1) ax.text(0.15, 0.30, s2) ax.set_axis_off() # plt.savefig('/content/drive/My Drive/pqc/0004_001.png') plt.show() |
解說:
-----
References
Write a long string on multiple lines in Python | note.nkmk.me
https://note.nkmk.me/en/python-long-string/
-----
Python 量子運算(目錄)
https://mandhistory.blogspot.com/2022/01/quantum-computing.html
-----
沒有留言:
張貼留言
注意:只有此網誌的成員可以留言。