Difference between revisions of "L1NormCoherence"
(Fixed category) |
m (→Can be used within CVX: typo) |
||
Line 55: | Line 55: | ||
===Can be used within CVX=== | ===Can be used within CVX=== | ||
− | The ℓ<sub>1</sub>-norm of coherence is a convex function and can be used in the same way as any other convex function within CVX. Thus you can minimize the ℓ<sub>1</sub>-norm of coherence or use the ℓ<sub>1</sub>-norm of coherence in constraints of CVX optimization problems. For example, the following code minimizes the ℓ<sub>1</sub>-norm of coherence over all density matrices that are within a trace distance of $1/2$ from the maximally coherent state $|v\rangle = (1,1,1,1,1)/sqrt{5}$: | + | The ℓ<sub>1</sub>-norm of coherence is a convex function and can be used in the same way as any other convex function within CVX. Thus you can minimize the ℓ<sub>1</sub>-norm of coherence or use the ℓ<sub>1</sub>-norm of coherence in constraints of CVX optimization problems. For example, the following code minimizes the ℓ<sub>1</sub>-norm of coherence over all density matrices that are within a trace distance of $1/2$ from the maximally coherent state $|v\rangle = (1,1,1,1,1)/\sqrt{5}$: |
<syntaxhighlight> | <syntaxhighlight> | ||
>> d = 5; | >> d = 5; |
Latest revision as of 14:11, 15 February 2016
L1NormCoherence | |
Computes the ℓ_{1}-norm of coherence of a quantum state | |
Other toolboxes required | none |
---|---|
Related functions | RelEntCoherence RobustnessCoherence TraceDistanceCoherence |
Function category | Coherence and incoherence |
Usable within CVX? | yes (convex) |
L1NormCoherence is a function that computes the ℓ_{1}-norm of coherence of a quantum state $\rho$, defined as follows:
\[C_{\ell_1}(\rho) := \sum_{i \neq j} |\rho_{ij}|,\]
where $\rho_{ij}$ is the $(i,j)$-entry of $\rho$ in the standard basis.
Contents
Syntax
- L1C = L1NormCoherence(RHO)
Argument descriptions
- RHO: A state (either pure or mixed) to have its ℓ_{1}-norm of coherence computed.
Examples
Pure states or mixed states
If $|v\rangle$ is a pure state then its ℓ_{1}-norm of coherence is computed from the density matrix $|v\rangle\langle v|$:
>> v = RandomStateVector(3) v = 0.6233 + 0.1633i -0.3038 - 0.0142i 0.6830 + 0.1609i >> L1NormCoherence(v) ans = 1.7229 >> L1NormCoherence(v*v') ans = 1.7229
Maximally coherent states
The largest possible value of the ℓ_{1}-norm of coherence on $d$-dimensional states is $d-1$, and is attained exactly by the "maximally coherent states": pure states whose entries all have the same absolute value.
>> v = ones(3,1)/sqrt(3); % this is a maximally coherent state >> L1NormCoherence(v) ans = 2.0000
Can be used within CVX
The ℓ_{1}-norm of coherence is a convex function and can be used in the same way as any other convex function within CVX. Thus you can minimize the ℓ_{1}-norm of coherence or use the ℓ_{1}-norm of coherence in constraints of CVX optimization problems. For example, the following code minimizes the ℓ_{1}-norm of coherence over all density matrices that are within a trace distance of $1/2$ from the maximally coherent state $|v\rangle = (1,1,1,1,1)/\sqrt{5}$:
>> d = 5; >> v = ones(d,1)/sqrt(d); % this is a maximally coherent state >> cvx_begin sdp quiet variable rho(5,5) hermitian; minimize L1NormCoherence(rho) subject to TraceNorm(rho - v*v') <= 0.5; % the next two constraints force rho to be a density matrix rho >= 0; trace(rho) == 1; cvx_end cvx_optval cvx_optval = 2.7500 >> rho rho = 0.2000 0.1375 0.1375 0.1375 0.1375 0.1375 0.2000 0.1375 0.1375 0.1375 0.1375 0.1375 0.2000 0.1375 0.1375 0.1375 0.1375 0.1375 0.2000 0.1375 0.1375 0.1375 0.1375 0.1375 0.2000
Source code
Click on "expand" to the right to view the MATLAB source code for this function.
%% L1NormCoherence Computes the l1-norm of coherence of a quantum state
% This function has one required argument:
% RHO: a density matrix or pure state vector
%
% L1C = L1NormCoherence(RHO) is the l1-norm of coherence, which is the
% sum of the absolute values of the off-diagonal entries of the density
% matrix RHO (in the standard basis).
%
% URL: http://www.qetlab.com/L1NormCoherence
% requires: pure_to_mixed.m
% author: Nathaniel Johnston (nathaniel@njohnston.ca)
% package: QETLAB
% last updated: January 12, 2016
function L1C = L1NormCoherence(rho)
rho = pure_to_mixed(rho); % Let the user specify rho as either a density matrix or a pure state vector
L1C = sum(sum(abs(rho))) - trace(rho);