Walsh

The Walsh matrix of order \(k\) is a \(2^k \times 2^k\) matrix, where

\[\begin{split}W_1 = \left(\begin{array}{cc} 1 & 1 \\ 1 & -1 \end{array}\right),\end{split}\]

and

\[\begin{split}W_k = \left(\begin{array}{cc} W_{k-1} & W_{k-1} \\ W_{k-1} & -W_{k-1} \end{array}\right).\end{split}\]

A binary Walsh matrix changes the bottom-right entry of \(W_1\) from \(-1\) to \(0\).

C++ API

void Walsh(Matrix<T> &W, Int k, bool binary = false)
void Walsh(AbstractDistMatrix<T> &W, Int k, bool binary = false)

C API

ElError ElWalsh_i(ElMatrix_i W, ElInt k, bool binary)
ElError ElWalsh_s(ElMatrix_s W, ElInt k, bool binary)
ElError ElWalsh_d(ElMatrix_d W, ElInt k, bool binary)
ElError ElWalsh_c(ElMatrix_c W, ElInt k, bool binary)
ElError ElWalsh_z(ElMatrix_z W, ElInt k, bool binary)
ElError ElWalshDist_i(ElDistMatrix_i W, ElInt k, bool binary)
ElError ElWalshDist_s(ElDistMatrix_s W, ElInt k, bool binary)
ElError ElWalshDist_d(ElDistMatrix_d W, ElInt k, bool binary)
ElError ElWalshDist_c(ElDistMatrix_c W, ElInt k, bool binary)
ElError ElWalshDist_z(ElDistMatrix_z W, ElInt k, bool binary)

Python API

Walsh(W, k, binary=False)