25 Jan
2024
25 Jan
'24
3:46 a.m.
FWIW, +1 for matvec & vecmat to complement matmat (erm, matmul). Having a binop where one argument is a matrix and the other is a stack/batch of vectors is indeed awkward otherwise, and a dedicated function to clearly distinguish "two matrices" from "a matrix and a batch of vectors" sounds great from a user perspective.
As to vecmat doing hermitian conjugation of the vector argument --- I'd be in favor (because <\psi | \hat H | \psi>) but this is a weak preference.
Indeed, what wikipedia calls the "physics convention" [1] of both the vector dot product <x,y> = x† y and vector matrix product x† A († = transpose-conjugate). -- Marten [1] https://en.wikipedia.org/wiki/Sesquilinear_form