-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathGenRobustnesskCoherence.m
More file actions
30 lines (26 loc) · 935 Bytes
/
GenRobustnesskCoherence.m
File metadata and controls
30 lines (26 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
%% GENROBUSTNESSKCOHERENCE Computes the generalized robustness of k-coherence of a mixed quantum state
% This function has two required arguments:
% RHO: a mixed quantum state
% K: a positive integer
%
% [ROBK,SIG] = GenRobustnesskCoherence(RHO,K) produces the generalized
% robustness of k-coherence (ROBK) and the closest state (SIG) to a mixed
% state RHO. This computation is implemented via semidefinite
% programming.
% requires: CVX (http://cvxr.com/cvx/), IskCoherent.m
% package: QETLAB
% author: Nathaniel Johnston (nathaniel@njohnston.ca)
% last updated: May 14, 2018
function [robk,sig] = GenRobustnesskCoherence(rho,k)
d = size(rho,1);
cvx_begin sdp quiet
cvx_precision best;
variable sig(d,d) hermitian;
minimize trace(sig)
subject to
IskCoherent(rho + sig,k) == 1;
sig >= 0;
cvx_end
robk = real(cvx_optval);
sig = sig/robk;
end