# cirq.ApplyChannelArgs

Arguments for efficiently performing a channel.

A channel performs the mapping

$$X \rightarrow \sum_i A_i X A_i^\dagger$$


for operators $$A_i$$ that satisfy the normalization condition

$$\sum_i A_i^\dagger A_i = I.$$


The receiving object is expected to mutate target_tensor so that it contains the density matrix after multiplication, and then return target_tensor. Alternatively, if workspace is required, the receiving object can overwrite out_buffer with the results and return out_buffer. Or, if the receiving object is attempting to be simple instead of fast, it can create an entirely new array and return that.

target_tensor The input tensor that needs to be left and right multiplied and summed representing the effect of the channel. The tensor will have the shape (2, 2, 2, ..., 2). It usually corresponds to a multi-qubit density matrix, with the first n indices corresponding to the rows of the density matrix and the last n indices corresponding to the columns of the density matrix.
out_buffer Pre-allocated workspace with the same shape and dtype as the target tensor. If buffers are used, the result should end up in this buffer. It is the responsibility of calling code to notice if the result is this buffer.
auxiliary_buffer0 Pre-allocated workspace with the same shape and dtype as the target tensor.
auxiliary_buffer1 Pre-allocated workspace with the same shape and dtype as the target tensor.
left_axes Which axes to multiply the left action of the channel upon.
right_axes Which axes to multiply the right action of the channel upon.

target_tensor The input tensor that needs to be left and right multiplied and summed, representing the effect of the channel. The tensor will have the shape (2, 2, 2, ..., 2). It usually corresponds to a multi-qubit density matrix, with the first n indices corresponding to the rows of the density matrix and the last n indices corresponding to the columns of the density matrix.
out_buffer Pre-allocated workspace with the same shape and dtype as the target tensor. If buffers are used, the result should end up in this buffer. It is the responsibility of calling code to notice if the result is this buffer.
auxiliary_buffer0 Pre-allocated workspace with the same shape and dtype as the target tensor.
auxiliary_buffer1 Pre-allocated workspace with the same shape and dtype as the target tensor.
left_axes Which axes to multiply the left action of the channel upon.
right_axes Which axes to multiply the right action of the channel upon.

[{ "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" }]