One-shot entanglement distillation beyond LOCC

Code accompanying the paper arXiv:1906.01648.

Download Matlab files:

The computation of the maximal achievable fidelity of distillation as well as the one-shot $\varepsilon$-error distillable entanglement under several classes of operations can be cast as semidefinite programs. These include $PPT_+$-preserving operations, Rains-preserving operations, and PPT operations; for pure states, the characterisaton includes even LOCC and one-way LOCC (see the manuscript for more details).

The implementation below requires CVX and QETLAB. The code takes a simplified approach when it encounters a pure state (either provided as a density matrix or state vector), and employs analytical (for the fidelity) or second-order conic programming (for the distillable entanglement) methods. For general states, it evaluates a semidefinite program. The notation is consistent with the paper where relevant.

Tested on Matlab R2018b with CVX 2.1 and QETLAB 0.9.


Fidelity of distillation

[fid, W] = dist_fid(rho, m, op, dim)
Computes the fidelity of entanglement distillation under a given class of operations

Required arguments:

Optional arguments:

Output:

function [fid, W] = dist_fid(rho, m, op, dim)

dimrho = size(rho);
drho = max(dimrho);

if nargin < 4 % assume dimensions of subsystems are equal
    dim = [sqrt(drho),sqrt(drho)];
    d = sqrt(drho);
else
    d = min(dim);
end
frho = full(rho);

if rank(frho) == 1 % pure state case
    
    % obtain Schmidt decomposition
    
    if min(dimrho) ~= 1
        [~,~,v] = svd(frho);
        rho = v(:,1);
    end
    
    [xi,U,V] = SchmidtDecomposition(rho, dim, -1);
    
    % compute m-distillation norm of Schmidt vector
    
    xi = sort(xi,'descend');
    k = 1;
    minsum = sum(xi(m:d).^2);

    for j=2:m
        jsum = sum(xi(m-j+1:d).^2)/j;
        if jsum < minsum
            minsum = jsum;
            k = j;
        end
    end
    
    fid = sum(xi(1:m-k))+k*sqrt(minsum);
    fid = fid^2/m;
    
    if nargout > 1
        
        % construct optimal witness

        wxi = xi./sqrt(minsum);
        [~,wp] = maxk(xi,m-k);
        wxi(wp) = 1;
        W = zeros(drho,1);

        for j=1:d
           W = W + wxi(j) * kron(U(:,j), V(:,j));
        end
        W = W/sqrt(m);

        if min(dimrho) ~= 1
            W = W*W';
        end
        
    end
        
else % mixed state case

    I = eye(drho);
    rho = (rho+rho')/2; % avoids numerical problems

    cvx_begin sdp quiet

        variable W(drho,drho) hermitian semidefinite

        W <= I

        if nargin<3 || lower(op)=="ppt" || op==""
            -I/m <= PartialTranspose(W,2,dim) <= I/m
        elseif lower(op)=="pptp"
            variable X(drho,drho) hermitian semidefinite
            W <= X
            PartialTranspose(X,2,dim) <= I/m
        elseif lower(op)=="rains"
            variable X(drho,drho) hermitian semidefinite
            W <= X
            -I/m <= PartialTranspose(X,2,dim) <= I/m
        else
            error('Unsupported type of operations. Allowed choices: ppt, pptp, rains.');
        end

        maximize trace(rho*W)

    cvx_end

    fid = cvx_optval;

end

One-shot distillable entanglement

[ent, ent0, W] = dist_ent (rho, tol, op, dim)
Computes the one-shot distillable entanglement under a given class of operations.

Required arguments:

Optional arguments:

Output:

function [ent, ent0, W] = dist_ent(rho, tol, op, dim)

dimrho = size(rho);
drho = max(dimrho);

if nargin < 4 % assume dimensions of subsystems are equal
    dim = [sqrt(drho),sqrt(drho)];
    d = sqrt(drho);
else
    d = min(dim);
end
frho = full(rho);

if rank(frho) == 1 % pure state case
     
    if min(dimrho) ~= 1
        [~,~,v] = svd(frho);
        rho = v(:,1);
    end
    
    [xi,U,V] = SchmidtDecomposition(rho, dim, -1);
    
    cvx_begin quiet

        variable x(d) nonnegative
        
        norm(x) <= 1
        x'*xi >= sqrt(1-tol);
        
        minimize max(x) 

    cvx_end
    
    if nargout > 2
        
        % construct optimal witness
        W = zeros(drho,1);

        for j=1:d
           W = W + x(j) * kron(U(:,j), V(:,j));
        end

        if min(dimrho) ~= 1
            W = W*W';
        end  
    end
    
    ent0 = cvx_optval^2;
        
else % mixed state case

    I = eye(drho);
    rho = (rho+rho')/2; % avoids numerical problems

    cvx_begin sdp quiet

        variable W(drho,drho) hermitian semidefinite

        W <= I

        if nargin<3 || lower(op)=="ppt" || op==""
            t = norm(PartialTranspose(W,2,dim));
        elseif lower(op)=="pptp"
            variable X(drho,drho) hermitian semidefinite
            W <= X
            t = lambda_max(PartialTranspose(X,2,dim));
        elseif lower(op)=="rains"
            variable X(drho,drho) hermitian semidefinite
            W <= X
            t = norm(PartialTranspose(X,2,dim));
        else
            error('Unsupported type of operations. Allowed choices: ppt, pptp, rains.');
        end
        
        trace(rho*W) >= 1-tol;
        
        minimize t

    cvx_end

    ent0 = cvx_optval;

end

ent = floor(1/ent0);
prec = cvx_precision;
if abs(ent0 - 1/(ent+1)) <= prec(1) % to account for CVX precision
    ent = ent+1;
end

end