cirq.protocols.ApplyMixtureArgs

Arguments for performing a mixture of unitaries.

The receiving object is expected to mutate target_tensor so that it contains the state (state vector or density matrix) after applying the mixture 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 potentially right) multiplied and summed, representing the effect of the mixture. The tensor will have the shape (2, 2, 2, ..., 2). It can correspond to a state vector or a 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 mixture upon.
right_axes Which axes to multiply the right action of the mixture upon. If provided we will assume target_tensor is a density matrix, otherwise it will be assumed target_tensor is a state vector.

target_tensor The input tensor that needs to be left (and potentially right) multiplied and summed, representing the effect of the mixture. The tensor will have the shape (2, 2, 2, ..., 2). It can correspond to a state vector or a 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 mixture upon.
right_axes Which axes to multiply the right action of the mixture upon. If provided we will assume target_tensor is a density matrix, otherwise it will be assumed target_tensor is a state vector.