PartialMap

PartialMap is a function that applies a superoperator to a subsystem of an operator. Both the superoperator and the operator may be either full or sparse.

Syntax

 * PHIX = PartialMap(X,PHI)
 * PHIX = PartialMap(X,PHI,SYS)
 * PHIX = PartialMap(X,PHI,SYS,DIM)

Argument descriptions

 * X: A matrix.
 * PHI: A superoperator. Should be provided as either a Choi matrix, or as a cell with either 1 or 2 columns (see the tutorial page for more details about specifying superoperators within QETLAB).
 * SYS (optional, default 2): The subsystem that the superoperator will be applied to.
 * DIM (optional, default has X</tt> acting on two subsystems of equal dimension): A vector containing the dimensions of the (possibly more than 2) subsystems on which X</tt> acts.

A random example
The following code applies the completely depolarizing channel to the second subsystem of a random density matrix:

And the following code instead applies the same map to the first subsystem: