# cirq.qis.superoperator_to_choi

Returns the Choi matrix of a quantum channel specified via the superoperator matrix.

Quantum channel E: L(H1) -> L(H2) may be specified by its Choi matrix J(E) defined as

$$J(E) = (E \otimes I)(|\phi\rangle\langle\phi|)$$


where $$|\phi\rangle = \sum_i|i\rangle|i\rangle$$ is the unnormalized maximally entangled state and I: L(H1) -> L(H1) is the identity map. Choi matrix is unique for a given channel. Alternatively, E may be specified by its superoperator matrix K(E) defined so that

$$K(E) vec(\rho) = vec(E(\rho))$$


where the vectorization map $$vec$$ rearranges d-by-d matrices into d**2-dimensional vectors. Superoperator matrix is unique for a given channel. It is also called the natural representation of a quantum channel.

A quantum channel can be viewed as a tensor with four indices. Different ways of grouping the indices into two pairs yield different matrix representations of the channel, including the superoperator and Choi representations. Hence, the conversion between the superoperator and Choi matrices is a permutation of matrix elements effected by reshaping the array and swapping its axes. Therefore, its cost is O(d**4) where d is the dimension of the input and output Hilbert space.

superoperator Superoperator matrix specifying a quantum channel.

Choi matrix of the channel specified by superoperator.

ValueError If superoperator has invalid shape.

[{ "type": "thumb-down", "id": "missingTheInformationINeed", "label":"Missing the information I need" },{ "type": "thumb-down", "id": "tooComplicatedTooManySteps", "label":"Too complicated / too many steps" },{ "type": "thumb-down", "id": "outOfDate", "label":"Out of date" },{ "type": "thumb-down", "id": "samplesCodeIssue", "label":"Samples / code issue" },{ "type": "thumb-down", "id": "otherDown", "label":"Other" }]
[{ "type": "thumb-up", "id": "easyToUnderstand", "label":"Easy to understand" },{ "type": "thumb-up", "id": "solvedMyProblem", "label":"Solved my problem" },{ "type": "thumb-up", "id": "otherUp", "label":"Other" }]