33 return {a_, 0, 0, d_};
43 return {(1.0 + v.z()) / 2.0, complex_t(v.x(), -v.y()) / 2.0, complex_t(v.x(), v.y()) / 2.0,
49 return {-
a, -
b, -
c, -
d};
54 return {
a + o.
a,
b + o.
b,
c + o.
c,
d + o.
d};
59 return {
a - o.
a,
b - o.
b,
c - o.
c,
d - o.
d};
74 return {
a * o.
a +
b * o.
c,
a * o.
b +
b * o.
d,
c * o.
a +
d * o.
c,
c * o.
b +
d * o.
d};
86 return {
a * s.
u +
b * s.
v,
c * s.
u +
d * s.
v};
91 return {
a * f,
b * f,
c * f,
d * f};
96 return {
a * f,
b * f,
c * f,
d * f};
101 return {
a / f,
b / f,
c / f,
d / f};
106 return {
a / f,
b / f,
c / f,
d / f};
172 return a *
d -
b *
c;
177 return isfinite(
a) && isfinite(
b) && isfinite(
c) && isfinite(
d);
182 return {conj(
a), conj(
c), conj(
b), conj(
d)};
SpinMatrix operator*(complex_t f, const SpinMatrix &m)
Defines class SpinMatrix.
SpinMatrix()
Contructs the null matrix.
SpinMatrix operator*(const SpinMatrix &) const
SpinMatrix operator/(complex_t) const
SpinMatrix adjoint() const
SpinMatrix operator*=(const SpinMatrix &)
SpinMatrix operator+=(const SpinMatrix &)
SpinMatrix operator+(const SpinMatrix &) const
static SpinMatrix FromBlochVector(const R3 &v)
Constructs matrix (I+v*s)/2, where s is the Pauli vector.
static SpinMatrix Diag(complex_t a_, complex_t d_)
complex_t determinant() const
SpinMatrix operator-() const
SpinMatrix operator/=(complex_t)