Negativity
Negativity | |
Computes the negativity of a bipartite density matrix | |
Other toolboxes required | none |
---|---|
Related functions | PartialTranspose TraceNorm |
Function category | Entanglement measures |
Negativity is a function that computes the negativity of a bipartite density matrix, which is defined as follows: \[\mathcal{N}(\rho) := \frac{1}{2}\big( \|\rho^\Gamma\|_1 - 1 \big),\] where $\rho^\Gamma$ is the partial transpose of $\rho$ and $\|\cdot\|_1$ is the trace norm. Equivalently, the negativity of $\rho$ is the absolute value of the sum of the negative eigenvalues of $\rho^\Gamma$.
Contents
Syntax
- NEG = Negativity(RHO)
- NEG = Negativity(RHO,DIM)
Argument descriptions
- RHO: A bipartite density matrix.
- DIM (optional, by default has both subsystems of equal dimension): A specification of the dimensions of the subsystems that RHO acts on. DIM can be provided in one of two ways:
- If DIM is a scalar, it is assumed that the first subsystem has dimension DIM and the second subsystem has dimension length(RHO)/DIM.
- If $X \in M_{n_1} \otimes M_{n_2}$ then DIM should be a row vector containing the dimensions (i.e., DIM = [n_1, n_2]).
Examples
PPT states have zero negativity
States with positive partial transpose have zero negativity. The following code verifies this fact for one particular Chessboard state:
>> rho = ChessboardState(1,2,3,4,5,6); >> Negativity(rho) ans = 1.1102e-16
Can be used with CVX
This function is convex and can be used in the objective function or constraints of a CVX optimization problem. For example, the following code finds the maximum overlap of a density matrix $\rho$ with the maximally-entangled pure state, subject to the constraint that its negativity is no larger than 1/2:
>> d = 3; >> phi = MaxEntangled(d); >> phi = phi*phi'; % the maximally-entangled pure state, represented as a rank-1 density matrix >> cvx_begin sdp quiet variable rho(d^2,d^2) hermitian; maximize trace(phi*rho); subject to trace(rho) == 1; rho >= 0; Negativity(rho) <= 1/2; cvx_end cvx_optval cvx_optval = 0.6667
Source code
Click on "expand" to the right to view the MATLAB source code for this function.
%% NEGATIVITY Computes the negativity of a bipartite quantum state
% This function has one required argument:
% RHO: a density matrix or a pure state vector
%
% NEG = Negativity(RHO) is the negativity of the quantum state RHO,
% assuming that the two subsystems on which RHO acts are of equal
% dimension (if the local dimensions are unequal, specify them in the
% optional DIM argument). The negativity of RHO is the sum of the
% absolute value of the negative eigenvalues of the partial transpose of
% RHO.
%
% This function has one optional argument:
% DIM (default has both subsystems of equal dimension)
%
% NEG = Negativity(RHO,DIM) is the same as above, where RHO acts on local
% systems of dimension specified by the 1-by-2 vector DIM.
%
% URL: http://www.qetlab.com/Negativity
% requires: kpNorm.m, opt_args.m, PartialTranspose.m, PermuteSystems.m,
% pure_to_mixed.m, TraceNorm.m
% author: Nathaniel Johnston (nathaniel@njohnston.ca)
% package: QETLAB
% last updated: February 19, 2016
function neg = Negativity(rho,varargin)
rho = pure_to_mixed(rho); % Let the user input either a pure state vector or a density matrix.
dX = size(rho);
round_dim = round(sqrt(dX));
% set optional argument defaults: dim = sqrt(length(dim))
[dim] = opt_args({ round_dim' },varargin{:});
% allow the user to enter a single number for dim
if(length(dim) == 1)
dim = [dim,dX(1)/dim];
if abs(dim(2) - round(dim(2))) >= 2*dX(1)*eps
error('Negativity:InvalidDim','If DIM is a scalar, RHO must be square and DIM must evenly divide length(RHO); please provide the DIM array containing the dimensions of the subsystems.');
end
dim(2) = round(dim(2));
end
if(prod(dim) ~= dX(1))
error('Negativity:InvalidDim','Please provide local dimensions in the argument DIM that match the size of RHO.');
end
% Compute the negativity.
neg = (TraceNorm(PartialTranspose(rho,2,dim)) - 1)/2;