diff --git a/AbsPPTConstraints.m b/AbsPPTConstraints.m index 21595d4..0fc96b6 100644 --- a/AbsPPTConstraints.m +++ b/AbsPPTConstraints.m @@ -32,7 +32,6 @@ % requires: IsPSD.m, opt_args.m, perm_inv.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 14, 2014 function L = AbsPPTConstraints(lam,dim,varargin) diff --git a/AntisymmetricProjection.m b/AntisymmetricProjection.m index 921a36d..2030598 100644 --- a/AntisymmetricProjection.m +++ b/AntisymmetricProjection.m @@ -30,7 +30,6 @@ % PermuteSystems.m, sporth.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 26, 2012 function PA = AntisymmetricProjection(dim,varargin) diff --git a/ApplyMap.m b/ApplyMap.m index 3dc7516..3a91a4b 100644 --- a/ApplyMap.m +++ b/ApplyMap.m @@ -16,7 +16,6 @@ % requires: opt_args.m, PermuteSystems.m, Swap.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function PhiX = ApplyMap(X,Phi) diff --git a/Bell.m b/Bell.m index 4088e62..cbd9e77 100644 --- a/Bell.m +++ b/Bell.m @@ -23,7 +23,6 @@ % requires: iden.m, opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 23, 2014 function phi = Bell(varargin) diff --git a/BrauerStates.m b/BrauerStates.m index 1e92d35..5aa32bc 100644 --- a/BrauerStates.m +++ b/BrauerStates.m @@ -19,7 +19,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.51 % last updated: November 12, 2014 function B = BrauerStates(d,p) diff --git a/CBNorm.m b/CBNorm.m index 498aeaa..95dc170 100644 --- a/CBNorm.m +++ b/CBNorm.m @@ -28,7 +28,6 @@ % author: Nathaniel Johnston (nathaniel@njohnston.ca), based on an % algorithm by John Watrous % package: QETLAB -% version: 0.60 % last updated: November 21, 2014 function cb = CBNorm(Phi,varargin) diff --git a/ChannelDistinguishability.m b/ChannelDistinguishability.m index 68f78f1..fe7876e 100644 --- a/ChannelDistinguishability.m +++ b/ChannelDistinguishability.m @@ -28,23 +28,15 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 -% last updated: October 10, 2014 +% last updated: November 27, 2014 function dist = ChannelDistinguishability(Phi,Psi,varargin) -% guess the input and output dimensions, in case they aren't provided -if(iscell(Phi)) - dim = [size(Phi{1,1},2), size(Phi{1,1},1)]; -elseif(iscell(Psi)) - dim = [size(Psi{1,1},2), size(Psi{1,1},1)]; -else - dim = round(sqrt(length(Phi))); - dim = [dim,dim]; -end +% Get the input and output dimensions of PHI and PSI. +[da,db] = superoperator_dims(Psi,0,varargin{2:end}); % set optional argument defaults: p = [1/2,1/2], dim guessed based on input -[p,dim] = opt_args({ [1,1]/2, dim },varargin{:}); +[p,dim] = opt_args({ [1,1]/2, [da,db] },varargin{:}); % We convert to a Choi matrix to make things easier -- we end up converting % back to Kraus operators in the DiamondNorm function, but the performance diff --git a/ChessboardState.m b/ChessboardState.m index 1d0206b..2281ef4 100644 --- a/ChessboardState.m +++ b/ChessboardState.m @@ -27,7 +27,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: March 13, 2013 function rho = ChessboardState(a,b,c,d,m,n,varargin) diff --git a/ChoiMap.m b/ChoiMap.m index 05923c2..30bb798 100644 --- a/ChoiMap.m +++ b/ChoiMap.m @@ -20,7 +20,6 @@ % requires: iden.m, MaxEntangled.m, opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: August 5, 2013 function C = ChoiMap(varargin) diff --git a/ChoiMatrix.m b/ChoiMatrix.m index a306a0a..7d8af82 100644 --- a/ChoiMatrix.m +++ b/ChoiMatrix.m @@ -24,7 +24,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 24, 2014 function C = ChoiMatrix(Phi,varargin) diff --git a/Commutant.m b/Commutant.m index bba244d..f70dd03 100644 --- a/Commutant.m +++ b/Commutant.m @@ -14,7 +14,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function C = Commutant(A) diff --git a/ComplementaryMap.m b/ComplementaryMap.m index d178019..810d207 100644 --- a/ComplementaryMap.m +++ b/ComplementaryMap.m @@ -27,7 +27,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 24, 2014 function PhiC = ComplementaryMap(Phi,varargin) diff --git a/DepolarizingChannel.m b/DepolarizingChannel.m index a93e14c..0dce34b 100644 --- a/DepolarizingChannel.m +++ b/DepolarizingChannel.m @@ -16,7 +16,6 @@ % requires: iden.m, MaxEntangled.m, opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) -% version: 1.00 % last updated: March 4, 2014 function delta = DepolarizingChannel(dim,varargin) diff --git a/DiamondNorm.m b/DiamondNorm.m index f1efda8..548370c 100644 --- a/DiamondNorm.m +++ b/DiamondNorm.m @@ -27,7 +27,6 @@ % author: Nathaniel Johnston (nathaniel@njohnston.ca), based on an % algorithm by John Watrous % package: QETLAB -% version: 0.60 % last updated: November 21, 2014 function dn = DiamondNorm(Phi,varargin) diff --git a/Distinguishability.m b/Distinguishability.m index 045cf07..3a7970c 100644 --- a/Distinguishability.m +++ b/Distinguishability.m @@ -24,7 +24,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 6, 2014 function [dist,meas] = Distinguishability(X,varargin) diff --git a/DualMap.m b/DualMap.m index 9700571..92eb5d7 100644 --- a/DualMap.m +++ b/DualMap.m @@ -29,7 +29,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 24, 2014 function PhiD = DualMap(Phi,varargin) diff --git a/Entropy.m b/Entropy.m index 13c0b40..d3517b3 100644 --- a/Entropy.m +++ b/Entropy.m @@ -1,21 +1,23 @@ -%% ENTROPY Computes the von Neumann entropy of a density matrix +%% ENTROPY Computes the von Neumann or Renyi entropy of a density matrix % This function has one required argument: % RHO: a density matrix % % ENT = Entropy(RHO) is the (base 2) von Neumann entropy of RHO. % -% This function has one optional input argument: +% This function has two optional input arguments: % BASE (default 2) +% ALPHA (default 1) % -% ENT = Entropy(RHO,BASE) is the von Neumann entropy of RHO, computed -% with logarithms in the base specified by BASE. +% ENT = Entropy(RHO,BASE,ALPHA) is the entropy of RHO, computed with +% logarithms in the base specified by BASE. If ALPHA = 1 then this is the +% von Neumann entropy. If ALPHA <> 1 then this is the Renyi-ALPHA +% entropy. % % URL: http://www.qetlab.com/Entropy % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) -% version: 0.60 -% last updated: November 25, 2014 +% last updated: November 27, 2014 function ent = Entropy(rho,varargin) diff --git a/Fidelity.m b/Fidelity.m index a342582..e1d4de2 100644 --- a/Fidelity.m +++ b/Fidelity.m @@ -14,7 +14,6 @@ % authors: Vincent Russo (vrusso@uwaterloo.ca) % Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 21, 2014 function fid = Fidelity(rho,sigma) diff --git a/FilterNormalForm.m b/FilterNormalForm.m index 6732815..5377914 100644 --- a/FilterNormalForm.m +++ b/FilterNormalForm.m @@ -41,7 +41,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 3, 2014 function [xi,GA,GB,FA,FB] = FilterNormalForm(rho,varargin) diff --git a/FourierMatrix.m b/FourierMatrix.m index 2f0705a..ab04d02 100644 --- a/FourierMatrix.m +++ b/FourierMatrix.m @@ -10,7 +10,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 30, 2012 function F = FourierMatrix(dim) diff --git a/GellMann.m b/GellMann.m index 0faf696..5cad5b7 100644 --- a/GellMann.m +++ b/GellMann.m @@ -18,7 +18,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 18, 2013 function g = GellMann(ind,varargin) diff --git a/GenGellMann.m b/GenGellMann.m index ee04f5d..6ef1570 100644 --- a/GenGellMann.m +++ b/GenGellMann.m @@ -21,7 +21,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 18, 2013 function g = GenGellMann(ind1,ind2,dim,varargin) diff --git a/GenPauli.m b/GenPauli.m index 30fcd5f..73fcb8c 100644 --- a/GenPauli.m +++ b/GenPauli.m @@ -22,7 +22,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 18, 2013 function p = GenPauli(ind1,ind2,dim,varargin) diff --git a/InSeparableBall.m b/InSeparableBall.m index fd283ad..29fa074 100644 --- a/InSeparableBall.m +++ b/InSeparableBall.m @@ -18,7 +18,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 14, 2014 function isb = InSeparableBall(X) diff --git a/IsAbsPPT.m b/IsAbsPPT.m index f81b659..9815686 100644 --- a/IsAbsPPT.m +++ b/IsAbsPPT.m @@ -25,9 +25,9 @@ % requires: AbsPPTConstraints.m, InSeparableBall.m, IsPSD.m, opt_args.m, % perm_inv.m +% % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 14, 2014 function iappt = IsAbsPPT(rho,varargin) diff --git a/IsBlockPositive.m b/IsBlockPositive.m index 16208e0..0521e1b 100644 --- a/IsBlockPositive.m +++ b/IsBlockPositive.m @@ -43,7 +43,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 23, 2014 function [ibp,wit] = IsBlockPositive(X,varargin) diff --git a/IsCP.m b/IsCP.m index e6b8eef..a0bdf9c 100644 --- a/IsCP.m +++ b/IsCP.m @@ -16,9 +16,9 @@ % requires: ApplyMap.m, ChoiMatrix.m, iden.m, IsHermPreserving.m, % IsPSD.m, MaxEntangled.m, opt_args.m, PermuteSystems.m, % sporth.m, superoperator_dims.m +% % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: January 4, 2013 function cp = IsCP(Phi,varargin) diff --git a/IsEntanglingGate.m b/IsEntanglingGate.m index ad8a955..04a600e 100644 --- a/IsEntanglingGate.m +++ b/IsEntanglingGate.m @@ -25,9 +25,9 @@ % requires: opt_args.m, IsProductOperator.m, IsProductVector.m, % perm_inv.m, PermuteSystems.m, SchmidtDecomposition.m +% % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function [eg,wit] = IsEntanglingGate(U,varargin) diff --git a/IsHermPreserving.m b/IsHermPreserving.m index 8e0d340..49cfdb9 100644 --- a/IsHermPreserving.m +++ b/IsHermPreserving.m @@ -17,7 +17,6 @@ % PermuteSystems.m, sporth.m, superoperator_dims.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: January 4, 2013 function hp = IsHermPreserving(Phi,varargin) diff --git a/IsPPT.m b/IsPPT.m index bbc7b62..0353958 100644 --- a/IsPPT.m +++ b/IsPPT.m @@ -25,7 +25,6 @@ % requires: IsPSD.m, opt_args.m, PartialTranspose.m, PermuteSystems.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 20, 2012 function [ppt,wit] = IsPPT(X,varargin) diff --git a/IsPSD.m b/IsPSD.m index 2d9783d..7aca162 100644 --- a/IsPSD.m +++ b/IsPSD.m @@ -19,7 +19,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 21, 2014 function [psd,wit] = IsPSD(X,varargin) diff --git a/IsProductOperator.m b/IsProductOperator.m index 1ca59aa..2ec70d5 100644 --- a/IsProductOperator.m +++ b/IsProductOperator.m @@ -22,7 +22,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function [ipo,dec] = IsProductOperator(X,varargin) diff --git a/IsProductVector.m b/IsProductVector.m index 657c6ab..5ad32af 100644 --- a/IsProductVector.m +++ b/IsProductVector.m @@ -20,7 +20,6 @@ % requires: opt_args.m, SchmidtDecomposition.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 26, 2012 function [ipv,dec] = IsProductVector(vec,varargin) diff --git a/IsSeparable.m b/IsSeparable.m index 32f77a5..a4ab7cb 100644 --- a/IsSeparable.m +++ b/IsSeparable.m @@ -42,7 +42,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 14, 2014 function sep = IsSeparable(X,varargin) diff --git a/IsTotallyNonsingular.m b/IsTotallyNonsingular.m index 2319855..2027a33 100644 --- a/IsTotallyNonsingular.m +++ b/IsTotallyNonsingular.m @@ -21,7 +21,6 @@ % requires: opt_args.m, sporth.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 13, 2012 function [itn,wit] = IsTotallyNonsingular(X,varargin) diff --git a/IsTotallyPositive.m b/IsTotallyPositive.m index bc781e8..1ff2284 100644 --- a/IsTotallyPositive.m +++ b/IsTotallyPositive.m @@ -22,7 +22,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 13, 2012 function [itp,wit] = IsTotallyPositive(X,varargin) diff --git a/IsUPB.m b/IsUPB.m index 9e9dc83..29a6ffc 100644 --- a/IsUPB.m +++ b/IsUPB.m @@ -18,7 +18,6 @@ % requires: opt_args.m, vec_partitions.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) -% version: 0.50 % last updated: October 21, 2014 function [iu,wit] = IsUPB(varargin) diff --git a/IsotropicState.m b/IsotropicState.m index bfa710a..8288193 100644 --- a/IsotropicState.m +++ b/IsotropicState.m @@ -14,7 +14,6 @@ % requires: iden.m, MaxEntangled.m, opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 22, 2014 function rho = IsotropicState(dim,alpha) diff --git a/KrausOperators.m b/KrausOperators.m index afd963f..7c85f70 100644 --- a/KrausOperators.m +++ b/KrausOperators.m @@ -33,7 +33,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 24, 2014 function ko = KrausOperators(Phi,varargin) diff --git a/KyFanNorm.m b/KyFanNorm.m index 74e740f..c2b43de 100644 --- a/KyFanNorm.m +++ b/KyFanNorm.m @@ -10,7 +10,6 @@ % requires: kpNorm.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 1, 2012 function nrm = KyFanNorm(X,k) diff --git a/Majorizes.m b/Majorizes.m index 9ec64bb..e4742fc 100644 --- a/Majorizes.m +++ b/Majorizes.m @@ -14,7 +14,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: March 4, 2014 function m = Majorizes(a,b) diff --git a/MaxEntangled.m b/MaxEntangled.m index ced36f7..a09343e 100644 --- a/MaxEntangled.m +++ b/MaxEntangled.m @@ -21,7 +21,6 @@ % requires: iden.m, opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function psi = MaxEntangled(dim,varargin) diff --git a/MaximumOutputFidelity.m b/MaximumOutputFidelity.m index fc46600..8e4da44 100644 --- a/MaximumOutputFidelity.m +++ b/MaximumOutputFidelity.m @@ -25,7 +25,6 @@ % % authors: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 24, 2014 function mof = MaximumOutputFidelity(Phi,Psi,varargin) diff --git a/MinUPBSize.m b/MinUPBSize.m index 26fc08f..6173c5a 100644 --- a/MinUPBSize.m +++ b/MinUPBSize.m @@ -18,7 +18,6 @@ % requires: opt_args.m, opt_disp.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: June 22, 2013 function s = MinUPBSize(dim,varargin) diff --git a/Negativity.m b/Negativity.m index ae4d726..18adf49 100644 --- a/Negativity.m +++ b/Negativity.m @@ -21,7 +21,6 @@ % TraceNorm.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 22, 2014 function neg = Negativity(rho,varargin) diff --git a/OperatorSchmidtDecomposition.m b/OperatorSchmidtDecomposition.m index 18b16b7..1566182 100644 --- a/OperatorSchmidtDecomposition.m +++ b/OperatorSchmidtDecomposition.m @@ -29,7 +29,6 @@ % requires: opt_args.m, PermuteSystems.m, SchmidtDecomposition.m, Swap.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function [s,U,V] = OperatorSchmidtDecomposition(X,varargin) diff --git a/OperatorSchmidtRank.m b/OperatorSchmidtRank.m index 538f311..bc20183 100644 --- a/OperatorSchmidtRank.m +++ b/OperatorSchmidtRank.m @@ -18,7 +18,6 @@ % requires: opt_args.m, PermuteSystems.m, SchmidtRank.m, sporth.m, Swap.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function rnk = OperatorSchmidtRank(X,varargin) diff --git a/OperatorSinkhorn.m b/OperatorSinkhorn.m index 03f8c15..878a2c8 100644 --- a/OperatorSinkhorn.m +++ b/OperatorSinkhorn.m @@ -34,7 +34,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 3, 2014 function [sigma,F] = OperatorSinkhorn(rho,varargin) diff --git a/PartialMap.m b/PartialMap.m index 73cb0db..b582c5d 100644 --- a/PartialMap.m +++ b/PartialMap.m @@ -27,7 +27,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: February 21, 2014 function PhiX = PartialMap(X,Phi,varargin) diff --git a/PartialTrace.m b/PartialTrace.m index 384dfb3..0b43425 100644 --- a/PartialTrace.m +++ b/PartialTrace.m @@ -30,7 +30,6 @@ % requires: opt_args.m, PermuteSystems.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 22, 2012 function Xpt = PartialTrace(X,varargin) diff --git a/PartialTranspose.m b/PartialTranspose.m index a7c4438..681580c 100644 --- a/PartialTranspose.m +++ b/PartialTranspose.m @@ -24,7 +24,6 @@ % requires: opt_args.m, PermuteSystems.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 28, 2012 function Xpt = PartialTranspose(X,varargin) diff --git a/Pauli.m b/Pauli.m index 83b4018..644964e 100644 --- a/Pauli.m +++ b/Pauli.m @@ -21,7 +21,7 @@ % % URL: http://www.qetlab.com/Pauli -% requires: opt_args.m +% requires: opt_args.m, Tensor.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB % last updated: November 27, 2014 diff --git a/PermutationOperator.m b/PermutationOperator.m index 1d87824..cd2553f 100644 --- a/PermutationOperator.m +++ b/PermutationOperator.m @@ -20,7 +20,6 @@ % requires: iden.m, opt_args.m, PermuteSystems.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function P = PermutationOperator(dim,perm,varargin) diff --git a/PermuteSystems.m b/PermuteSystems.m index 8376805..82e8bfd 100644 --- a/PermuteSystems.m +++ b/PermuteSystems.m @@ -30,7 +30,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 6, 2014 function PX = PermuteSystems(X,perm,varargin) diff --git a/Purity.m b/Purity.m index b6bee5c..0460cc9 100644 --- a/Purity.m +++ b/Purity.m @@ -10,7 +10,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 15, 2014 function gamma = Purity(rho) diff --git a/RandomDensityMatrix.m b/RandomDensityMatrix.m index aca7a3e..5affcae 100644 --- a/RandomDensityMatrix.m +++ b/RandomDensityMatrix.m @@ -25,7 +25,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 10, 2014 function rho = RandomDensityMatrix(dim,varargin) diff --git a/RandomStateVector.m b/RandomStateVector.m index bda4c9c..aca11a0 100644 --- a/RandomStateVector.m +++ b/RandomStateVector.m @@ -25,7 +25,6 @@ % requires: iden.m MaxEntangled.m, opt_args.m, PermuteSystems.m, Swap.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function v = RandomStateVector(dim,varargin) diff --git a/RandomSuperoperator.m b/RandomSuperoperator.m index bac4624..09127a7 100644 --- a/RandomSuperoperator.m +++ b/RandomSuperoperator.m @@ -27,7 +27,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 30, 2014 function Phi = RandomSuperoperator(dim,varargin) diff --git a/RandomUnitary.m b/RandomUnitary.m index ceb1a9c..6137fc4 100644 --- a/RandomUnitary.m +++ b/RandomUnitary.m @@ -17,7 +17,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 30, 2014 function U = RandomUnitary(dim,varargin) diff --git a/Realignment.m b/Realignment.m index 3936523..50bcb45 100644 --- a/Realignment.m +++ b/Realignment.m @@ -22,7 +22,6 @@ % requires: opt_args.m, PartialTranspose.m, PermuteSystems.m, Swap.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 function RX = Realignment(X,varargin) diff --git a/ReductionMap.m b/ReductionMap.m index 7eeaf43..ccc8803 100644 --- a/ReductionMap.m +++ b/ReductionMap.m @@ -16,7 +16,6 @@ % requires: iden.m, MaxEntangled.m, opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 29, 2014 function R = ReductionMap(dim,varargin) diff --git a/SchattenNorm.m b/SchattenNorm.m index 35177eb..3895702 100644 --- a/SchattenNorm.m +++ b/SchattenNorm.m @@ -10,7 +10,6 @@ % requires: kpNorm.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 1, 2012 function nrm = SchattenNorm(X,p) diff --git a/SchmidtDecomposition.m b/SchmidtDecomposition.m index d284934..31c71d6 100644 --- a/SchmidtDecomposition.m +++ b/SchmidtDecomposition.m @@ -29,7 +29,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 1, 2012 function [s,u,v] = SchmidtDecomposition(vec,varargin) diff --git a/SchmidtRank.m b/SchmidtRank.m index 365fe5b..b184c22 100644 --- a/SchmidtRank.m +++ b/SchmidtRank.m @@ -20,7 +20,6 @@ % requires: opt_args.m, sporth.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 19, 2012 function rnk = SchmidtRank(vec,varargin) diff --git a/SkOperatorNorm.m b/SkOperatorNorm.m index d78c86e..817cb4d 100644 --- a/SkOperatorNorm.m +++ b/SkOperatorNorm.m @@ -66,7 +66,6 @@ % author: Nathaniel Johnston (nathaniel@njohnston.ca), based on joint % work with David W. Kribs % package: QETLAB -% version: 0.50 % last updated: September 22, 2014 function [lb,lwit,ub,uwit] = SkOperatorNorm(X,varargin) diff --git a/SkVectorNorm.m b/SkVectorNorm.m index 58b8f9b..a8ca6fa 100644 --- a/SkVectorNorm.m +++ b/SkVectorNorm.m @@ -26,7 +26,6 @@ % requires: opt_args.m, SchmidtDecomposition.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 2, 2012 function nrm = SkVectorNorm(vec,varargin) diff --git a/Swap.m b/Swap.m index 1523310..86846e7 100644 --- a/Swap.m +++ b/Swap.m @@ -27,7 +27,6 @@ % requires: opt_args.m, PermuteSystems.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 12, 2014 function SX = Swap(X,varargin) diff --git a/SwapOperator.m b/SwapOperator.m index e74cac7..3c7627c 100644 --- a/SwapOperator.m +++ b/SwapOperator.m @@ -18,7 +18,6 @@ % requires: iden.m, opt_args.m, PermuteSystems.m, Swap.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 12, 2014 function S = SwapOperator(dim,varargin) diff --git a/SymmetricExtension.m b/SymmetricExtension.m index ba86709..77e723a 100644 --- a/SymmetricExtension.m +++ b/SymmetricExtension.m @@ -38,7 +38,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 22, 2014 function [ex,wit] = SymmetricExtension(X,varargin) diff --git a/SymmetricInnerExtension.m b/SymmetricInnerExtension.m index ed7fd30..624d373 100644 --- a/SymmetricInnerExtension.m +++ b/SymmetricInnerExtension.m @@ -45,7 +45,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: September 22, 2014 function [ex,wit] = SymmetricInnerExtension(X,varargin) diff --git a/SymmetricProjection.m b/SymmetricProjection.m index 3ff4273..194f764 100644 --- a/SymmetricProjection.m +++ b/SymmetricProjection.m @@ -28,8 +28,8 @@ % requires: opt_args.m, PermutationOperator.m, PermuteSystems.m, sporth.m % authors: John D'Errico (unique_perms function) and % Nathaniel Johnston (nathaniel@njohnston.ca) +% % package: QETLAB -% version: 0.50 % last updated: November 20, 2012 function PS = SymmetricProjection(dim,varargin) diff --git a/Tensor.m b/Tensor.m index f6e80be..0901243 100644 --- a/Tensor.m +++ b/Tensor.m @@ -15,7 +15,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function krn = Tensor(A,varargin) diff --git a/TensorSum.m b/TensorSum.m index df62326..9c73f3e 100644 --- a/TensorSum.m +++ b/TensorSum.m @@ -23,7 +23,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function ts = TensorSum(a1,a2,varargin) diff --git a/TraceNorm.m b/TraceNorm.m index 8d6431f..a32498b 100644 --- a/TraceNorm.m +++ b/TraceNorm.m @@ -9,7 +9,6 @@ % requires: kpNorm.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 22, 2014 function nrm = TraceNorm(X) diff --git a/UPB.m b/UPB.m index 944968f..b23928a 100644 --- a/UPB.m +++ b/UPB.m @@ -25,9 +25,9 @@ % requires: FourierMatrix.m, IsTotallyNonsingular.m, MinUPBSize.m, % normalize_cols.m, one_factorization.m, opt_args.m, % opt_disp.m, perm_inv.m, PermuteSystems.m, sporth.m, Swap.m +% % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 12, 2014 % URL: http://www.qetlab.com/UPB diff --git a/UPBSepDistinguishable.m b/UPBSepDistinguishable.m index 1207b23..3d9b809 100644 --- a/UPBSepDistinguishable.m +++ b/UPBSepDistinguishable.m @@ -17,7 +17,6 @@ % requires: cvx (http://cvxr.com/cvx/), opt_args.m, vec_partitions.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) -% version: 0.50 % last updated: October 30, 2014 function dist = UPBSepDistinguishable(varargin) diff --git a/WernerState.m b/WernerState.m index c47100c..60889b2 100644 --- a/WernerState.m +++ b/WernerState.m @@ -23,9 +23,9 @@ % requires: iden.m, opt_args.m, PermutationOperator.m, PermuteSystems.m, % Swap.m, SwapOperator.m +% % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.51 % last updated: November 12, 2014 function rho = WernerState(dim,alpha) diff --git a/XORClassicalValue.m b/XORClassicalValue.m index a0c4649..d683085 100644 --- a/XORClassicalValue.m +++ b/XORClassicalValue.m @@ -17,7 +17,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 19, 2014 function wc = XORClassicalValue(p,f) diff --git a/XORQuantumValue.m b/XORQuantumValue.m index 048d726..94685f1 100644 --- a/XORQuantumValue.m +++ b/XORQuantumValue.m @@ -18,7 +18,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 16, 2014 function wg = XORQuantumValue(p,f) diff --git a/helpers/iden.m b/helpers/iden.m index b7f24d4..3d939e9 100644 --- a/helpers/iden.m +++ b/helpers/iden.m @@ -15,7 +15,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function id = iden(dim,sp) diff --git a/helpers/jacobi_poly.m b/helpers/jacobi_poly.m index d12c143..b445023 100644 --- a/helpers/jacobi_poly.m +++ b/helpers/jacobi_poly.m @@ -13,7 +13,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: March 6, 2013 function jp = jacobi_poly(a,b,n) diff --git a/helpers/normalize_cols.m b/helpers/normalize_cols.m index 1a5519e..0ecf8ce 100644 --- a/helpers/normalize_cols.m +++ b/helpers/normalize_cols.m @@ -10,7 +10,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: January 2, 2013 function Y = normalize_cols(X) diff --git a/helpers/one_factorization.m b/helpers/one_factorization.m index a707f0a..1109e00 100644 --- a/helpers/one_factorization.m +++ b/helpers/one_factorization.m @@ -18,7 +18,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 6, 2014 function fac = one_factorization(n) diff --git a/helpers/opt_args.m b/helpers/opt_args.m index 19ad5f3..0492465 100644 --- a/helpers/opt_args.m +++ b/helpers/opt_args.m @@ -13,7 +13,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 2, 2012 function varargout = opt_args(def_args,varargin) diff --git a/helpers/opt_disp.m b/helpers/opt_disp.m index 77217e6..80a8882 100644 --- a/helpers/opt_disp.m +++ b/helpers/opt_disp.m @@ -17,7 +17,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: December 3, 2012 function opt_disp(X,verbose) diff --git a/helpers/perfect_matchings.m b/helpers/perfect_matchings.m index 0f799f3..14f9bf5 100644 --- a/helpers/perfect_matchings.m +++ b/helpers/perfect_matchings.m @@ -15,7 +15,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 6, 2014 function pm = perfect_matchings(n) diff --git a/helpers/perm_inv.m b/helpers/perm_inv.m index 186d541..b091e01 100644 --- a/helpers/perm_inv.m +++ b/helpers/perm_inv.m @@ -9,7 +9,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 28, 2012 function res = perm_inv(perm) diff --git a/helpers/perm_sign.m b/helpers/perm_sign.m index aa54571..e030182 100644 --- a/helpers/perm_sign.m +++ b/helpers/perm_sign.m @@ -11,7 +11,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: November 21, 2012 function sgn = perm_sign(perm) diff --git a/helpers/sk_iterate.m b/helpers/sk_iterate.m index a1293f2..8fbee01 100644 --- a/helpers/sk_iterate.m +++ b/helpers/sk_iterate.m @@ -40,7 +40,6 @@ % % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 % last updated: November 14, 2014 %% WHEN UPDATING FOR NON-HERMITIAN, ALSO UPDATE HOW IT'S USED IN SKOPERATORNORM diff --git a/helpers/superoperator_dims.m b/helpers/superoperator_dims.m index f06f796..8c1493f 100644 --- a/helpers/superoperator_dims.m +++ b/helpers/superoperator_dims.m @@ -36,8 +36,7 @@ % requires: opt_args.m, sporth.m % authors: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.60 -% last updated: November 24, 2014 +% last updated: November 27, 2014 function [da,db,de] = superoperator_dims(Phi,varargin) @@ -62,7 +61,7 @@ dim = expand_dim(dim); % Now do some error checking. - if(allow_rect ~= 1) + if((da(1) ~= da(2) || db(1) ~= db(2)) && allow_rect ~= 1) error('superoperator_dims:InvalidDims','The input and output spaces of PHI must be square.'); elseif(dim(1,1) ~= da(1) || dim(2,1) ~= da(2) || dim(1,2) ~= db(1) || dim(2,2) ~= db(2)) error('superoperator_dims:InvalidDims','The dimensions of PHI do not match those provided in the DIM argument.'); diff --git a/helpers/vec_partitions.m b/helpers/vec_partitions.m index bee9cb4..5ee9b84 100644 --- a/helpers/vec_partitions.m +++ b/helpers/vec_partitions.m @@ -15,7 +15,6 @@ % requires: opt_args.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) -% version: 0.50 % last updated: October 18, 2014 function pt = vec_partitions(v,p,varargin) diff --git a/kpNorm.m b/kpNorm.m index 8a42ae0..bc5f49e 100644 --- a/kpNorm.m +++ b/kpNorm.m @@ -13,7 +13,6 @@ % requires: nothing % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: October 22, 2014 function nrm = kpNorm(X,k,p) diff --git a/kpNormDual.m b/kpNormDual.m index d328d6e..805fc22 100644 --- a/kpNormDual.m +++ b/kpNormDual.m @@ -12,7 +12,6 @@ % requires: kpNorm.m % author: Nathaniel Johnston (nathaniel@njohnston.ca) % package: QETLAB -% version: 0.50 % last updated: April 3, 2013 function nrm = kpNormDual(X,k,p)