The Qunatum Depolarizing Channel is parametrized by a single real variable $\lambda, 0 \leq \lambda \leq 1$.
I have a system of $n$ qubits. I'd like to generate random errors from that channel. These would be strings of length $n$ with entries from $(0,1,2,3)$ with the right distribution. $(0,1,2,3)$ correspond to $(I,X,Z,Y)$ errors; $I$ error actually means no error applied to that qubit; the others mean $X,Z$ or $Y$ operators applied. For example $n=7$, error $e=(0,1,0,0,3,0,2)$ means $X$ is applied to qubit 2, $Y$ to qubit 5, $Z$ to qubit 7.
Does anyone know of a tried and tested method for doing that. Python or any other language (or even pseudo-code) are fine.