DephasingChannel
From QETLAB
DephasingChannel | |
Produces a dephasing channel | |
Other toolboxes required | none |
---|---|
Related functions | DepolarizingChannel |
Function category | Superoperators |
DephasingChannel is a function that returns the Choi matrix of the partially dephasing channel, which acts as follows:
\[\Delta(X) := (1-p)\mathrm{diag}(X) + pX,\]
where $\mathrm{diag}$ is the map that erases everything off the diagonal of its input, and $0 \leq p \leq 1$ is a given parameter ($p = 0$ by default).
Contents
Syntax
- DELTA = DephasingChannel(DIM)
- DELTA = DephasingChannel(DIM,P)
Argument descriptions
- DIM: The dimension of the channel. That is, the channel will act on DIM-by-DIM matrices.
- P (optional, default 0): A parameter (from 0 to 1, inclusive) that specifies which partially dephasing channel to produce. P = 0 gives the completely dephasing channel, and P = 1 gives the identity channel.
Examples
The completely dephasing channel
The completely dephasing channel maps every density matrix to its diagonal:
>> rho = RandomDensityMatrix(3) rho = 0.2575 -0.1464 + 0.0460i 0.0869 - 0.1260i -0.1464 - 0.0460i 0.5016 -0.0074 + 0.1864i 0.0869 + 0.1260i -0.0074 - 0.1864i 0.2409 >> ApplyMap(rho,DephasingChannel(3)) ans = 0.2575 0 0 0 0.5016 0 0 0 0.2409
Source code
Click on "expand" to the right to view the MATLAB source code for this function.
%% DEPHASINGCHANNEL Produces a dephasing channel
% This function has one required argument:
% DIM: the dimensionality on which the channel acts
%
% DELTA = DephasingChannel(DIM) is the Choi matrix of the completely
% dephasing channel that acts on DIM-by-DIM matrices.
%
% This function has one optional argument:
% P (default 0)
%
% DELTA = DephasingChannel(DIM,P) produces the partially dephasing
% channel (1-P)*D + P*ID, where D is the completely dephasing channel
% and ID is the identity channel.
%
% URL: http://www.qetlab.com/DephasingChannel
% requires: iden.m, MaxEntangled.m, opt_args.m
% author: Nathaniel Johnston (nathaniel@njohnston.ca)
% last updated: January 22, 2015
function delta = DephasingChannel(dim,varargin)
% set optional argument defaults: p=0
[p] = opt_args({ 0 },varargin{:});
% compute the Choi matrix of the depolarizing channel
psi = MaxEntangled(dim,1,0); % gives a sparse non-normalized state
delta = (1-p)*diag(diag(psi*psi')) + p*(psi*psi');