# MaximumOutputFidelity

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 Other toolboxes required MaximumOutputFidelity Computes the maximum output fidelity of two quantum channels none DiamondNormFidelity Norms and distance measures

MaximumOutputFidelity is a function that computes the maximum output fidelity between two quantum channels $\Phi$ and $\Psi$, defined as follows: $F_{max}(\Phi,\Psi) := \max_{\rho,\sigma}\big\{F(\Phi(\rho),\Psi(\sigma)) : \rho,\sigma \text{ are density matrices}\big\},$ where $F(\cdot,\cdot)$ is the usual fidelity between quantum states.

## Syntax

• MOF = MaximumOutputFidelity(PHI,PSI)
• MOF = MaximumOutputFidelity(PHI,PSI,DIM_PHI)
• MOF = MaximumOutputFidelity(PHI,PSI,DIM_PHI,DIM_PSI)

## Argument descriptions

• PHI,PSI: Quantum channels, represented as either Choi matrices or cells of Kraus operators.
• DIM_PHI,DIM_PSI (optional): 1-by-2 vectors containing the input and output dimensions of PHI and PSI, respectively. These arguments must be provided if and only if PHI and PSI are provided as Choi matrices and they have unequal input and output dimensions.

## Examples

The following code computes the minimum output fidelity of a random qutrit channel $\Psi$ with the identity channel:

>> d = 3;
>> Phi = {eye(d)};
>> Psi = RandomSuperoperator(d);
>> MaximumOutputFidelity(Phi,Psi)

ans =

0.7638

## Source code

Click on "expand" to the right to view the MATLAB source code for this function.

1. %%  MAXIMUMOUTPUTFIDELITY    Computes the maximum output fidelity of two quantum channels
2. %   This function has two required input arguments:
3. %     PHI,PHI: quantum channels, represented as either Choi matrices or
4. %              cells of Kraus operators
5. %
6. %   MOF = MaximumOutputFidelity(PHI,PSI) is the maximum output fidelity
7. %   between the two quantum channels PHI and PSI. That is, it is the
8. %   maximum fidelity between states of the form PHI(RHO) and PSI(SIGMA),
9. %   where RHO and SIGMA are density matrices.
10. %
11. %   This function has two optional input arguments:
12. %     DIM_PHI,DIM_PSI: 1-by-2 vectors containing the input and output
13. %                      dimensions of PHI and PSI, respectively
14. %
15. %   MOF = MaximumOutputFidelity(PHI,PSI,DIM_PHI,DIM_PSI) is as above, where
16. %   the input and output dimensions of PHI and PSI are specified in the
17. %   1-by-2 vectors DIM_PHI and DIM_PSI. DIM_PHI and DIM_PSI should be
18. %   provided if and only if PHI and PSI are have unequal input and output
19. %   dimensions and are provided as Choi matrices.
20. %
21. %   URL: http://www.qetlab.com/MaximumOutputFidelity
22. 
23. %   requires: ComplementaryMap.m, CVX (http://cvxr.com/cvx/),
24. %             DiamondNorm.m, KrausOperators.m, superoperator_dims.m
25. %
26. %   authors: Nathaniel Johnston (nathaniel@njohnston.ca)
27. %   package: QETLAB
28. %   last updated: November 24, 2014
29. 
30. function mof = MaximumOutputFidelity(Phi,Psi,varargin)
31. 
32. % Compute the dimensions of PHI and PSI.
33. [da_phi,db_phi,de_phi] = superoperator_dims(Phi,0,varargin{1:min(end,1)});
34. [da_psi,db_psi,de_psi] = superoperator_dims(Psi,0,varargin{2:end});
35. 
36. if(da_phi ~= da_psi || db_phi ~= db_psi)
37.     error('MaximumOutputFidelity:InvalidDims','PHI and PSI must have the same input and output dimensions as each other.');
38. end
39. min_de = min(de_phi,de_psi);
40. 
41. % Now construct a new map that we will compute the diamond norm of (this
42. % diamond norm will be the maximum output fidelity that we seek).
43. Phi = KrausOperators(Phi,[da_phi,db_phi]);
44. Psi = KrausOperators(Psi,[da_psi,db_psi]);
45. new_map = ComplementaryMap([Phi(1:min_de),Psi(1:min_de)]);
46. 
47. % Use the fact that the maximum output fidelity is complementary to the
48. % diamond norm in a natural way.
49. mof = DiamondNorm(new_map,[da_phi,de_phi]);