PauliChannel

PauliChannel is a function that generates the Choi matrix of a Pauli channel (either a random Pauli channel on a specified number of qubits, or a specific Pauli channel requested by the user). The output of this function is sparse.

Syntax

 * PHI = PauliChannel(P)

Argument descriptions

 * P: Either a positive integer, indicating that the user wants a randomly-generated P-qubit Pauli channel. Otherwise, P should be a probability vector of length $4^q$ for some integer $q \geq 1$, whose entries specify the weights of the Pauli operators in the channel's Kraus decomposition. More specifically, the weight of the $j$-th Pauli operator (in lexicographical order) in the Kraus operator representation of this channel will be $\sqrt{P(j)}$.

A random 1-qubit Pauli channel
The following code returns the Choi matrix a randomly-generated 1-qubit Pauli channel:

A specific Pauli channel
The following code generates a Pauli channel with Kraus operators $\left\{\tfrac{1}{\sqrt{15}}I,\tfrac{2}{\sqrt{15}}X,\tfrac{3}{\sqrt{15}}Y,\tfrac{4}{\sqrt{15}}Z\right\}$, where $I,X,Y,Z$ are the usual Pauli operators: