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