epraya.Pauli#
- Pauli(s)#
Defines the Pauli matrices for the spin s.
- Parameters:
s (float) – Spin operator value of the system.
- Returns:
sx (np.array) – Pauli matrix of the spin x component.
sy (np.array) – Pauli matrix of the spin y component.
sz (np.array) – Pauli matrix of the spin z component.
Example
——-
>>> import epraya as epr
>>> s = 1
>>> sx, sy, sz = epr.Pauli(s)
>>> print(sx, sy, sz)
[[0. +0.j 0.70710678+0.j 0. +0.j] – [0.70710678+0.j 0. +0.j 0.70710678+0.j] [0. +0.j 0.70710678+0.j 0. +0.j]]
[[ 0.+0.j -0.-0.70710678j 0.+0.j ] – [ 0.+0.70710678j 0.+0.j -0.-0.70710678j] [ 0.+0.j 0.+0.70710678j 0.+0.j ]]
[[ 1. 0. 0.] – [ 0. 0. 0.] [ 0. 0. -1.]]