I would like to implement a function with variable numbers of arguments that generates
$\sigma_{j_1}\otimes\ldots \otimes\sigma_{j_L}$
where $\otimes$ is the Kronecker Product and $\sigma_j$ are the PauliMatrix[j]. I realize this function with
f[val__] := First@With[{lvar = Table[Symbol["j" <> ToString@k], {k,
Length@val}]}, (KroneckerProduct @@
PauliMatrix /@ lvar) /. {MapThread[#1 -> #2 &, {lvar, val}]}]
For instance for obtaining $\sigma_1\otimes\sigma_1\otimes \sigma_2$ I write
f[{1, 1, 2}]
It there a more easier way to do it?