http://www.qetlab.com/wiki/api.php?action=feedcontributions&user=Rmmateri&feedformat=atom QETLAB - User contributions [en] 2021-12-04T19:46:40Z User contributions MediaWiki 1.35.3 http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=939 List of functions 2018-08-28T11:55:48Z <p>Rmmateri: /* Entanglement measures */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Concurrence]]&lt;/tt&gt;: Computes the concurrence of a 2-qubit state<br /> * &lt;tt&gt;[[EntFormation]]&lt;/tt&gt;: Computes the entanglement of formation of a bipartite quantum state<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> * &lt;tt&gt;[[RandomRobustnessEntanglement]]&lt;/tt&gt;: Computes the random robustness of entanglement of a bipartite quantum state<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=938 List of functions 2018-08-28T11:55:26Z <p>Rmmateri: /* Random things */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Concurrence]]&lt;/tt&gt;: Computes the concurrence of a 2-qubit state<br /> * &lt;tt&gt;[[EntFormation]]&lt;/tt&gt;: Computes the entanglement of formation of a bipartite quantum state<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=937 List of functions 2018-08-14T12:59:38Z <p>Rmmateri: /* Entanglement measures */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Concurrence]]&lt;/tt&gt;: Computes the concurrence of a 2-qubit state<br /> * &lt;tt&gt;[[EntFormation]]&lt;/tt&gt;: Computes the entanglement of formation of a bipartite quantum state<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomRobustnessEntanglement]]&lt;/tt&gt;: Computes the random robustness of entanglement of a bipartite quantum state<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=936 List of functions 2018-08-14T12:49:25Z <p>Rmmateri: /* Unextendible product bases */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomRobustnessEntanglement]]&lt;/tt&gt;: Computes the random robustness of entanglement of a bipartite quantum state<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=935 List of functions 2018-08-14T12:48:38Z <p>Rmmateri: /* Unextendible product bases */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomRobustnessEntanglement]]&lt;/tt&gt;: Computes the random robustness of entanglement of a bipartite quantum state<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not a UPB is distinguishable by separable measurements<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=934 List of functions 2018-08-14T12:47:00Z <p>Rmmateri: /* Random things */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomRobustnessEntanglement]]&lt;/tt&gt;: Computes the random robustness of entanglement of a bipartite quantum state<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=933 List of functions 2018-08-06T12:57:05Z <p>Rmmateri: /* Helper functions */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[bcs_to_nonlocal]]&lt;/tt&gt;: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=932 List of functions 2018-08-06T12:43:15Z <p>Rmmateri: /* Nonlocality and Bell inequalities */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a binary contraint system (BCS) game<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameLB]]&lt;/tt&gt;: Computes a lower bound on the quantum value of a non-local game<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Template:DownloadBox&diff=931 Template:DownloadBox 2018-07-20T11:56:44Z <p>Rmmateri: </p> <hr /> <div>&lt;div style=&quot;border:2px outset #dddddd;background:#eeeeee;margin:12px auto 5px auto;padding:5px;white-space:nowrap;width:75%;min-width:620px;&quot;&gt;<br /> {| style=&quot;background:#eeeeee;&quot; |<br /> |-<br /> | valign=&quot;top&quot; | [[File:download.gif|link={{DownloadLink}}.zip]]<br /> |&lt;span style=&quot;padding-left:10px;font-size:130%;font-weight:bold;&quot;&gt;Download and Install QETLAB&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;padding:4px 0 0 12px;&quot;&gt;'''Step 1:''' Download [{{DownloadLink}}.zip QETLAB] (current version: {{CurrentVersion}}, last updated: {{LastUpdated}})&lt;/div&gt;&lt;div style=&quot;padding:4px 0 0 12px;&quot;&gt;'''Step 2:''' Unzip the file in your MATLAB scripts directory&lt;/div&gt;&lt;div style=&quot;padding:4px 0 0 12px;&quot;&gt;'''Step 3:''' Download and install [http://cvxr.com/cvx/ CVX 2.1]&lt;/div&gt;{{#ifeq: {{PAGENAME}} | Installation | | &lt;div style=&quot;font-size:90%; padding:8px 0 0 12px;&quot;&gt;If you need more detailed installation instructions, [[Installation|click here]].&lt;/div&gt;}}<br /> |}&lt;/div&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Installation&diff=930 Installation 2018-07-20T11:20:38Z <p>Rmmateri: /* Step 3: Download and install CVX */</p> <hr /> <div>__NOTOC__This page will guide you through '''downloading and installing''' QETLAB. This process should be quick and easy (taking roughly 5 minutes). First try following the instructions in the following box. If you do not have any trouble following these instructions and getting everything working, then great! If you need more detailed instructions, continue reading below.<br /> {{DownloadBox}}<br /> <br /> ==More detailed instructions==<br /> Here we will expand on the three steps that we outlined above, in case you have any trouble completing any of them.<br /> <br /> ===Step 1: Download QETLAB===<br /> This step is easy enough. Simply download one of the following two files, depending on which operating system you are using.<br /> {| class=&quot;wikitable&quot;<br /> |-<br /> ! Windows/Mac<br /> ! Linux<br /> |-<br /> | [{{DownloadLink}}.zip QETLAB v{{CurrentVersion}}] (.zip archive)<br /> | [{{DownloadLink}}.tar.gz QETLAB v{{CurrentVersion}}] (.tar.gz archive)<br /> |}<br /> <br /> ===Step 2: Unzip the file in your MATLAB scripts directory===<br /> First, extract the .zip or .tar.gz archive (every modern operating system has built-in tools for extracting archives like this) &amp;ndash; this will create a directory called &quot;&lt;tt&gt;QETLAB-{{CurrentVersion}}&lt;/tt&gt;&quot;.<br /> <br /> * If you know where your MATLAB scripts directory is and you are comfortable adding scripts to MATLAB's path, then do so with QETLAB (and its subfolders).<br /> <br /> * Otherwise, move the &quot;&lt;tt&gt;QETLAB-{{CurrentVersion}}&lt;/tt&gt;&quot; directory to wherever you want it on your computer (for the sake of these instructions, let's suppose that the directory is now located at &lt;tt&gt;C:\Users\Nathaniel\MyFiles\QETLAB-{{CurrentVersion}}&lt;/tt&gt;). Then, within MATLAB, type the following (replacing the path &lt;tt&gt;C:\Users...&lt;/tt&gt; with whatever the path is on your own computer):<br /> : &lt;tt&gt;addpath(genpath('C:\Users\Nathaniel\MyFiles\QETLAB-{{CurrentVersion}}'))&lt;/tt&gt;<br /> <br /> You should now be able to use some of basic functions of QETLAB. For example, you could try running the following two lines of code, which generate a random density matrix and then check whether or not it has positive partial transpose:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; rho = RandomDensityMatrix(9);<br /> &gt;&gt; IsPPT(rho)<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Step 3: Download and install CVX===<br /> [[File:CVX_needed.png|thumb|right|360px|Part of the documentation of the &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt; function, showing that this function requires CVX to work.]]While this step is not necessary if you only care about some of QETLAB's most basic functions, it is needed to unlock many of the advanced features of QETLAB. [http://cvxr.com/cvx/ CVX] is a free convex optimization toolbox for MATLAB that is ''heavily'' integrated with QETLAB. Many of QETLAB's advanced functions rely on CVX (if a QETLAB function requires CVX, it will say so at the top-right corner of its [[List_of_functions|documentation page]]), and in general CVX is just handy to have around.<br /> <br /> IMPORTANT NOTE! Currently CVX 2.1 is the stable version and is compatible with QETLAB. USE CVX 3.0b AT YOUR OWN RISK! <br /> <br /> To download and install CVX, follow the '''[http://cvxr.com/cvx/download/ instructions on the CVX website]'''.</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Pad_array&diff=929 Pad array 2018-07-18T16:22:28Z <p>Rmmateri: /* Examples */</p> <hr /> <div>{{Function<br /> |name=pad_array<br /> |desc=Pads an array with zeroes in a similar way to padarray in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 18th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''pad_array'''&lt;/tt&gt; is a [[List of functions|function]] that takes an array and either prepends or postpends a number of zeroes specified by the function call. <br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BIN = pad_array(ARR, PAD_NUM, DIR)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;ARR&lt;/tt&gt;: The array which will have zeroes padded onto it.<br /> * &lt;tt&gt;PAD_NUM&lt;/tt&gt;: The number of zeroes to either prepend or postpend onto &lt;tt&gt;ARR&lt;/tt&gt;. This must be a non-negative integer.<br /> * &lt;tt&gt;DIR&lt;/tt&gt;: An integer specifying whether to prepend or postpend the zeroes onto &lt;tt&gt;ARR&lt;/tt&gt;. 0 means to prepend, 1 means to postpend, and any other number will throw an error. <br /> ==Examples==<br /> A basic example of how pad_array works. <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; arr = [1,2,3,4];<br /> &gt;&gt; pad_array(arr, 2, 0)<br /> <br /> ans =<br /> <br /> 0 0 1 2 3 4<br /> <br /> &gt;&gt; pad_array(arr, 2, 1)<br /> <br /> ans =<br /> <br /> 1 2 3 4 0 0<br /> <br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the image processing package of MATLAB or Octave-Forge. Note that this function only pads with zeroes. If other numbers are required, please use the padarray' function within the image processing toolbox of MATLAB or Octave-Forge. <br /> <br /> {{SourceCode|name=iden|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Pad_array&diff=928 Pad array 2018-07-18T16:21:49Z <p>Rmmateri: Created page with &quot;{{Function |name=pad_array |desc=Pads an array with zeroes in a similar way to padarray in MATLAB. |cat=Helper functions |upd=July 18th,...&quot;</p> <hr /> <div>{{Function<br /> |name=pad_array<br /> |desc=Pads an array with zeroes in a similar way to padarray in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 18th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''pad_array'''&lt;/tt&gt; is a [[List of functions|function]] that takes an array and either prepends or postpends a number of zeroes specified by the function call. <br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BIN = pad_array(ARR, PAD_NUM, DIR)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;ARR&lt;/tt&gt;: The array which will have zeroes padded onto it.<br /> * &lt;tt&gt;PAD_NUM&lt;/tt&gt;: The number of zeroes to either prepend or postpend onto &lt;tt&gt;ARR&lt;/tt&gt;. This must be a non-negative integer.<br /> * &lt;tt&gt;DIR&lt;/tt&gt;: An integer specifying whether to prepend or postpend the zeroes onto &lt;tt&gt;ARR&lt;/tt&gt;. 0 means to prepend, 1 means to postpend, and any other number will throw an error. <br /> ==Examples==<br /> Some basic examples of how pad_array works. <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; arr = [1,2,3,4];<br /> &gt;&gt; pad_array(arr, 2, 0)<br /> <br /> ans =<br /> <br /> 0 0 1 2 3 4<br /> <br /> &gt;&gt; pad_array(arr, 2, 1)<br /> <br /> ans =<br /> <br /> 1 2 3 4 0 0<br /> <br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the image processing package of MATLAB or Octave-Forge. Note that this function only pads with zeroes. If other numbers are required, please use the padarray' function within the image processing toolbox of MATLAB or Octave-Forge. <br /> <br /> {{SourceCode|name=iden|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=927 List of functions 2018-07-18T12:15:12Z <p>Rmmateri: </p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to de2bi' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=926 List of functions 2018-07-18T11:58:47Z <p>Rmmateri: </p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to dec2bin' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[pad_array]]&lt;/tt&gt;: Pads an array with zeroes in a similar way to padarray' in MATLAB<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Dec_to_bin&diff=925 Dec to bin 2018-07-18T11:40:12Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=dec_to_bin<br /> |desc=Converts a number to its binary form in a similar way to the de2bi function in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 6th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''dec_to_bin'''&lt;/tt&gt; is a [[List of functions|function]] that takes a number as input and converts it to a vector representing the binary form of the number with the MSB to the right. <br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BIN = dec_to_bin(DEC)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;DEC&lt;/tt&gt;: The number to be converted to a vector representing the binary form of &lt;tt&gt;DEC&lt;/tt&gt;. This must be a non-negative integer. <br /> ==Examples==<br /> Some basic examples of how dec_to_bin works. <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; dec_to_bin(5)<br /> <br /> ans =<br /> <br /> 1 0 1<br /> <br /> &gt;&gt; dec_to_bin(6)<br /> <br /> ans =<br /> <br /> 0 1 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the communications package of MATLAB or Octave-Forge. <br /> <br /> {{SourceCode|name=iden|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Dec_to_bin&diff=924 Dec to bin 2018-07-18T11:38:56Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=dec_to_bin<br /> |desc=Converts a decimal number to a binary number in a similar way to the de2bi function in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 6th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''dec_to_bin'''&lt;/tt&gt; is a [[List of functions|function]] that takes a decimal number as input and converts it to a vector representing the binary form of the number with the MSB to the right. <br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BIN = dec_to_bin(DEC)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;DEC&lt;/tt&gt;: The decimal number to be converted to a vector representing the binary form of &lt;tt&gt;DEC&lt;/tt&gt;. This must be a non-negative integer. <br /> ==Examples==<br /> Some basic examples of how dec_to_bin works. <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; dec_to_bin(5)<br /> <br /> ans =<br /> <br /> 1 0 1<br /> <br /> &gt;&gt; dec_to_bin(6)<br /> <br /> ans =<br /> <br /> 0 1 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the communications package of MATLAB or Octave-Forge. <br /> <br /> {{SourceCode|name=iden|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Dec_to_bin&diff=923 Dec to bin 2018-07-18T11:38:19Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=dec_to_bin<br /> |desc=Converts a decimal number to a binary number in a similar way to the dec2bin function in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 6th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''dec_to_bin'''&lt;/tt&gt; is a [[List of functions|function]] that takes a decimal number as input and converts it to a vector representing the binary form of the number with the MSB to the right. <br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BIN = dec_to_bin(DEC)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;DEC&lt;/tt&gt;: The decimal number to be converted to a vector representing the binary form of &lt;tt&gt;DEC&lt;/tt&gt;. This must be a non-negative integer. <br /> ==Examples==<br /> Some basic examples of how dec_to_bin works. <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; dec_to_bin(5)<br /> <br /> ans =<br /> <br /> 1 0 1<br /> <br /> &gt;&gt; dec_to_bin(6)<br /> <br /> ans =<br /> <br /> 0 1 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the communications package of MATLAB or Octave-Forge. <br /> <br /> {{SourceCode|name=iden|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Dec_to_bin&diff=922 Dec to bin 2018-07-18T11:37:48Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=dec_to_bin<br /> |desc=Converts a decimal number to a binary number in a similar way to the dec2bin function in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 6th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''dec_to_bin'''&lt;/tt&gt; is a [[List of functions|function]] that takes a decimal number as input and converts it to a vector representing the binary form of the number with the MSB to the right. <br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BIN = dec_to_bin(DEC)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;DEC&lt;/tt&gt;: The decimal number to be converted to a vector representing the binary form of &lt;tt&gt;DEC&lt;/tt&gt;. This must be a non-negative integer. <br /> ==Examples==<br /> Some basic examples of how dec_to_bin works. <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; dec_to_bin(5)<br /> <br /> ans =<br /> <br /> 1 0 1<br /> <br /> &gt;&gt; dec_to_bin(6)<br /> <br /> ans =<br /> <br /> 0 1 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the communications package of MATLAB or Octave-Forge. <br /> <br /> {{SourceCode|name=dec_to_bin|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Dec_to_bin&diff=921 Dec to bin 2018-07-06T19:13:31Z <p>Rmmateri: Created page with &quot;{{Function |name=dec_to_bin |desc=Converts a decimal number to a binary number in a similar way to the dec2bin function in MATLAB. |cat=List of functions#Helper_functions|He...&quot;</p> <hr /> <div>{{Function<br /> |name=dec_to_bin<br /> |desc=Converts a decimal number to a binary number in a similar way to the dec2bin function in MATLAB.<br /> |cat=[[List of functions#Helper_functions|Helper functions]]<br /> |upd=July 6th, 2018<br /> |v=0.50<br /> |helper=1}}<br /> &lt;tt&gt;'''dec_to_bin'''&lt;/tt&gt; is a [[List of functions|function]] that computes the identity matrix of the desired size, which is either full or sparse.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;ID = iden(DIM,SP)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;DIM&lt;/tt&gt;: The number of rows (or equivalently, columns) that &lt;tt&gt;ID&lt;/tt&gt; will have.<br /> * &lt;tt&gt;SP&lt;/tt&gt;: A flag (either 1 or 0) indicating whether &lt;tt&gt;ID&lt;/tt&gt; should or should not be sparse.<br /> <br /> ==Examples==<br /> Full and sparse versions of the 2-by-2 identity matrix:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; iden(2,0)<br /> <br /> ans =<br /> <br /> 1 0<br /> 0 1<br /> <br /> &gt;&gt; iden(2,1)<br /> <br /> ans =<br /> <br /> (1,1) 1<br /> (2,2) 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> This function is only meant to simplify code within other functions without the need to install the package dec2bin. <br /> <br /> {{SourceCode|name=iden|helper=1}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=920 List of functions 2018-07-06T18:57:31Z <p>Rmmateri: /* Helper functions */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> * &lt;tt&gt;[[dec_to_bin]]&lt;/tt&gt;: Converts a decimal number to a binary number in a similar way to dec2bin' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=List_of_functions&diff=919 List of functions 2018-07-06T18:56:56Z <p>Rmmateri: /* Helper functions */</p> <hr /> <div>This is a '''list of functions''' provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see [[:Category:Functions|this page]]. Brief descriptions of these functions are provided here, as well as links to their documentation pages, where full details and numerous examples can be found.<br /> <br /> ==Basic operations==<br /> * &lt;tt&gt;[[IsPSD]]&lt;/tt&gt;: Determines whether or not a matrix is positive semidefinite<br /> * &lt;tt&gt;[[Tensor]]&lt;/tt&gt;: Kronecker tensor product of two or more matrices<br /> * &lt;tt&gt;[[TensorSum]]&lt;/tt&gt;: Computes a vector or operator from its tensor decomposition<br /> <br /> ==Coherence and incoherence==<br /> * &lt;tt&gt;[[L1NormCoherence]]&lt;/tt&gt;: Computes the ℓ&lt;sub&gt;1&lt;/sub&gt;-norm of coherence of a quantum state<br /> * &lt;tt&gt;[[RelEntCoherence]]&lt;/tt&gt;: Computes the relative entropy of coherence of a quantum state<br /> * &lt;tt&gt;[[RobustnessCoherence]]&lt;/tt&gt;: Computes the robustness of coherence of a quantum state<br /> * &lt;tt&gt;[[TraceDistanceCoherence]]&lt;/tt&gt;: Computes the trace distance of coherence of a quantum state<br /> <br /> ==Distinguishing objects==<br /> * &lt;tt&gt;[[ChannelDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing two quantum channels<br /> * &lt;tt&gt;[[Distinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states<br /> * &lt;tt&gt;[[LocalDistinguishability]]&lt;/tt&gt;: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements<br /> * &lt;tt&gt;[[UPBSepDistinguishable]]&lt;/tt&gt;: Determines whether or not an unextendible product basis is distinguishable by separable measurements<br /> <br /> ==Entanglement and separability==<br /> ===Pure states===<br /> * &lt;tt&gt;[[IsProductVector]]&lt;/tt&gt;: Determines if a pure state is a product vector<br /> * &lt;tt&gt;[[SchmidtDecomposition]]&lt;/tt&gt;: Computes the Schmidt decomposition of a bipartite vector<br /> * &lt;tt&gt;[[SchmidtRank]]&lt;/tt&gt;: Computes the Schmidt rank of a bipartite vector<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[FilterNormalForm]]&lt;/tt&gt;: Computes the filter normal form of an operator<br /> * &lt;tt&gt;[[IsBlockPositive]]&lt;/tt&gt;: Determines whether or not an operator is block positive<br /> * &lt;tt&gt;[[IsEntanglingGate]]&lt;/tt&gt;: Determines if a unitary is an entangling gate<br /> * &lt;tt&gt;[[IsPPT]]&lt;/tt&gt;: Determines whether or not a matrix has positive partial transpose<br /> * &lt;tt&gt;[[IsProductOperator]]&lt;/tt&gt;: Determines if an operator is an elementary tensor<br /> * &lt;tt&gt;[[IsSeparable]]&lt;/tt&gt;: Determines whether or not a bipartite operator is separable<br /> * &lt;tt&gt;[[OperatorSchmidtDecomposition]]&lt;/tt&gt;: Computes the operator Schmidt decomposition of a bipartite operator<br /> * &lt;tt&gt;[[OperatorSchmidtRank]]&lt;/tt&gt;: Computes the operator Schmidt rank of a bipartite operator<br /> * &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric extension<br /> * &lt;tt&gt;[[SymmetricInnerExtension]]&lt;/tt&gt;: Determines whether or not an operator has a symmetric inner extension<br /> <br /> ===Ball of separability===<br /> * &lt;tt&gt;[[AbsPPTConstraints]]&lt;/tt&gt;: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT<br /> * &lt;tt&gt;[[InSeparableBall]]&lt;/tt&gt;: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state<br /> * &lt;tt&gt;[[IsAbsPPT]]&lt;/tt&gt;: Determines whether or not a density matrix is absolutely PPT<br /> <br /> ===Entanglement measures===<br /> * &lt;tt&gt;[[Negativity]]&lt;/tt&gt;: Computes the negativity of a bipartite density matrix<br /> <br /> ==Information theory==<br /> * &lt;tt&gt;[[Entropy]]&lt;/tt&gt;: Computes the von Neumann or Rényi entropy of a density matrix<br /> <br /> ==Nonlocality and Bell inequalities==<br /> * &lt;tt&gt;[[BCSGameValue]]&lt;/tt&gt;: Computes the maximum value of a binary constraint system (BCS) game<br /> * &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt;: Computes the maximum value of a Bell inequality<br /> * &lt;tt&gt;[[BellInequalityMaxQubits]]&lt;/tt&gt;: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> * &lt;tt&gt;[[NonlocalGameValue]]&lt;/tt&gt;: Computes the value of a two-player non-local game<br /> * &lt;tt&gt;[[NPAHierarchy]]&lt;/tt&gt;: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy<br /> * &lt;tt&gt;[[XORGameValue]]&lt;/tt&gt;: Computes the classical or quantum value of a non-local binary XOR game<br /> <br /> ==Norms and distance measures==<br /> ===Vectors and pure states===<br /> * &lt;tt&gt;[[SkVectorNorm]]&lt;/tt&gt;: Computes the s(k)-norm of a vector<br /> <br /> ===Operators and mixed states===<br /> * &lt;tt&gt;[[Fidelity]]&lt;/tt&gt;: Computes the fidelity of two density matrices<br /> * &lt;tt&gt;[[InducedMatrixNorm]]&lt;/tt&gt;: Computes a lower bound of the induced p&amp;rarr;q norm of a matrix<br /> * &lt;tt&gt;[[kpNorm]]&lt;/tt&gt;: Computes the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[kpNormDual]]&lt;/tt&gt;: Computes the dual of the (k,p)-norm of a vector or matrix<br /> * &lt;tt&gt;[[KyFanNorm]]&lt;/tt&gt;: Computes the Ky Fan k-norm of an operator<br /> * &lt;tt&gt;[[SkOperatorNorm]]&lt;/tt&gt;: Bounds the S(k)-norm of an operator<br /> * &lt;tt&gt;[[SchattenNorm]]&lt;/tt&gt;: Computes the Schatten p-norm of an operator<br /> * &lt;tt&gt;[[TraceNorm]]&lt;/tt&gt;: Computes the trace norm of an operator<br /> <br /> ===Superoperators and channels===<br /> * &lt;tt&gt;[[CBNorm]]&lt;/tt&gt;: Computes the completely bounded norm of a superoperator<br /> * &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt;: Computes the diamond norm of a superoperator<br /> * &lt;tt&gt;[[InducedSchattenNorm]]&lt;/tt&gt;: Computes a lower bound of the induced Schatten p&amp;rarr;q norm of a superoperator<br /> * &lt;tt&gt;[[MaximumOutputFidelity]]&lt;/tt&gt;: Computes the maximum output fidelity of two quantum channels<br /> <br /> ==Permutations and symmetry of subsystems==<br /> * &lt;tt&gt;[[AntisymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the antisymmetric subspace<br /> * &lt;tt&gt;[[PermutationOperator]]&lt;/tt&gt;: Produces a unitary operator that permutes subsystems<br /> * &lt;tt&gt;[[PermuteSystems]]&lt;/tt&gt;: Permutes subsystems within a state or operator<br /> * &lt;tt&gt;[[Swap]]&lt;/tt&gt;: Swaps two subsystems within a state or operator<br /> * &lt;tt&gt;[[SwapOperator]]&lt;/tt&gt;: Produces a unitary operator that swaps two subsystems<br /> * &lt;tt&gt;[[SymmetricProjection]]&lt;/tt&gt;: Produces the projection onto the symmetric subspace<br /> <br /> ==Random things==<br /> * &lt;tt&gt;[[RandomDensityMatrix]]&lt;/tt&gt;: Generates a random density matrix<br /> * &lt;tt&gt;[[RandomPOVM]]&lt;/tt&gt;: Generates a random POVM (positive-operator valued measure)<br /> * &lt;tt&gt;[[RandomProbabilities]]&lt;/tt&gt;: Computes a random probability vector, distributed uniformly on the unit simplex<br /> * &lt;tt&gt;[[RandomStateVector]]&lt;/tt&gt;: Generates a random pure state vector<br /> * &lt;tt&gt;[[RandomSuperoperator]]&lt;/tt&gt;: Generates a random superoperator (completely positive map)<br /> * &lt;tt&gt;[[RandomUnitary]]&lt;/tt&gt;: Generates a random unitary or orthogonal matrix<br /> <br /> ==Special states, vectors, and operators==<br /> ===Pure states===<br /> * &lt;tt&gt;[[Bell]]&lt;/tt&gt;: Produces a Bell state<br /> * &lt;tt&gt;[[BrauerStates]]&lt;/tt&gt;: Produces all Brauer states<br /> * &lt;tt&gt;[[DickeState]]&lt;/tt&gt;: Generates a Dicke state<br /> * &lt;tt&gt;[[GHZState]]&lt;/tt&gt;: Generates a (generalized) GHZ state<br /> * &lt;tt&gt;[[MaxEntangled]]&lt;/tt&gt;: Produces a maximally entangled bipartite pure state<br /> * &lt;tt&gt;[[WState]]&lt;/tt&gt;: Generates a (generalized) W-state<br /> <br /> ===Mixed states===<br /> * &lt;tt&gt;[[BreuerState]]&lt;/tt&gt;: Generates a Breuer state, which is a specific family of bound entangled states on even local dimensions<br /> * &lt;tt&gt;[[ChessboardState]]&lt;/tt&gt;: Produces a chessboard state<br /> * &lt;tt&gt;[[GisinState]]&lt;/tt&gt;: Generates a 2-qubit Gisin state<br /> * &lt;tt&gt;[[HorodeckiState]]&lt;/tt&gt;: Generates a bound entangled &quot;Horodecki&quot; state<br /> * &lt;tt&gt;[[IsotropicState]]&lt;/tt&gt;: Produces an isotropic state<br /> * &lt;tt&gt;[[WernerState]]&lt;/tt&gt;: Produces a Werner state<br /> <br /> ===Other operators===<br /> * &lt;tt&gt;[[FourierMatrix]]&lt;/tt&gt;: Generates the unitary matrix that implements the quantum Fourier transform<br /> * &lt;tt&gt;[[GellMann]]&lt;/tt&gt;: Produces a Gell-Mann operator<br /> * &lt;tt&gt;[[GenGellMann]]&lt;/tt&gt;: Produces a generalized Gell-Mann operator<br /> * &lt;tt&gt;[[GenPauli]]&lt;/tt&gt;: Produces a generalized Pauli operator (sometimes called a Weyl operator)<br /> * &lt;tt&gt;[[Pauli]]&lt;/tt&gt;: Produces a Pauli operator<br /> <br /> ==Superoperators==<br /> * &lt;tt&gt;[[ApplyMap]]&lt;/tt&gt;: Applies a superoperator to an operator<br /> * &lt;tt&gt;[[ChoiMatrix]]&lt;/tt&gt;: Computes the Choi matrix of a superoperator<br /> * &lt;tt&gt;[[ChoiMap]]&lt;/tt&gt;: Produces the Choi map or one of its generalizations<br /> * &lt;tt&gt;[[ComplementaryMap]]&lt;/tt&gt;: Computes the complementary map of a superoperator<br /> * &lt;tt&gt;[[DephasingChannel]]&lt;/tt&gt;: Produces a dephasing channel<br /> * &lt;tt&gt;[[DepolarizingChannel]]&lt;/tt&gt;: Produces a depolarizing channel<br /> * &lt;tt&gt;[[DualMap]]&lt;/tt&gt;: Computes the dual of a superoperator in the Hilbert-Schmidt inner product<br /> * &lt;tt&gt;[[IsCP]]&lt;/tt&gt;: Determines whether or not a superoperator is completely positive<br /> * &lt;tt&gt;[[IsHermPreserving]]&lt;/tt&gt;: Determines whether or not a superoperator is Hermiticity preserving<br /> * &lt;tt&gt;[[KrausOperators]]&lt;/tt&gt;: Computes a set of Kraus operators for a superoperator<br /> * &lt;tt&gt;[[PartialMap]]&lt;/tt&gt;: Applies a superoperator to a subsystem of an operator<br /> * &lt;tt&gt;[[PartialTrace]]&lt;/tt&gt;: Computes the partial trace of a matrix<br /> * &lt;tt&gt;[[PartialTranspose]]&lt;/tt&gt;: Computes the partial transpose of a matrix<br /> * &lt;tt&gt;[[PauliChannel]]&lt;/tt&gt;: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)<br /> * &lt;tt&gt;[[Realignment]]&lt;/tt&gt;: Computes the realignment of a bipartite operator<br /> * &lt;tt&gt;[[ReductionMap]]&lt;/tt&gt;: Produces the reduction map<br /> * &lt;tt&gt;[[Twirl]]&lt;/tt&gt;: Twirls a bipartite or multipartite operator<br /> <br /> ==Unextendible product bases==<br /> * &lt;tt&gt;[[IsUPB]]&lt;/tt&gt;: Determines whether or not a set of product vectors form a UPB<br /> * &lt;tt&gt;[[MinUPBSize]]&lt;/tt&gt;: Gives the minimum cardinality of an unextendible product basis in given dimensions<br /> * &lt;tt&gt;[[UPB]]&lt;/tt&gt;: Generates an unextendible product basis<br /> <br /> ==Miscellaneous==<br /> * &lt;tt&gt;[[Commutant]]&lt;/tt&gt;: Computes the commutant of a set of matrices<br /> * &lt;tt&gt;[[IsTotallyNonsingular]]&lt;/tt&gt;: Determines whether or not a matrix is totally nonsingular<br /> * &lt;tt&gt;[[IsTotallyPositive]]&lt;/tt&gt;: Determines whether or not a matrix is totally positive<br /> * &lt;tt&gt;[[Majorizes]]&lt;/tt&gt;: Determines whether or not a vector or matrix majorizes another<br /> * &lt;tt&gt;[[OperatorSinkhorn]]&lt;/tt&gt;: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity<br /> * &lt;tt&gt;[[Purity]]&lt;/tt&gt;: Computes the purity of a quantum state<br /> <br /> ==Helper functions==<br /> These are functions that only serve auxiliary roles within other functions of QETLAB. As an end-user of QETLAB, you likely won't have any use for these functions, but they are listed here anyway just in case.<br /> 8 &lt;tt&gt;[[dec_to_bin]]: Converts a decimal number to a binary number in a similar way to dec2bin' in MATLAB<br /> * &lt;tt&gt;[[iden]]&lt;/tt&gt;: Computes a sparse or full identity matrix<br /> * &lt;tt&gt;[[jacobi_poly]]&lt;/tt&gt;: Computes the coefficients of Jacobi polynomials<br /> * &lt;tt&gt;[[normalize_cols]]&lt;/tt&gt;: Scales the columns of a matrix to have norm 1<br /> * &lt;tt&gt;[[one_factorization]]&lt;/tt&gt;: Computes a 1-factorization of a list of objects<br /> * &lt;tt&gt;[[opt_args]]&lt;/tt&gt;: Handles optional input arguments for functions<br /> * &lt;tt&gt;[[opt_disp]]&lt;/tt&gt;: Display a message to the user (sometimes)<br /> * &lt;tt&gt;[[perfect_matchings]]&lt;/tt&gt;: Gives all perfect matchings of N objects<br /> * &lt;tt&gt;[[perm_inv]]&lt;/tt&gt;: Computes the inverse of a permutation<br /> * &lt;tt&gt;[[perm_sign]]&lt;/tt&gt;: Computes the sign of a permutation<br /> * &lt;tt&gt;[[pure_to_mixed]]&lt;/tt&gt;: Converts a state vector or density matrix representation of a state to a density matrix<br /> * &lt;tt&gt;[[sk_iterate]]&lt;/tt&gt;: Computes a lower bound of the S(k)-norm of an operator<br /> * &lt;tt&gt;[[spnull]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the null space<br /> * &lt;tt&gt;[[sporth]]&lt;/tt&gt;: Returns a sparse orthonormal basis for the range<br /> * &lt;tt&gt;[[superoperator_dims]]&lt;/tt&gt;: Computes the input, output, and environment dimensions of a superoperator<br /> * &lt;tt&gt;[[unique_perms]]&lt;/tt&gt;: Computes all distinct permutations of a given vector<br /> * &lt;tt&gt;[[update_odometer]]&lt;/tt&gt;: Increases the entries of a vector subject to constraints on how large the entries of that vector can be<br /> * &lt;tt&gt;[[vec_partitions]]&lt;/tt&gt;: Produces all possible partitions of a vector</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=DiamondNorm&diff=917 DiamondNorm 2018-06-13T16:40:10Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=DiamondNorm<br /> |desc=Computes the [[diamond norm]] of a superoperator<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[CBNorm]]&lt;br /&gt;[[InducedSchattenNorm]]&lt;br /&gt;[[MaximumOutputFidelity]]<br /> |cat=[[List of functions#Norms|Norms]]<br /> |upd=November 21, 2014<br /> |cvx=yes (convex)}}<br /> &lt;tt&gt;'''DiamondNorm'''&lt;/tt&gt; is a [[List of functions|function]] that computes the diamond norm $\|\Phi\|_\diamond$ of a superoperator $\Phi$.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;DN = DiamondNorm(PHI)&lt;/tt&gt;<br /> * &lt;tt&gt;DN = DiamondNorm(PHI,DIM)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;PHI&lt;/tt&gt;: A superoperator. Should be provided as either a Choi matrix, or as a cell with either 1 or 2 columns (see the [[tutorial]] page for more details about specifying superoperators within QETLAB). &lt;tt&gt;PHIC&lt;/tt&gt; will be a cell of Kraus operators if &lt;tt&gt;PHI&lt;/tt&gt; is a cell of Kraus operators, and similarly &lt;tt&gt;PHIC&lt;/tt&gt; will be a Choi matrix if &lt;tt&gt;PHI&lt;/tt&gt; is a Choi matrix.<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, default has input and output spaces of equal dimension): A 1-by-2 vector containing the input and output dimensions of &lt;tt&gt;PHI&lt;/tt&gt;, in that order (equivalently, these are the dimensions of the first and second subsystems of the Choi matrix &lt;tt&gt;PHI&lt;/tt&gt;, in that order). If the input or output space is not square, then &lt;tt&gt;DIM&lt;/tt&gt;'s first row should contain the input and output row dimensions, and its second row should contain its input and output column dimensions. &lt;tt&gt;DIM&lt;/tt&gt; is required if and only if &lt;tt&gt;PHI&lt;/tt&gt; has unequal input and output dimensions and is provided as a Choi matrix.<br /> <br /> ==Examples==<br /> ===A completely positive map===<br /> If $\Phi$ is completely positive then $\|\Phi\|_{\diamond} = \|\Phi^\dagger(I)\|$, where $I$ is the identity matrix, $\Phi^\dagger$ is the dual map of $\Phi$, and $\|\cdot\|$ is the usual operator norm, which we can verify in a special case via the following code:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; Phi = {[1 2;3 4] ; [0 1;2 0] ; [1 1;-1 3]};<br /> &gt;&gt; DiamondNorm(Phi)<br /> <br /> ans =<br /> <br /> 37.6510<br /> <br /> &gt;&gt; norm(ApplyMap(eye(2),DualMap(Phi)))<br /> <br /> ans =<br /> <br /> 37.6510<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===A difference of unitaries channel===<br /> If $\Phi(X) = X - UXU^\dagger$, then the diamond norm of $\Phi$ is the diameter of the smallest circle that contains the eigenvalues of $U$, which we can verify in a special case via the following code:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; U = [1 1;-1 1]/sqrt(2);<br /> &gt;&gt; Phi = {eye(2),eye(2); U,-U};<br /> &gt;&gt; DiamondNorm(Phi)<br /> <br /> ans =<br /> <br /> 1.4142<br /> <br /> &gt;&gt; lam = eig(U)<br /> <br /> lam =<br /> <br /> 0.7071 + 0.7071i<br /> 0.7071 - 0.7071i<br /> <br /> &gt;&gt; abs(lam(1) - lam(2))<br /> <br /> ans =<br /> <br /> 1.4142<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Can be used within CVX===<br /> The diamond norm is convex (like all norms) and this function can be used in the same way as any other convex function within CVX. Thus you can minimize the diamond norm or use the diamond norm in constraints of CVX optimization problems. For example, the following code finds the closest Pauli channel (i.e., channel with Kraus operators all of which are multiples of Pauli matrices) to a given 2-qubit channel, where the measure of &quot;closest&quot; is the diamond norm:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; num_qubits = 2;<br /> &gt;&gt; H = [1,1;1,-1]/sqrt(2); % Hadamard gate<br /> &gt;&gt; Psi = ChoiMatrix({Tensor(H,num_qubits)}); % channel that acts as Hadamard gate on 2 qubits<br /> &gt;&gt; cvx_begin sdp quiet<br /> variable Phi(4^num_qubits,4^num_qubits) hermitian;<br /> variable p(4^num_qubits);<br /> <br /> minimize DiamondNorm(Phi - Psi)<br /> <br /> subject to<br /> % these constraints force Phi to be a Pauli channel<br /> Phi == PauliChannel(p);<br /> sum(p) == 1;<br /> p &gt;= 0;<br /> cvx_end<br /> cvx_optval<br /> <br /> cvx_optval =<br /> <br /> 1.5000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> {{SourceCode|name=DiamondNorm}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=CBNorm&diff=916 CBNorm 2018-06-13T16:39:54Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=CBNorm<br /> |desc=Computes the completely bounded norm of a superoperator<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[DiamondNorm]]&lt;br /&gt;[[InducedSchattenNorm]]<br /> |cat=[[List of functions#Norms|Norms]]<br /> |upd=November 21, 2014<br /> |cvx=yes (convex)}}<br /> &lt;tt&gt;'''CBNorm'''&lt;/tt&gt; is a [[List of functions|function]] that computes the completely bounded (CB) norm $\|\Phi\|_{cb}$ of a superoperator $\Phi$.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;CB = CBNorm(PHI)&lt;/tt&gt;<br /> * &lt;tt&gt;CB = CBNorm(PHI,DIM)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;PHI&lt;/tt&gt;: A superoperator. Should be provided as either a Choi matrix, or as a cell with either 1 or 2 columns (see the [[tutorial]] page for more details about specifying superoperators within QETLAB).<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, default has input and output spaces of equal dimension): A 1-by-2 vector containing the input and output dimensions of &lt;tt&gt;PHI&lt;/tt&gt;, in that order (equivalently, these are the dimensions of the first and second subsystems of the Choi matrix &lt;tt&gt;PHI&lt;/tt&gt;, in that order). If the input or output space is not square, then &lt;tt&gt;DIM&lt;/tt&gt;'s first row should contain the input and output row dimensions, and its second row should contain its input and output column dimensions. &lt;tt&gt;DIM&lt;/tt&gt; is required if and only if &lt;tt&gt;PHI&lt;/tt&gt; has unequal input and output dimensions and is provided as a Choi matrix.<br /> <br /> ==Examples==<br /> ===Relationship with the diamond norm===<br /> The CB norm of a superoperator $\Phi$ is equal to the diamond norm of the dual map $\Phi^\dagger$:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; Phi = {[1 2;3 4],[0 1;1 0] ; [0 1;2 0],[1 1;1 1] ; [1 1;-1 3],[1 4;0 0]};<br /> &gt;&gt; CBNorm(Phi)<br /> <br /> ans =<br /> <br /> 19.5928<br /> <br /> &gt;&gt; DiamondNorm(DualMap(Phi))<br /> <br /> ans =<br /> <br /> 19.5928<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Can be used in CVX===<br /> Just like the &lt;tt&gt;[[DiamondNorm]]&lt;/tt&gt; function, &lt;tt&gt;CBNorm&lt;/tt&gt; is a convex function that can be used within CVX optimization problems. See the [[DiamondNorm#Can_be_used_within_CVX|example on the &lt;tt&gt;DiamondNorm&lt;/tt&gt; documentation page]].<br /> <br /> {{SourceCode|name=CBNorm}}</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=SkOperatorNorm&diff=915 SkOperatorNorm 2018-06-13T16:39:39Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=SkOperatorNorm<br /> |desc=Computes the S(k)-norm of an operator<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[IsBlockPositive]]&lt;br /&gt;[[SkVectorNorm]]<br /> |cat=[[List of functions#Norms|Norms]]<br /> |upd=September 22, 2014<br /> |cvx=no}}<br /> &lt;tt&gt;'''SkOperatorNorm'''&lt;/tt&gt; is a [[List of functions|function]] that computes the S(k)-norm of an operator&lt;ref&gt;N. Johnston and D. W. Kribs. A Family of Norms With Applications in Quantum Information Theory. ''J. Math. Phys.'', 51:082202, 2010. E-print: [http://arxiv.org/abs/0909.3907 arXiv:0909.3907] [quant-ph]&lt;/ref&gt;&lt;ref&gt;N. Johnston and D. W. Kribs. A Family of Norms With Applications in Quantum Information Theory II. Quantum Information &amp; Computation, 11(1 &amp; 2):104–123, 2011. E-print: [http://arxiv.org/abs/1006.0898 arXiv:1006.0898] [quant-ph]&lt;/ref&gt;:<br /> $$<br /> \|X\|_{S(k)} := \sup_{|v\rangle , |w\rangle } \Big\{ \big| \langle w| X |v \rangle \big| : SR(|v \rangle), SR(|v \rangle) \leq k, \big\||v \rangle\big\| = \big\||w \rangle\big\| = 1 \Big\},<br />$$<br /> where $SR(\cdot)$ refers to the [[SchmidtRank|Schmidt rank]] of a pure state.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;LB = SkOperatorNorm(X)&lt;/tt&gt;<br /> * &lt;tt&gt;LB = SkOperatorNorm(X,K)&lt;/tt&gt;<br /> * &lt;tt&gt;LB = SkOperatorNorm(X,K,DIM)&lt;/tt&gt;<br /> * &lt;tt&gt;LB = SkOperatorNorm(X,K,DIM,STR)&lt;/tt&gt;<br /> * &lt;tt&gt;LB = SkOperatorNorm(X,K,DIM,STR,TARGET)&lt;/tt&gt;<br /> * &lt;tt&gt;LB = SkOperatorNorm(X,K,DIM,STR,TARGET,TOL)&lt;/tt&gt;<br /> * &lt;tt&gt;[LB,~,UB] = SkOperatorNorm(X,K,DIM,STR,TARGET,TOL)&lt;/tt&gt;<br /> * &lt;tt&gt;[LB,LWIT,UB,UWIT] = SkOperatorNorm(X,K,DIM,STR,TARGET,TOL)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> ===Input arguments===<br /> * &lt;tt&gt;X&lt;/tt&gt;: A square matrix acting on bipartite space. Generally, &lt;tt&gt;X&lt;/tt&gt; should be positive semidefinite &amp;ndash; the bounds produced otherwise are quite poor.<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default 1): A positive integer.<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the subsystems that &lt;tt&gt;X&lt;/tt&gt; acts on.<br /> * &lt;tt&gt;STR&lt;/tt&gt; (optional, default 2): An integer that determines how hard the script should work to compute the lower and upper bounds (&lt;tt&gt;STR = -1&lt;/tt&gt; means that the script won't stop working until the bounds match each other). Other valid values are &lt;tt&gt;0, 1, 2, 3, ...&lt;/tt&gt;. In practice, if &lt;tt&gt;STR &gt;= 4&lt;/tt&gt; then most computers will run out of memory and/or the sun will explode before computation completes.<br /> * &lt;tt&gt;TARGET&lt;/tt&gt; (optional, default -1): A value that you wish to prove that the norm is above or below. If, at any point while this script is running, it proves that &lt;tt&gt;LB &gt;= TARGET&lt;/tt&gt; or that &lt;tt&gt;UB &lt;= TARGET&lt;/tt&gt;, then the script will immediately abort and return the best lower bound and upper bound computed up to that point. This is a time-saving feature that can be avoided by setting &lt;tt&gt;TARGET = -1&lt;/tt&gt;.<br /> * &lt;tt&gt;TOL&lt;/tt&gt; (optional, default &lt;tt&gt;eps^(3/8)&lt;/tt&gt;): The numerical tolerance used throughout the script.<br /> <br /> ===Output arguments===<br /> * &lt;tt&gt;LB&lt;/tt&gt;: A lower bound of the S(k)-operator norm of &lt;tt&gt;X&lt;/tt&gt;.<br /> * &lt;tt&gt;LWIT&lt;/tt&gt;: A witness that verifies that &lt;tt&gt;LB&lt;/tt&gt; is indeed a lower bound of the S(k)-operator norm of &lt;tt&gt;X&lt;/tt&gt;. More specifically, &lt;tt&gt;LWIT&lt;/tt&gt; is a unit vector such that &lt;tt&gt;SchmidtRank(LWIT,DIM) &lt;= K&lt;/tt&gt; and &lt;tt&gt;LWIT'*X*LWIT = LB&lt;/tt&gt;.<br /> * &lt;tt&gt;UB&lt;/tt&gt;: An upper bound of the S(k)-operator norm of &lt;tt&gt;X&lt;/tt&gt;.<br /> * &lt;tt&gt;UWIT&lt;/tt&gt;: A witness that verifies that &lt;tt&gt;UB&lt;/tt&gt; is indeed an upper bound of the S(k)-operator norm of &lt;tt&gt;X&lt;/tt&gt;. More specifically, &lt;tt&gt;UWIT&lt;/tt&gt; is a feasible point of the dual semidefinite program presented in Section&amp;nbsp;5.2.3 of &lt;ref name=&quot;nj_thesis&quot;&gt;N. Johnston. Norms and Cones in the Theory of Quantum Entanglement. PhD thesis, University of Guelph, 2012. E-print: [http://arxiv.org/abs/1207.1479 arXiv:1207.1479] [quant-ph]&lt;/ref&gt;.<br /> <br /> ==Examples==<br /> ===Exact computation in small dimensions===<br /> When &lt;tt&gt;X&lt;/tt&gt; lives in $M_2 \otimes M_2$, $M_2 \otimes M_3$, or $M_3 \otimes M_2$ (i.e., when &lt;tt&gt;prod(DIM) &lt;= 6&lt;/tt&gt;), the script is guaranteed to compute the exact value of $\|X\|_{S(1)}$:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; X = [5 1 1 1;1 1 1 1;1 1 1 1;1 1 1 1]/8;<br /> &gt;&gt; SkOperatorNorm(X)<br /> <br /> ans =<br /> <br /> 0.7286<br /> &lt;/syntaxhighlight&gt;<br /> <br /> The fact that this computation is correct is illustrated in Example 5.2.11 of &lt;ref name=&quot;nj_thesis&quot;&gt;&lt;/ref&gt;, where it was shown that the S(1)-norm is exactly $(3 + 2\sqrt{2})/8 \approx 0.7286$. However, if we were still unconvinced, we could request witnesses that verify that 0.7286 is both a lower bound and an upper bound of the S(1)-norm:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; [lb,lwit,ub,uwit] = SkOperatorNorm(X)<br /> <br /> lb =<br /> <br /> 0.7286<br /> <br /> <br /> lwit =<br /> <br /> 0.8536 + 0.0000i<br /> 0.3536 - 0.0000i<br /> 0.3536 + 0.0000i<br /> 0.1464 <br /> <br /> <br /> ub =<br /> <br /> 0.7286<br /> <br /> <br /> uwit =<br /> <br /> 0.0518 + 0.0000i -0.0625 + 0.0000i -0.0625 - 0.0000i -0.1250 - 0.0000i<br /> -0.0625 - 0.0000i 0.3018 + 0.0000i 0.0000 + 0.0000i -0.0625 - 0.0000i<br /> -0.0625 + 0.0000i 0.0000 - 0.0000i 0.3018 + 0.0000i -0.0625 + 0.0000i<br /> -0.1250 + 0.0000i -0.0625 + 0.0000i -0.0625 - 0.0000i 0.3018 + 0.0000i<br /> <br /> &gt;&gt; lwit'*X*lwit % verify that the lower bound is correct<br /> <br /> ans =<br /> <br /> 0.7286 + 0.0000i<br /> <br /> &gt;&gt; norm(X + uwit) % verify that the upper bound is correct<br /> <br /> ans =<br /> <br /> 0.7286<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Only interested in the lower and upper bounds; not the witnesses===<br /> If all you want are the lower and upper bounds, but don't require the witnesses &lt;tt&gt;LWIT&lt;/tt&gt; and &lt;tt&gt;UWIT&lt;/tt&gt;, you can use code like the following. Note that in this case, $\|X\|_{S(1)}$ is computed exactly, as the lower and upper bound are equal (though this will not happen for all &lt;tt&gt;X&lt;/tt&gt;!). However, all we know about $\|X\|_{S(2)}$ is that it lies in the interval [0.3522, 0.3546]. It is unsurprising that $\|X\|_{S(3)}$ is the usual operator norm of &lt;tt&gt;X&lt;/tt&gt;, since this is always the case when &lt;tt&gt;K &gt;= min(DIM)&lt;/tt&gt;.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; X = RandomDensityMatrix(9);<br /> &gt;&gt; [lb,~,ub] = SkOperatorNorm(X,1)<br /> <br /> lb =<br /> <br /> 0.2955<br /> <br /> <br /> ub =<br /> <br /> 0.2955<br /> <br /> &gt;&gt; [lb,~,ub] = SkOperatorNorm(X,2)<br /> <br /> lb =<br /> <br /> 0.3522<br /> <br /> <br /> ub =<br /> <br /> 0.3546<br /> <br /> &gt;&gt; [lb,~,ub] = SkOperatorNorm(X,3)<br /> <br /> lb =<br /> <br /> 0.3770<br /> <br /> <br /> ub =<br /> <br /> 0.3770<br /> <br /> &gt;&gt; norm(X)<br /> <br /> ans =<br /> <br /> 0.3770<br /> &lt;/syntaxhighlight&gt;<br /> <br /> {{SourceCode|name=SkOperatorNorm}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=XORGameValue&diff=914 XORGameValue 2018-06-13T16:39:01Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=XORGameValue<br /> |desc=Computes the classical or quantum value of a nonlocal binary XOR game<br /> |rel=[[BCSGameValue]]&lt;br /&gt;[[BellInequalityMax]]&lt;br /&gt;[[NonlocalGameValue]]<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |cat=[[List of functions#Nonlocality_and_Bell_inequalities|Nonlocality and Bell inequalities]]<br /> |upd=January 15, 2015}}<br /> &lt;tt&gt;'''XORGameValue'''&lt;/tt&gt; is a [[List of functions|function]] that computes the classical or quantum value of a nonlocal binary XOR game. That is, it computes the optimal probability of two parties (Alice and Bob) winning such a game, assuming that they can communicate before the game, but not during the game, and either (1) they cannot share entanglement, or (2) they can share entanglement.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;VAL = XORGameValue(P,F)&lt;/tt&gt;<br /> * &lt;tt&gt;VAL = XORGameValue(P,F,VTYPE)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;P&lt;/tt&gt;: A matrix whose (s,t)-entry gives the probability that the referee will give Alice the value s and Bob the value t. The sum of all entries of this matrix must be 1.<br /> * &lt;tt&gt;F&lt;/tt&gt;: A binary matrix (of the same size as &lt;tt&gt;P&lt;/tt&gt;) whose (s,t)-entry indicates the winning choice (either 0 or 1) when Alice and Bob receive values s and t from the referee.<br /> * &lt;tt&gt;VTYPE&lt;/tt&gt; (optional, default &lt;tt&gt;'classical'&lt;/tt&gt;): One of 'classical' or 'quantum', indicating whether or not Alice and Bob can use quantum strategies (i.e., shared entanglement).<br /> <br /> ==Examples==<br /> ===The CHSH game===<br /> The CHSH game&lt;ref&gt;John Watrous. [https://cs.uwaterloo.ca/~watrous/CPSC519/LectureNotes/20.pdf Lecture 20: Bell inequalities and nonlocality], ''Quantum Computation Lecture Notes'', 2006.&lt;/ref&gt; is a game in which the referee (uniformly at random) gives each of Alice and Bob a single bit, and Alice and Bob win if the XOR of their responses is the AND of the bits received by the referee. That is, Alice and Bob want the XOR of their responses to be 1 if and only if they both received a 1 from the referee.<br /> <br /> It is well-known that the maximum probability of winning this game if Alice and Bob share entanglement is $\cos^2(\pi/8)$, whereas the maximum probability of winning this game without entanglement is $3/4$. The following code demonstrates this fact: the &lt;tt&gt;p&lt;/tt&gt; matrix has each entry &lt;tt&gt;1/4&lt;/tt&gt; because each of the 4 possible combinations of bits from the referee are equally likely, and the matrix &lt;tt&gt;f&lt;/tt&gt; equals &lt;tt&gt;[0 0;0 1]&lt;/tt&gt; because Alice and Bob want the XOR of their answers to be 1 only when they both receive a 1 from the referee (the first row of the matrix corresponds to Alice receiving a 0, the second row of the matrix corresponds to Alice receiving a 1, and the columns are similar for Bob).<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = [1/4 1/4;1/4 1/4];<br /> &gt;&gt; f = [0 0;0 1];<br /> &gt;&gt; XORGameValue(p,f,'quantum')<br /> <br /> ans =<br /> <br /> 0.8536<br /> <br /> &gt;&gt; cos(pi/8)^2 % compare the answer to the known theoretical answer<br /> <br /> ans =<br /> <br /> 0.8536<br /> <br /> &gt;&gt; XORGameValue(p,f,'classical') % compare to the classical value of this game<br /> <br /> ans =<br /> <br /> 0.7500<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The odd cycles game===<br /> The odd cycles game&lt;ref&gt;R. Cleve, P. Hoyer, B. Toner, and J. Watrous. Consequences and limits of nonlocal strategies. In ''Proceedings of 19th IEEE Conference on Computational Complexity (CCC 2004)''. E-print: [http://arxiv.org/abs/quant-ph/0404076 arXiv:quant-ph/0404076]&lt;/ref&gt; is a game where Alice and Bob try to convince the referee that an cycle of length n has a 2-coloring, which is impossible when n is odd. The referee gives each of Alice and Bob a number from 1 to n (representing the n different vertices of the n-cycle), and Alice and Bob respond with a color (0 or 1). They win the game if either (1) the referee gave Alice and Bob the same number and Alice and Bob's responses are the same; or (2) the referee gave Alice and Bob numbers that differ by 1 (corresponding to adjacent vertices) and Alice and Bob's responses are different. Otherwise, they lose the game.<br /> <br /> If $n$ is odd, it is known that the maximum probability of winning this game with shared entanglement is $\cos^2(\pi/4n)$, whereas the maximum probability of winning this game without entanglement is $1 - 1/(2n)$. These facts are verified by the following code when $n = 5$:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; n = 5;<br /> &gt;&gt; % first compute the probability matrix (see the cited paper for details)<br /> &gt;&gt; p = diag(ones(1,n))/(2*n) + circshift(diag(ones(1,n)),-1)/(2*n)<br /> <br /> p =<br /> <br /> 0.1000 0.1000 0 0 0<br /> 0 0.1000 0.1000 0 0<br /> 0 0 0.1000 0.1000 0<br /> 0 0 0 0.1000 0.1000<br /> 0.1000 0 0 0 0.1000<br /> <br /> &gt;&gt; % now we specify the winning condition matrix<br /> &gt;&gt; f = circshift(diag(ones(1,n)),-1)<br /> <br /> f =<br /> <br /> 0 1 0 0 0<br /> 0 0 1 0 0<br /> 0 0 0 1 0<br /> 0 0 0 0 1<br /> 1 0 0 0 0<br /> <br /> &gt;&gt; XORGameValue(p,f,'quantum')<br /> <br /> ans =<br /> <br /> 0.9755<br /> <br /> &gt;&gt; cos(pi/(4*n))^2 % compare the answer to the known theoretical answer<br /> <br /> ans =<br /> <br /> 0.9755<br /> <br /> &gt;&gt; XORGameValue(p,f,'classical') % compare to the classical value of this game<br /> <br /> ans =<br /> <br /> 0.9000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> {{SourceCode|name=XORGameValue}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=NonlocalGameValue&diff=913 NonlocalGameValue 2018-06-13T16:38:43Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=NonlocalGameValue<br /> |desc=Computes the maximum value of a two-player non-local game<br /> |rel=[[BCSGameValue]]&lt;br /&gt;[[BellInequalityMax]]&lt;br /&gt;[[NPAHierarchy]]&lt;br /&gt;[[XORGameValue]]<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |cat=[[List of functions#Nonlocality_and_Bell_inequalities|Nonlocality and Bell inequalities]]<br /> |upd=March 6, 2015<br /> |cvx=no}}<br /> &lt;tt&gt;'''NonlocalGameValue'''&lt;/tt&gt; is a [[List of functions|function]] that computes the maximum possible value of a given non-local game under either classical mechanics, quantum mechanics, or general no-signalling theories. In the classical and non-signalling cases, an exact value is computed, whereas the value computed in the quantum case is only an upper bound (found using the [[NPAHierarchy|NPA hierarchy]]).<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;NGVAL = NonlocalGameValue(P,V)&lt;/tt&gt;<br /> * &lt;tt&gt;NGVAL = NonlocalGameValue(P,V,MTYPE)&lt;/tt&gt;<br /> * &lt;tt&gt;NGVAL = NonlocalGameValue(P,V,MTYPE,K)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;P&lt;/tt&gt;: A probability matrix whose $(x,y)$-entry gives the probability that the referee asks Alice question $x$ and Bob question $y$.<br /> * &lt;tt&gt;V&lt;/tt&gt;: A 4-D array whose $(a,b,x,y)$-entry gives the value awarded to Alice and Bob if they reply with answers $(a,b)$ to questions $(x,y)$.<br /> * &lt;tt&gt;MTYPE&lt;/tt&gt; (optional, default &lt;tt&gt;'classical'&lt;/tt&gt;): A string indicating which type of theory should be used when computing the maximum value of the non-local game. Must be one of &lt;tt&gt;'classical'&lt;/tt&gt;, &lt;tt&gt;'quantum'&lt;/tt&gt;, or &lt;tt&gt;'nosignal'&lt;/tt&gt;. If &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt; then only an upper bound on the non-local game is computed, not necessarily the ''best'' upper bound (see the argument &lt;tt&gt;K&lt;/tt&gt; below).<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default &lt;tt&gt;1&lt;/tt&gt;): If &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt; then this is a non-negative integer indicating what level of the NPA hierarchy should be used when bounding the value of the non-local game. Higher values of &lt;tt&gt;K&lt;/tt&gt; give better bounds, but require more memory and time. Alternatively, &lt;tt&gt;K&lt;/tt&gt; can be a string of a form like &lt;tt&gt;'1+ab+aab'&lt;/tt&gt;, which indicates that an intermediate level of the hierarchy should be used, where this example uses all products of 1 measurement, all products of one Alice and one Bob measurement, and all products of two Alice and one Bob measurement. Use plus signs to separate the different categories of products, as above. The first character of this string should always be a number, indicating the base level to use. If &lt;tt&gt;MTYPE&lt;/tt&gt; is anything other than &lt;tt&gt;'quantum'&lt;/tt&gt; then &lt;tt&gt;K&lt;/tt&gt; has no effect.<br /> <br /> ==Examples==<br /> ===The CHSH inequality===<br /> One formulation of the [http://en.wikipedia.org/wiki/CHSH_inequality CHSH inequality]&lt;ref&gt;J.F. Clauser, M.A. Horne, A. Shimony, R.A. Holt. Proposed experiment to test local hidden-variable theories. &lt;em&gt;Phys. Rev. Lett.&lt;/em&gt;, 23(15):880&amp;ndash;884, 1969.&lt;/ref&gt; is as follows:<br /> * A referee asks Alice a question $x \in \{0,1\}$ and Bob a question $y \in \{0,1\}$.<br /> * Alice and Bob then reply with answers $a \in \{0,1\}$ and $b \in \{0,1\}$ respectively.<br /> * Alice and Bob win if and only if $a \oplus b = xy$.<br /> The optimal probability with which Alice and Bob can win this game in classical, quantum, and no-signalling theories are as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; d = 2;<br /> &gt;&gt; p = ones(d,d)/d^2;<br /> &gt;&gt; V = zeros(d,d,d,d);<br /> &gt;&gt; for a = 1:d<br /> for b = 1:d<br /> for x = 1:d<br /> for y = 1:d<br /> if(mod(a+b+x*y,d)==0)<br /> V(a,b,x,y) = 1;<br /> end<br /> end<br /> end<br /> end<br /> end<br /> &gt;&gt; NonlocalGameValue(p,V,'classical')<br /> <br /> ans =<br /> <br /> 0.7500<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'quantum',1)<br /> <br /> ans =<br /> <br /> 0.8536<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'nosignal')<br /> <br /> ans =<br /> <br /> 1.0000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The CHSH-d inequality===<br /> A generalization of the CHSH inequality to higher dimensions is exactly as above, except each of $a,b,x,y$ are taken from the set $\{0,1,\ldots,d-1\}$.&lt;ref&gt;M. Howard. Maximum nonlocality and minimum uncertainty using magic states. E-print: [http://arxiv.org/abs/1501.05319 arXiv:arXiv:1501.05319] [quant-ph], 2015.&lt;/ref&gt; The following code computes the values of the CHSH-3 game:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; d = 3;<br /> &gt;&gt; p = ones(d,d)/d^2;<br /> &gt;&gt; V = zeros(d,d,d,d);<br /> &gt;&gt; for a = 1:d<br /> for b = 1:d<br /> for x = 1:d<br /> for y = 1:d<br /> if(mod(a+b+x*y,d)==0)<br /> V(a,b,x,y) = 1;<br /> end<br /> end<br /> end<br /> end<br /> end<br /> &gt;&gt; NonlocalGameValue(p,V,'classical')<br /> <br /> ans =<br /> <br /> 0.6667<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'quantum',1)<br /> <br /> ans =<br /> <br /> 0.7182<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'quantum',2)<br /> <br /> ans =<br /> <br /> 0.7182<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'quantum','2+aab')<br /> <br /> ans =<br /> <br /> 0.7124<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'nosignal')<br /> <br /> ans =<br /> <br /> 1.0000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The Fortnow-Feige-Lovász game===<br /> The Fortnow-Feige-Lovász (FFL) game&lt;ref&gt;U. Feige, L. Lovász, In Proceedings of the 24th ACM STOC, pages 733-744, 1992.&lt;/ref&gt;&lt;ref&gt;L. Fortnow, PhD thesis, Massachusetts Institute of Technology, Technical Report MIT/LCS/TR-447, May 1989.&lt;/ref&gt; is well-known example of a non-local game for which perfect parallel repetition does not hold (i.e., quantum players playing two copies of the game in parallel can do better than they can by playing the games in succession).<br /> <br /> The game has binary inputs and outputs, and is defined by the rule that the referee asks Alice and Bob the question pair $(x,y) = (0,0)$, $(0,1)$, or $(1,0)$ with probability $1/3$ each, and Alice and Bob win if and only if their answers satisfy $x \vee a \neq y \vee b$, where $\vee$ denotes the bitwise OR operation.<br /> <br /> It is known that both the classical value and quantum value of this game equal $2/3$, which we can verify as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = [1 1;1 0]/3;<br /> &gt;&gt; V = zeros(2,2,2,2);<br /> &gt;&gt; for a = 1:2<br /> for b = 1:2<br /> for x = 1:2<br /> for y = 1:2<br /> if(max(x,a) ~= max(y,b))<br /> V(a,b,x,y) = 1;<br /> end<br /> end<br /> end<br /> end<br /> end<br /> &gt;&gt; NonlocalGameValue(p,V,'classical')<br /> <br /> ans =<br /> <br /> 0.6667<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'quantum',1)<br /> <br /> ans =<br /> <br /> 0.6667<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ====Parallel repetition====<br /> In fact, we can even compute the classical and quantum values of two copies of the FFL game being run in parallel: we simply specify the &lt;tt&gt;REPT&lt;/tt&gt; input argument to be 2:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; NonlocalGameValue(p,V,'classical',1,2)<br /> <br /> ans =<br /> <br /> 0.6667<br /> <br /> &gt;&gt; NonlocalGameValue(p,V,'quantum',1,2)<br /> <br /> ans =<br /> <br /> 0.6667<br /> &lt;/syntaxhighlight&gt;<br /> Indeed, the fact that both of these values also equal $2/3$ is a known fact &lt;ref&gt;R. Cleve, W. Slofstra, F. Unger, and S. Upadhyay. Perfect parallel repetition theorem for quantum XOR proof systems. ''Computational Complexity'', 17:282&amp;ndash;299, 2008. E-print: [http://arxiv.org/abs/quant-ph/0608146 arXiv:quant-ph/0608146]&lt;/ref&gt;. Note that in the command &lt;tt&gt;NonlocalGameValue(p,V,'classical',1,2)&lt;/tt&gt;, the &quot;1&quot; that is provided as the value of &lt;tt&gt;K&lt;/tt&gt; does not do anything: it is simply provided as a placeholder so that we can set &lt;tt&gt;REPT = 2&lt;/tt&gt; in the next input argument (e.g., we could have just as well entered the command &lt;tt&gt;NonlocalGameValue(p,V,'classical',9873,2)&lt;/tt&gt;, and the same calculation would have been carried out).<br /> <br /> {{SourceCode|name=NonlocalGameValue}}<br /> <br /> ==Notes==<br /> In practice, &lt;tt&gt;K&lt;/tt&gt; probably can't be any larger than 4 when &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt;, due to memory and time restrictions.<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=BellInequalityMaxQubits&diff=912 BellInequalityMaxQubits 2018-06-13T16:38:29Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=BellInequalityMaxQubits<br /> |desc=Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings<br /> |rel=[[BellInequalityMax]]&lt;br /&gt;[[NonlocalGameValue]]&lt;br /&gt;[[XORGameValue]]<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |cat=[[List of functions#Nonlocality_and_Bell_inequalities|Nonlocality and Bell inequalities]]<br /> |cvx=no}}<br /> &lt;tt&gt;'''BellInequalityMaxQubits'''&lt;/tt&gt; is a [[List of functions|function]] that computes an upper bound for the maximum possible value of a given [http://en.wikipedia.org/wiki/Bell%27s_theorem Bell inequality] in a quantum mechanical setting where the two parties each have access to qubits (i.e., 2-dimensional quantum systems). This bound is computed using the method presented in &lt;ref name=&quot;NTV14&quot;&gt;M. Navascués, G. de la Torre, and T. Vértesi. Characterization of quantum correlations with local dimension constraints and its device-independent applications. &lt;em&gt;Phys. Rev. X&lt;/em&gt;, 4:011011, 2014. E-print: [http://arxiv.org/abs/1308.3410 arXiv:1308.3410] [quant-ph]&lt;/ref&gt;.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BMAX = BellInequalityMaxQubits(JOINT_COE,A_COE,B_COE,A_VAL,B_VAL)&lt;/tt&gt;<br /> * &lt;tt&gt;[BMAX,RHO] = BellInequalityMaxQubits(JOINT_COE,A_COE,B_COE,A_VAL,B_VAL)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> ===Input arguments===<br /> * &lt;tt&gt;JOINT_COE&lt;/tt&gt;: A matrix whose $(i,j)$-entry gives the coefficient of $\langle A_i B_j \rangle$ in the Bell inequality.<br /> * &lt;tt&gt;A_COE&lt;/tt&gt;: A vector whose $i$-th entry gives the coefficient of $\langle A_i \rangle$ in the Bell inequality.<br /> * &lt;tt&gt;B_COE&lt;/tt&gt;: A vector whose $i$-th entry gives the coefficient of $\langle B_i \rangle$ in the Bell inequality.<br /> * &lt;tt&gt;A_VAL&lt;/tt&gt;: A vector whose $i$-th entry gives the value of the $i$-th measurement result on Alice's side.<br /> * &lt;tt&gt;B_VAL&lt;/tt&gt;: A vector whose $i$-th entry gives the value of the $i$-th measurement result on Bob's side.<br /> <br /> ===Output arguments===<br /> * &lt;tt&gt;BMAX&lt;/tt&gt;: An upper bound on the qubit value of the Bell inequality.<br /> * &lt;tt&gt;RHO&lt;/tt&gt;: A many-qubit quantum state that acts as a witness that verifies the bound provided by &lt;tt&gt;BMAX&lt;/tt&gt;. This is the positive-partial-transpose (PPT) state described by &lt;ref name=&quot;NTV14&quot;&gt;&lt;/ref&gt;.<br /> <br /> ==Examples==<br /> ===The I&lt;sub&gt;3322&lt;/sub&gt; inequality===<br /> The I&lt;sub&gt;3322&lt;/sub&gt; inequality&lt;ref&gt;M. Froissart. Constructive generalization of Bell's inequalities. &lt;em&gt;Nuov. Cim. B&lt;/em&gt;, 64:241, 1981&lt;/ref&gt;&lt;ref&gt;D. Collins and N. Gisin. A relevant two qubit Bell inequality inequivalent to the CHSH inequality. J. Phys. A: Math. Gen., 37(5):1175, 2004. E-print: [http://arxiv.org/abs/quant-ph/0306129 arXiv:quant-ph/0306129]&lt;/ref&gt; is a Bell inequality that says that if $\{A_1,A_2,A_3\}$ and $\{B_1,B_2,B_3\}$ are $\{0,1\}$-valued measurement settings, then in classical physics the following inequality holds:<br /> : &lt;math&gt;\langle A_1 B_1 \rangle + \langle A_1 B_2 \rangle - \langle A_1 B_3 \rangle + \langle A_2 B_1 \rangle + \langle A_2 B_2 \rangle + \langle A_2 B_3 \rangle - \langle A_3 B_1 \rangle + \langle A_3 B_2 \rangle - \langle A_2 \rangle - \langle B_1 \rangle - 2\langle B_2 \rangle \leq 0.&lt;/math&gt;<br /> It is straightforward to check that a 2-qubit maximally-entangled Bell state allows for a value of $1/4$ in this Bell inequality. The following code verifies that it is not possible to get a value of larger than $1/4$ using $2$-dimensional systems:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; BellInequalityMaxQubits([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1])<br /> <br /> ans =<br /> <br /> 0.2500<br /> &lt;/syntaxhighlight&gt;<br /> <br /> It is worth taking a look at the $I_{3322}$ example at the &lt;tt&gt;[[BellInequalityMax]]&lt;/tt&gt; page to compare the computations provided there.<br /> {{SourceCode|name=BellInequalityMaxQubits}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=BellInequalityMax&diff=911 BellInequalityMax 2018-06-13T16:38:14Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=BellInequalityMax<br /> |desc=Computes the maximum value of a Bell inequality<br /> |rel=[[NonlocalGameValue]]&lt;br /&gt;[[NPAHierarchy]]&lt;br /&gt;[[XORGameValue]]<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |cat=[[List of functions#Nonlocality_and_Bell_inequalities|Nonlocality and Bell inequalities]]<br /> |upd=January 22, 2015<br /> |cvx=no}}<br /> &lt;tt&gt;'''BellInequalityMax'''&lt;/tt&gt; is a [[List of functions|function]] that computes the maximum possible value of a given [http://en.wikipedia.org/wiki/Bell%27s_theorem Bell inequality] under either classical mechanics, quantum mechanics, or general no-signalling theories. In the classical and non-signalling cases, an exact value is computed, whereas the value computed in the quantum case is only an upper bound (found using the [[NPAHierarchy|NPA hierarchy]]).<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BMAX = BellInequalityMax(JOINT_COE,A_COE,B_COE,A_VAL,B_VAL)&lt;/tt&gt;<br /> * &lt;tt&gt;BMAX = BellInequalityMax(JOINT_COE,A_COE,B_COE,A_VAL,B_VAL,MTYPE)&lt;/tt&gt;<br /> * &lt;tt&gt;BMAX = BellInequalityMax(JOINT_COE,A_COE,B_COE,A_VAL,B_VAL,MTYPE,K)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;JOINT_COE&lt;/tt&gt;: A matrix whose $(i,j)$-entry gives the coefficient of $\langle A_i B_j \rangle$ in the Bell inequality.<br /> * &lt;tt&gt;A_COE&lt;/tt&gt;: A vector whose $i$-th entry gives the coefficient of $\langle A_i \rangle$ in the Bell inequality.<br /> * &lt;tt&gt;B_COE&lt;/tt&gt;: A vector whose $i$-th entry gives the coefficient of $\langle B_i \rangle$ in the Bell inequality.<br /> * &lt;tt&gt;A_VAL&lt;/tt&gt;: A vector whose $i$-th entry gives the value of the $i$-th measurement result on Alice's side.<br /> * &lt;tt&gt;B_VAL&lt;/tt&gt;: A vector whose $i$-th entry gives the value of the $i$-th measurement result on Bob's side.<br /> * &lt;tt&gt;MTYPE&lt;/tt&gt; (optional, default &lt;tt&gt;'classical'&lt;/tt&gt;): A string indicating which type of theory should be used when computing the maximum value of the Bell inequality. Must be one of &lt;tt&gt;'classical'&lt;/tt&gt;, &lt;tt&gt;'quantum'&lt;/tt&gt;, or &lt;tt&gt;'nosignal'&lt;/tt&gt;. If &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt; then only an upper bound on the Bell inequality is computed, not necessarily is &lt;em&gt;best&lt;/em&gt; upper bound (see the argument &lt;tt&gt;K&lt;/tt&gt; below).<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default &lt;tt&gt;1&lt;/tt&gt;): If &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt; then this is a non-negative integer indicating what level of the NPA hierarchy should be used when bounding the Bell inequality. Higher values of &lt;tt&gt;K&lt;/tt&gt; give better bounds, but require more memory and time. Alternatively, &lt;tt&gt;K&lt;/tt&gt; can be a string of a form like &lt;tt&gt;'1+ab+aab'&lt;/tt&gt;, which indicates that an intermediate level of the hierarchy should be used, where this example uses all products of 1 measurement, all products of one Alice and one Bob measurement, and all products of two Alice and one Bob measurement. Use plus signs to separate the different categories of products, as above. The first character of this string should always be a number, indicating the base level to use. If &lt;tt&gt;MTYPE&lt;/tt&gt; is anything other than &lt;tt&gt;'quantum'&lt;/tt&gt; then &lt;tt&gt;K&lt;/tt&gt; has no effect.<br /> <br /> ==Examples==<br /> ===The CHSH inequality===<br /> One formulation of the [http://en.wikipedia.org/wiki/CHSH_inequality CHSH inequality]&lt;ref&gt;J.F. Clauser, M.A. Horne, A. Shimony, R.A. Holt. Proposed experiment to test local hidden-variable theories. &lt;em&gt;Phys. Rev. Lett.&lt;/em&gt;, 23(15):880&amp;ndash;884, 1969.&lt;/ref&gt; says that if $\{A_1,A_2\}$ and $\{B_1,B_2\}$ are $\{-1,+1\}$-valued measurement settings, then in classical physics the following inequality holds:<br /> : &lt;math&gt;\langle A_1 B_1 \rangle + \langle A_1 B_2 \rangle + \langle A_2 B_1 \rangle - \langle A_2 B_2 \rangle \leq 2.&lt;/math&gt;<br /> Similarly, the best bound on this quantity is $2\sqrt{2}$ in a quantum mechanical setting (this is [http://en.wikipedia.org/wiki/Tsirelson%27s_bound Tsirelson's bound])&lt;ref&gt;B.S. Tsirelson. Quantum generalizations of Bell's inequality. &lt;em&gt;Lett. Math. Phys.&lt;/em&gt;, 4:93, 1980. [http://www.tau.ac.il/~tsirel/download/qbell80.pdf E-print]&lt;/ref&gt;, and it is $4$ in no-signalling theories. All three of these bounds can be found as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; BellInequalityMax([1 1;1 -1], [0 0], [0 0], [-1 1], [-1 1], 'classical')<br /> <br /> ans =<br /> <br /> 2<br /> <br /> &gt;&gt; BellInequalityMax([1 1;1 -1], [0 0], [0 0], [-1 1], [-1 1], 'quantum')<br /> <br /> ans =<br /> <br /> 2.8284<br /> <br /> &gt;&gt; BellInequalityMax([1 1;1 -1], [0 0], [0 0], [-1 1], [-1 1], 'nosignal')<br /> <br /> ans =<br /> <br /> 4.0000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The CHSH inequality again===<br /> Another (equivalent) formulation of the CHSH inequality says that if $\{A_1,A_2\}$ and $\{B_1,B_2\}$ are $\{0,1\}$-valued measurement settings, then in classical physics the following inequality holds:<br /> : &lt;math&gt;\langle A_1 B_1 \rangle + \langle A_1 B_2 \rangle + \langle A_2 B_1 \rangle - \langle A_2 B_2 \rangle - \langle A_1 \rangle - \langle B_1 \rangle \leq 0.&lt;/math&gt;<br /> Similarly, the best bound on this quantity is $1/\sqrt{2} - 1/2$ in a quantum mechanical setting, and it is $1/2$ in no-signalling settings. These three bounds can be verified as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; BellInequalityMax([1 1;1 -1], [-1 0], [-1 0], [0 1], [0 1], 'classical')<br /> <br /> ans =<br /> <br /> 0<br /> <br /> &gt;&gt; BellInequalityMax([1 1;1 -1], [-1 0], [-1 0], [0 1], [0 1], 'quantum')<br /> <br /> ans =<br /> <br /> 0.2071<br /> <br /> &gt;&gt; BellInequalityMax([1 1;1 -1], [-1 0], [-1 0], [0 1], [0 1], 'nosignal')<br /> <br /> ans =<br /> <br /> 0.5000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The I&lt;sub&gt;3322&lt;/sub&gt; inequality===<br /> The I&lt;sub&gt;3322&lt;/sub&gt; inequality&lt;ref&gt;M. Froissart. Constructive generalization of Bell's inequalities. &lt;em&gt;Nuov. Cim. B&lt;/em&gt;, 64:241, 1981&lt;/ref&gt;&lt;ref&gt;D. Collins and N. Gisin. A relevant two qubit Bell inequality inequivalent to the CHSH inequality. J. Phys. A: Math. Gen., 37(5):1175, 2004. E-print: [http://arxiv.org/abs/quant-ph/0306129 arXiv:quant-ph/0306129]&lt;/ref&gt; is a Bell inequality that says that if $\{A_1,A_2,A_3\}$ and $\{B_1,B_2,B_3\}$ are $\{0,1\}$-valued measurement settings, then in classical physics the following inequality holds:<br /> : &lt;math&gt;\langle A_1 B_1 \rangle + \langle A_1 B_2 \rangle - \langle A_1 B_3 \rangle + \langle A_2 B_1 \rangle + \langle A_2 B_2 \rangle + \langle A_2 B_3 \rangle - \langle A_3 B_1 \rangle + \langle A_3 B_2 \rangle - \langle A_2 \rangle - \langle B_1 \rangle - 2\langle B_2 \rangle \leq 0.&lt;/math&gt;<br /> Similarly, it is known that a value of (strictly) larger than $1/4$ is possible in quantum mechanics&lt;ref name=&quot;palvertes&quot;&gt;K.F. Pál and T. Vértesi. Maximal violation of a bipartite three-setting, two-outcome Bell inequality using infinite-dimensional quantum systems. &lt;em&gt;Phys. Rev. A&lt;/em&gt;, 82:022116, 2010. E-print: [http://arxiv.org/abs/1006.3032 arXiv:1006.3032] [quant-ph]&lt;/ref&gt;, and the best possible bound is $1$ in no-signalling theories. The following code computes the best possible classical and no-signalling bounds exactly, and computes several different upper bounds for the quantum mechanical setting:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'classical')<br /> <br /> ans =<br /> <br /> 0<br /> <br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'quantum', 1)<br /> <br /> ans =<br /> <br /> 0.366025403693998<br /> <br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'quantum', '1+ab')<br /> <br /> ans =<br /> <br /> 0.251470897708374 % as we increase K, the upper bound gets lower (better)<br /> <br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'quantum', 2)<br /> <br /> ans =<br /> <br /> 0.250939721548844<br /> <br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'quantum', 3)<br /> <br /> ans =<br /> <br /> 0.250875554481214<br /> <br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'quantum', 4)<br /> <br /> ans =<br /> <br /> 0.250875378885565<br /> <br /> &gt;&gt; BellInequalityMax([1 1 -1;1 1 1;-1 1 0], [0 -1 0], [-1 -2 0], [0 1], [0 1], 'nosignal')<br /> <br /> ans =<br /> <br /> 0.999999991391596<br /> &lt;/syntaxhighlight&gt;<br /> <br /> We note that the values provided for the quantum upper bound above for &lt;tt&gt;K = '1+ab'&lt;/tt&gt;, &lt;tt&gt;K = 2&lt;/tt&gt;, and &lt;tt&gt;K = 3&lt;/tt&gt; agree with the values found in &lt;ref name=&quot;npa2&quot;&gt;M. Navascués, S. Pironio, and A. Acín. A convergent hierarchy of semidefinite programs characterizing the set of quantum correlations. '' New J. Phys.'', 10:073013, 2008. E-print: [http://arxiv.org/abs/0803.4290 arXiv:0803.4290] [quant-ph]&lt;/ref&gt;. Furthermore, the value when &lt;tt&gt;K = 4&lt;/tt&gt; agrees with the value found in &lt;ref name=&quot;palvertes&quot;&gt;&lt;/ref&gt;. The exact value of the best upper bound in the quantum setting is an open problem, but is known to be approximately $0.250875$.<br /> {{SourceCode|name=BellInequalityMax}}<br /> <br /> ==Notes==<br /> In practice, &lt;tt&gt;K&lt;/tt&gt; probably can't be any larger than 4 when &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt;.<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=BCSGameValue&diff=910 BCSGameValue 2018-06-13T16:37:55Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=BCSGameValue<br /> |desc=Computes the maximum value of a binary constraint system (BCS) game<br /> |rel=[[BellInequalityMax]]&lt;br /&gt;[[NonlocalGameValue]]&lt;br /&gt;[[XORGameValue]]<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |cat=[[List of functions#Nonlocality_and_Bell_inequalities|Nonlocality and Bell inequalities]]<br /> |upd=June 23, 2015<br /> |cvx=no}}<br /> &lt;tt&gt;'''BCSGameValue'''&lt;/tt&gt; is a [[List of functions|function]] that computes the maximum possible value of a given binary constraint system (BCS) game&lt;ref name=&quot;CM14&quot;&gt;R. Cleve and R. Mittal. Characterization of binary constraint system games. Lecture Notes in Computer Science, 8572:320&amp;ndash;331, 2014. E-print: [http://arxiv.org/abs/1209.2729 arXiv:1209.2729] [quant-ph]&lt;/ref&gt; under either classical mechanics, quantum mechanics, or general no-signalling theories. In the classical and non-signalling cases, an exact value is computed, whereas the value computed in the quantum case is only an upper bound (found using the [[NPAHierarchy|NPA hierarchy]]).<br /> <br /> A binary constraint system game is a [[NonlocalGameValue|non-local game]] in which there is a finite set of variables $v_1, v_2, \ldots, v_k$ and a finite set of constraints placed on those variables:<br /> $$<br /> f_1(v_1,v_2,\ldots,v_k) = 1 \quad \quad f_2(v_1,v_2,\ldots,v_k) = 1 \quad \cdots \quad f_m(v_1,v_2,\ldots,v_k) = 1.<br />$$<br /> One of the constraints $f_i$ is chosen (at random, with equal probability) and given to Alice, and one of the variables $v_j$ appearing in $f_i$ is chosen (at random, with equal probability) and given to Bob. Alice and Bob win the game if and only if (1) Alice returns an assignment for every variable that satisfies her constraint, and (2) Bob returns a value for his variable that agrees with the value that Alice chose for that particular variable.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;BCSVAL = BCSGameValue(C)&lt;/tt&gt;<br /> * &lt;tt&gt;BCSVAL = BCSGameValue(C,MTYPE)&lt;/tt&gt;<br /> * &lt;tt&gt;BCSVAL = BCSGameValue(C,MTYPE,K)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;C&lt;/tt&gt;: A cell, each of whose elements is a constraint in the BCS. The constraints themselves are specified as $2 \times 2 \times 2 \times \cdots$ binary arrays, where the $(i,j,k,\ldots)$-entry is 1 if and only if setting $v_1=i, v_2=j, v_3=k, \ldots$ satisfies that constraint.<br /> * &lt;tt&gt;MTYPE&lt;/tt&gt; (optional, default &lt;tt&gt;'classical'&lt;/tt&gt;): A string indicating which type of theory should be used when computing the maximum value of the BCS game. Must be one of &lt;tt&gt;'classical'&lt;/tt&gt;, &lt;tt&gt;'quantum'&lt;/tt&gt;, or &lt;tt&gt;'nosignal'&lt;/tt&gt;. If &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt; then only an upper bound on the non-local game is computed, not necessarily the ''best'' upper bound (see the argument &lt;tt&gt;K&lt;/tt&gt; below).<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default &lt;tt&gt;1&lt;/tt&gt;): If &lt;tt&gt;MTYPE = 'quantum'&lt;/tt&gt; then this is a non-negative integer indicating what level of the NPA hierarchy should be used when bounding the value of the non-local game. Higher values of &lt;tt&gt;K&lt;/tt&gt; give better bounds, but require more memory and time. Alternatively, &lt;tt&gt;K&lt;/tt&gt; can be a string of a form like &lt;tt&gt;'1+ab+aab'&lt;/tt&gt;, which indicates that an intermediate level of the hierarchy should be used, where this example uses all products of 1 measurement, all products of one Alice and one Bob measurement, and all products of two Alice and one Bob measurement. Use plus signs to separate the different categories of products, as above. The first character of this string should always be a number, indicating the base level to use. If &lt;tt&gt;MTYPE&lt;/tt&gt; is anything other than &lt;tt&gt;'quantum'&lt;/tt&gt; then &lt;tt&gt;K&lt;/tt&gt; has no effect.<br /> <br /> ==Examples==<br /> ===The CHSH game===<br /> The (quite trivial) BCS game consisting of the following two constraints is equivalent to the [http://en.wikipedia.org/?title=CHSH_inequality CHSH inequality]:<br /> $$<br /> v_1 \oplus v_2 = 0 \quad \quad \quad v_1 \oplus v_2 = 1<br />$$<br /> We can compute the classical and quantum values of the game with the following code:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; C{1} = zeros(2,2);<br /> C{2} = zeros(2,2);<br /> for v1 = 0:1<br /> for v2 = 0:1<br /> % Set up the first constraint: we win if v1+v2 is even.<br /> if(mod(v1+v2,2) == 0)<br /> C{1}(v1+1,v2+1) = 1;<br /> end<br /> <br /> % Set up the first constraint: we win if v1+v2 is odd.<br /> if(mod(v1+v2,2) == 1)<br /> C{2}(v1+1,v2+1) = 1;<br /> end<br /> end<br /> end<br /> &gt;&gt; BCSGameValue(C,'classical') % should give 3/4<br /> <br /> ans =<br /> <br /> 0.7500<br /> <br /> &gt;&gt; BCSGameValue(C,'quantum') % should give cos^2(pi/8)<br /> <br /> ans =<br /> <br /> 0.8536<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The generalized CHSH game===<br /> By extending the CHSH game above to have more variables (say $k$ of them), we get the game defined by the following slightly more complicated constraints::<br /> $$<br /> v_1 \oplus v_2 \oplus \cdots \oplus v_k = 0 \quad \quad \quad v_1 \oplus v_2 \oplus \cdots \oplus v_k = 1<br />$$<br /> We can compute the classical value and bound the quantum value of the game in the $k = 3$ case with the following code:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; C{1} = zeros(2,2,2);<br /> C{2} = zeros(2,2,2);<br /> for v1 = 0:1<br /> for v2 = 0:1<br /> for v3 = 0:1<br /> % Set up the first constraint: we win if v1+v2+v3 is even.<br /> if(mod(v1+v2+v3,2) == 0)<br /> C{1}(v1+1,v2+1,v3+1) = 1;<br /> end<br /> % Set up the first constraint: we win if v1+v2+v3 is odd.<br /> if(mod(v1+v2+v3,2) == 1)<br /> C{2}(v1+1,v2+1,v3+1) = 1;<br /> end<br /> end<br /> end<br /> end<br /> &gt;&gt; BCSGameValue(C,'classical')<br /> <br /> ans =<br /> <br /> 0.8333<br /> <br /> &gt;&gt; BCSGameValue(C,'quantum',1)<br /> <br /> ans =<br /> <br /> 1.0000<br /> <br /> &gt;&gt; BCSGameValue(C,'quantum','1+ab')<br /> <br /> ans =<br /> <br /> 0.9082<br /> &lt;/syntaxhighlight&gt;<br /> <br /> Note that the first level of the [[NPAHierarchy|NPA hierarchy]] above just gave the (useless) upper bound of 1 on the game's value. However, increasing the level of the NPA hierarchy to the 1+AB level was sufficient to give a non-trivial upper bound.<br /> <br /> ===The &quot;four-line&quot; BCS game===<br /> The BCS game defined by the following four constraints was shown by Speelman not to have a quantum strategy giving a value of 1 (see Section 5 of &lt;ref name=&quot;CM14&quot;&gt;&lt;/ref&gt;):<br /> $$<br /> v_1 \oplus v_2 \oplus v_3 = 0 \quad \quad \quad v_3 \oplus v_4 \oplus v_5 = 0 \\<br /> v_5 \oplus v_6 \oplus v_1 = 0 \quad \quad \quad v_2 \oplus v_4 \oplus v_6 = 1.<br />$$<br /> We can compute the classical value and bound the quantum value of this game with the following code:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; C{1} = zeros(2,2,2,2,2,2);<br /> C{2} = zeros(2,2,2,2,2,2);<br /> C{3} = zeros(2,2,2,2,2,2);<br /> C{4} = zeros(2,2,2,2,2,2);<br /> for v1 = 0:1<br /> for v2 = 0:1<br /> for v3 = 0:1<br /> for v4 = 0:1<br /> for v5 = 0:1<br /> for v6 = 0:1<br /> % Set up the first constraint.<br /> if(mod(v1+v2+v3,2) == 0)<br /> C{1}(v1+1,v2+1,v3+1,v4+1,v5+1,v6+1) = 1;<br /> end<br /> <br /> % Set up the second constraint.<br /> if(mod(v3+v4+v5,2) == 0)<br /> C{2}(v1+1,v2+1,v3+1,v4+1,v5+1,v6+1) = 1;<br /> end<br /> <br /> % Set up the third constraint.<br /> if(mod(v5+v6+v1,2) == 0)<br /> C{3}(v1+1,v2+1,v3+1,v4+1,v5+1,v6+1) = 1;<br /> end<br /> <br /> % Set up the fourth constraint.<br /> if(mod(v2+v4+v6,2) == 1)<br /> C{4}(v1+1,v2+1,v3+1,v4+1,v5+1,v6+1) = 1;<br /> end<br /> end<br /> end<br /> end<br /> end<br /> end<br /> end<br /> &gt;&gt; BCSGameValue(C,'classical')<br /> <br /> ans =<br /> <br /> 0.9167<br /> <br /> &gt;&gt; BCSGameValue(C,'quantum',1)<br /> <br /> ans =<br /> <br /> 1.0000<br /> <br /> &gt;&gt; BCSGameValue(C,'quantum','1+ab')<br /> <br /> ans =<br /> <br /> 0.9789<br /> &lt;/syntaxhighlight&gt;<br /> <br /> Just like in the previous example, the first level of the [[NPAHierarchy|NPA hierarchy]] above just gave the (useless) upper bound of 1 on the game's value. However, increasing the level of the NPA hierarchy to the 1+AB level was sufficient to give a non-trivial upper bound.<br /> <br /> {{SourceCode|name=BCSGameValue}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=SymmetricInnerExtension&diff=909 SymmetricInnerExtension 2018-06-13T16:37:10Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=SymmetricInnerExtension<br /> |desc=Determines whether or not an operator has a symmetric inner extension<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[IsPPT]]&lt;br /&gt;[[IsSeparable]]&lt;br /&gt;[[SymmetricExtension]]&lt;br /&gt;[[SymmetricProjection]]<br /> |cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;nbsp;and&amp;nbsp;separability]]<br /> |upd=September 22, 2014<br /> |v=0.50}}<br /> &lt;tt&gt;'''SymmetricInnerExtension'''&lt;/tt&gt; is a [[List of functions|function]] that determines whether or not a given [[positive semidefinite]] operator is in the cone defined in reference &lt;ref name=&quot;NOP09&quot;&gt;M. Navascués, M. Owari, and M. B. Plenio. Complete Criterion for Separability Detection. &lt;em&gt;Physical Review Letters&lt;/em&gt;, 103:160404, 2009. E-print: [http://arxiv.org/abs/0906.2735 arXiv:0906.2735] [quant-ph]&lt;/ref&gt; that approximates the set of separable operators from the inside, based on operators with [[symmetric extension]]s. Importantly, if this script returns a value of &lt;tt&gt;1&lt;/tt&gt; then we know that the given operator is separable (if the script returns a value of &lt;tt&gt;0&lt;/tt&gt;, we know nothing about whether the operator is separable or entangled).<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;EX = SymmetricInnerExtension(X)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricInnerExtension(X,K)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricInnerExtension(X,K,DIM)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricInnerExtension(X,K,DIM,PPT)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricInnerExtension(X,K,DIM,PPT,TOL)&lt;/tt&gt;<br /> * &lt;tt&gt;[EX,WIT] = SymmetricInnerExtension(X,K,DIM,PPT,TOL)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> ===Input arguments===<br /> * &lt;tt&gt;X&lt;/tt&gt;: A positive semidefinite operator.<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default 2): The number of copies of the second subsystem in the desired symmetric extension.<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the two subsystems that &lt;tt&gt;X&lt;/tt&gt; acts on.<br /> * &lt;tt&gt;PPT&lt;/tt&gt; (optional, default 0): A flag (either 1 or 0) that indicates whether or not the desired symmetric extension must have [[positive partial transpose]].<br /> * &lt;tt&gt;TOL&lt;/tt&gt; (optional, default &lt;tt&gt;eps^(1/4)&lt;/tt&gt;): The numerical tolerance used throughout this script. It is recommended that this is left at the default value unless numerical problems arise and the script has difficulty determining whether or not &lt;tt&gt;X&lt;/tt&gt; has a symmetric inner extension.<br /> <br /> ===Output arguments===<br /> * &lt;tt&gt;EX&lt;/tt&gt;: A flag (either 1 or 0) indicating that &lt;tt&gt;X&lt;/tt&gt; does or does not have a symmetric inner extension of the desired type. A value of 1 means that &lt;tt&gt;X&lt;/tt&gt; is [[separable]].<br /> * &lt;tt&gt;WIT&lt;/tt&gt; (optional): A witness that verifies that the answer provided by &lt;tt&gt;EX&lt;/tt&gt; is correct. If &lt;tt&gt;EX = 1&lt;/tt&gt; (i.e., &lt;tt&gt;X&lt;/tt&gt; is in the &quot;inner&quot; symmetric extension cone) then &lt;tt&gt;WIT&lt;/tt&gt; is a symmetric extension of the operator &lt;math&gt;\sigma_{AB}&lt;/math&gt; from &lt;ref name=&quot;NOP09&quot;&gt;&lt;/ref&gt;, and thus acts as a witness that verifies that &lt;tt&gt;EX = 1&lt;/tt&gt; is correct. If &lt;tt&gt;X&lt;/tt&gt; is not in this cone (i.e., &lt;tt&gt;EX = 0&lt;/tt&gt;) then &lt;tt&gt;WIT&lt;/tt&gt; is an operator with &lt;tt&gt;trace(WIT*X) = -1&lt;/tt&gt; but &lt;tt&gt;trace(WIT*Y) &gt;= 0&lt;/tt&gt; for all operators in the described cone. Note that &lt;tt&gt;WIT&lt;/tt&gt; may not be an [[entanglement witness]]!<br /> <br /> ==Examples==<br /> The following code takes an unnormalized quantum state and shows that it is separable, since it has a symmetric inner extension.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; rho = [11 4 -1 -1 -1 -1 -1 -1 -1<br /> 4 11 -1 -1 -1 -1 -1 -1 -1<br /> -1 -1 11 -1 -1 4 -1 -1 -1<br /> -1 -1 -1 11 -1 -1 4 -1 -1<br /> -1 -1 -1 -1 16 -1 -1 -1 -1<br /> -1 -1 4 -1 -1 11 -1 -1 -1<br /> -1 -1 -1 4 -1 -1 11 -1 -1<br /> -1 -1 -1 -1 -1 -1 -1 11 4<br /> -1 -1 -1 -1 -1 -1 -1 4 11];<br /> &gt;&gt; SymmetricInnerExtension(rho,2,[3,3],1) % we set PPT=1, since this makes the separability test stronger<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> If we subtract the identity from &lt;tt&gt;rho&lt;/tt&gt;, then intuitively it becomes &quot;less separable&quot;. We can verify this as follows, where we see that setting &lt;tt&gt;K = 2&lt;/tt&gt; is no longer sufficient to prove that the state is separable, and instead we must set &lt;tt&gt;K = 3&lt;/tt&gt;. In general, the higher &lt;tt&gt;K&lt;/tt&gt; is, the stronger the test for separability is, but the longer and more memory-intensive the computation is.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; SymmetricInnerExtension(rho-eye(9),2,[3,3],1)<br /> <br /> ans =<br /> <br /> 0<br /> <br /> &gt;&gt; SymmetricInnerExtension(rho-eye(9),3,[3,3],1)<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> If your goal is to prove that an operator is separable, it is probably in your best interest to see the optional argument &lt;tt&gt;PPT&lt;/tt&gt; to &lt;tt&gt;1&lt;/tt&gt;. It only defaults to &lt;tt&gt;0&lt;/tt&gt; to be consistent with the &lt;tt&gt;[[SymmetricExtension]]&lt;/tt&gt; function.<br /> <br /> {{SourceCode|name=SymmetricInnerExtension}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=SymmetricExtension&diff=908 SymmetricExtension 2018-06-13T16:36:57Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=SymmetricExtension<br /> |desc=Determines whether or not an operator has a symmetric extension<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[IsPPT]]&lt;br /&gt;[[IsSeparable]]&lt;br /&gt;[[SymmetricInnerExtension]]&lt;br /&gt;[[SymmetricProjection]]<br /> |cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;nbsp;and&amp;nbsp;separability]]<br /> |upd=February 21, 2014<br /> |v=0.50}}<br /> &lt;tt&gt;'''SymmetricExtension'''&lt;/tt&gt; is a [[List of functions|function]] that determines whether or not a given positive semidefinite operator has a symmetric extension. This function is extremely useful for showing that quantum states are entangled (see the [[#Examples|Examples]] section). Various types of symmetric extensions (such as Bosonic and/or PPT extensions) can be looked for by specifying optional arguments in the function.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;EX = SymmetricExtension(X)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricExtension(X,K)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricExtension(X,K,DIM)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricExtension(X,K,DIM,PPT)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricExtension(X,K,DIM,PPT,BOS)&lt;/tt&gt;<br /> * &lt;tt&gt;EX = SymmetricExtension(X,K,DIM,PPT,BOS,TOL)&lt;/tt&gt;<br /> * &lt;tt&gt;[EX,WIT] = SymmetricExtension(X,K,DIM,PPT,BOS,TOL)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> ===Input arguments===<br /> * &lt;tt&gt;X&lt;/tt&gt;: A positive semidefinite operator.<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default 2): The number of copies of the second subsystem in the desired symmetric extension.<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the two subsystems that &lt;tt&gt;X&lt;/tt&gt; acts on.<br /> * &lt;tt&gt;PPT&lt;/tt&gt; (optional, default 0): A flag (either 1 or 0) that indicates whether or not the desired symmetric extension must have positive partial transpose.<br /> * &lt;tt&gt;BOS&lt;/tt&gt; (optional, default 0): A flag (either 1 or 0) that indicates whether or not the desired symmetric extension must be Bosonic (i.e., have its range contained within the symmetric subspace).<br /> * &lt;tt&gt;TOL&lt;/tt&gt; (optional, default &lt;tt&gt;eps^(1/4)&lt;/tt&gt;): The numerical tolerance used throughout this script. It is recommended that this is left at the default value unless numerical problems arise and the script has difficulty determining whether or not &lt;tt&gt;X&lt;/tt&gt; has a symmetric extension.<br /> <br /> ===Output arguments===<br /> * &lt;tt&gt;EX&lt;/tt&gt;: A flag (either 1 or 0) indicating that &lt;tt&gt;X&lt;/tt&gt; does or does not have a symmetric extension of the desired type.<br /> * &lt;tt&gt;WIT&lt;/tt&gt; (optional): A witness that verifies that the answer provided by &lt;tt&gt;EX&lt;/tt&gt; is correct. If &lt;tt&gt;EX = 1&lt;/tt&gt; (i.e., &lt;tt&gt;X&lt;/tt&gt; has a symmetric extension) then &lt;tt&gt;WIT&lt;/tt&gt; is such a symmetric extension. If &lt;tt&gt;EX = 0&lt;/tt&gt; (i.e., no symmetric extension exists) then WIT is an entanglement witness with &lt;tt&gt;trace(WIT*X) = -1&lt;/tt&gt; but &lt;tt&gt;trace(WIT*Y) &gt;= 0&lt;/tt&gt; for all symmetrically extendable &lt;tt&gt;Y&lt;/tt&gt;.<br /> <br /> ==Examples==<br /> ===2-qubit symmetric extension===<br /> It is known&lt;ref&gt;J. Chen, Z. Ji, D. Kribs, N. Lütkenhaus, and B. Zeng. ''Symmetric extension of two-qubit states''. E-print: [http://arxiv.org/abs/1310.3530 arXiv:1310.3530] [quant-ph]&lt;/ref&gt; that a 2-qubit state $\rho_{AB}$ has a (not necessarily PPT) symmetric extension if and only if ${\rm Tr}(\rho_B^2) \geq {\rm Tr}(\rho_{AB}^2) - 4\sqrt{\det(\rho_{AB})}$. The following code verifies that one such state does indeed have a symmetric extension.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; rho = [1 0 0 -1;0 1 1/2 0;0 1/2 1 0;-1 0 0 1];<br /> &gt;&gt; [trace(PartialTrace(rho)^2), trace(rho^2) - 4*sqrt(det(rho))] % if the first number is &gt;= the second number, rho has a symmetric extension<br /> <br /> ans =<br /> <br /> 8.0000 6.5000<br /> <br /> &gt;&gt; SymmetricExtension(rho) % verify that rho has a symmetric extension<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> If your goal is to detect entanglement in an operator, then it is always in your best interest to set the optional arguments &lt;tt&gt;PPT&lt;/tt&gt; and &lt;tt&gt;BOS&lt;/tt&gt; to be &lt;tt&gt;1&lt;/tt&gt;. Setting &lt;tt&gt;BOS = 1&lt;/tt&gt; increases the effectiveness of the entanglement test without any computational overhead at all. Setting &lt;tt&gt;PPT = 1&lt;/tt&gt; slows down the computation quite a bit, but increases the effectiveness as an entanglement test ''considerably''.<br /> <br /> {{SourceCode|name=SymmetricExtension}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=IsSeparable&diff=907 IsSeparable 2018-06-13T16:36:32Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=IsSeparable<br /> |desc=Determines whether or not a bipartite operator is separable<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[InSeparableBall]]&lt;br /&gt;[[IsBlockPositive]]&lt;br /&gt;[[IsPPT]]&lt;br /&gt;[[IsPSD]]&lt;br /&gt;[[OperatorSchmidtDecomposition]]&lt;br /&gt;[[OperatorSchmidtRank]]&lt;br /&gt;[[SymmetricExtension]]&lt;br /&gt;[[SymmetricInnerExtension]]<br /> |cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;nbsp;and&amp;nbsp;separability]]<br /> |upd=November 14, 2014<br /> |v=0.60}}<br /> &lt;tt&gt;'''IsSeparable'''&lt;/tt&gt; is a [[List of functions|function]] that determines whether a bipartite operator is separable or entangled. A value of 0 indicates that the operator is entangled, a value of 1 indicates that the operator is separable, and a value of -1 indicates that the script was unable to determine whether the operator is separable or entangled.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;SEP = IsSeparable(X)&lt;/tt&gt;<br /> * &lt;tt&gt;SEP = IsSeparable(X,DIM)&lt;/tt&gt;<br /> * &lt;tt&gt;SEP = IsSeparable(X,DIM,STR)&lt;/tt&gt;<br /> * &lt;tt&gt;SEP = IsSeparable(X,DIM,STR,VERBOSE)&lt;/tt&gt;<br /> * &lt;tt&gt;SEP = IsSeparable(X,DIM,STR,VERBOSE,TOL)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;X&lt;/tt&gt;: A bipartite positive semidefinite operator.<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the two subsystems that &lt;tt&gt;X&lt;/tt&gt; acts on.<br /> * &lt;tt&gt;STR&lt;/tt&gt; (optional, default 2): An integer that determines how hard the script should work to determine separability before giving up (&lt;tt&gt;STR = -1&lt;/tt&gt; means that the script won't stop working until it finds an answer). Other valid values are &lt;tt&gt;0, 1, 2, 3, ...&lt;/tt&gt;. In practice, if &lt;tt&gt;STR &gt;= 4&lt;/tt&gt; then most computers will run out of memory and/or the sun will explode before computation completes.<br /> * &lt;tt&gt;VERBOSE&lt;/tt&gt; (optional, default 1): A flag (either 0 or 1) that indicates that the script will or will not display a line of text describing how it proved that &lt;tt&gt;X&lt;/tt&gt; is or is not separable.<br /> * &lt;tt&gt;TOL&lt;/tt&gt; (optional, default &lt;tt&gt;eps^(3/8)&lt;/tt&gt;): The numerical tolerance used throughout the script.<br /> <br /> ==Examples==<br /> ===Determining entanglement of a bound entangled state===<br /> The following code constructs a two-qutrit bound entangled state based on the &quot;Tiles&quot; unextendible product basis. This state's entanglement can not be detected by the positive partial transpose criterion, but the following code shows that it is indeed entangled.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; v = UPB('Tiles');<br /> <br /> &gt;&gt; rho = eye(9);<br /> &gt;&gt; for j = 1:5<br /> rho = rho - v(:,j)*v(:,j)';<br /> end<br /> &gt;&gt; rho = rho/4; % we are now done constructing the bound entangled state<br /> <br /> &gt;&gt; IsSeparable(rho)<br /> Determined to be entangled via the realignment criterion. Reference:<br /> K. Chen and L.-A. Wu. A matrix realignment method for recognizing entanglement.<br /> Quantum Inf. Comput., 3:193-202, 2003.<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> The following code performs the same computation, but has &lt;tt&gt;VERBOSE&lt;/tt&gt; set to 0 so that the method of proving that &lt;tt&gt;rho&lt;/tt&gt; is entangled is not displayed.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; IsSeparable(rho,[3,3],2,0)<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Mixtures with the maximally-mixed state===<br /> Every state that is sufficiently close to the maximally-mixed state is separable, so for every entangled state $\rho \in M_A \otimes M_B$, the state $\sigma_p := p\rho + \tfrac{1}{d_A d_B}(1-p)I$ is separable as long as $p$ is small enough.<br /> <br /> For the remainder of this example, $\rho$ is the same bound entangled state based on the &quot;Tiles&quot; UPB from the [[#Determining_entanglement_of_a_bound_entangled_state|previous example]]. It was shown in &lt;ref name=&quot;GGHE08&quot;&gt;O. Gittsovich, O. Gühne, P. Hyllus, and J. Eisert. Unifying several separability conditions using the covariance matrix criterion. Phys. Rev. A, 78:052319, 2008. E-print: [http://arxiv.org/abs/0803.0757 arXiv:0803.0757] [quant-ph]&lt;/ref&gt; that the Filter Covariance Matrix Criterion detects the entanglement in $\sigma_p$ when $p = 0.8723$, which we can verify as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = 0.8723; sigma = p*rho + (1-p)*eye(9)/9;<br /> &gt;&gt; IsSeparable(sigma)<br /> Determined to be entangled via the Filter Covariance Matrix Criterion. Reference:<br /> O. Gittsovich, O. Gühne, P. Hyllus, and J. Eisert. Unifying several separability<br /> conditions using the covariance matrix criterion. Phys. Rev. A, 78:052319, 2008.<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> However, if we decrease $p$ to $p = 0.8722$ then a stronger test of entanglement is needed to determine that $\sigma_p$ is entangled:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = 0.8722; sigma = p*rho + (1-p)*eye(9)/9;<br /> &gt;&gt; IsSeparable(sigma)<br /> Determined to be entangled by not having a 2-copy symmetric extension. Reference:<br /> A. C. Doherty, P. A. Parrilo, and F. M. Spedalieri. A complete family of separability<br /> criteria. Phys. Rev. A, 69:022308, 2004.<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> If we decrease $p$ further, then $\sigma_p$ becomes separable:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = 0.2; sigma = p*rho + (1-p)*eye(9)/9;<br /> &gt;&gt; IsSeparable(sigma)<br /> Determined to be separable by closeness to the maximally mixed state. Reference:<br /> L. Gurvits and H. Barnum. Largest separable balls around the maximally mixed bipartite<br /> quantum state. Phys. Rev. A, 66:062311, 2002.<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> If we increase $p$ back to $p = 0.4$ then $\sigma_p$ is still separable, but a stronger test is required to prove its separability: <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = 0.4; sigma = p*rho + (1-p)*eye(9)/9;<br /> &gt;&gt; IsSeparable(sigma)<br /> Determined to be separable via the semidefinite program based on 2-copy symmetric extensions from reference:<br /> M. Navascues, M. Owari, and M. B. Plenio. A complete criterion for separability detection. Phys. Rev. Lett.,<br /> 103:160404, 2009.<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> If we increase $p$ slightly more to $p = 0.45$ then $\sigma_p$ is still separable, but none of the default tests for separability are strong enough to determine this. To prove separability, we can increase the &lt;tt&gt;STR&lt;/tt&gt; argument to 3: <br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; p = 0.45; sigma = p*rho + (1-p)*eye(9)/9;<br /> &gt;&gt; IsSeparable(sigma)<br /> <br /> ans =<br /> <br /> -1<br /> <br /> &gt;&gt; IsSeparable(sigma,[3,3],3)<br /> Determined to be separable via the semidefinite program based on 3-copy symmetric extensions from reference:<br /> M. Navascues, M. Owari, and M. B. Plenio. A complete criterion for separability detection. Phys. Rev. Lett., 103:160404, 2009.<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Isotropic states===<br /> It is well-known that [[IsotropicState|isotropic states]] $(1-\alpha)I/d^2 + \alpha|\psi_+\rangle\langle\psi_+| \in M_d \otimes M_d$ are separable if and only if $\alpha \leq 1/(d+1)$,&lt;ref name=&quot;HH97&quot;&gt;M. Horodecki and P. Horodecki. Reduction criterion of separability and limits for a class of distillation protocols. Phys. Rev. A, 59:4206&amp;ndash;4216, 1999. E-print: [http://arxiv.org/abs/quant-ph/9708015 arXiv:quant-ph/9708015]&lt;/ref&gt; which can be verified in the $d = 3$ case as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; d = 3;<br /> &gt;&gt; IsSeparable(IsotropicState(d, 1/(d+1)))<br /> Determined to be separable by being a small rank-1 perturbation of the maximally-mixed state. Reference:<br /> G. Vidal and R. Tarrach. Robustness of entanglement. Phys. Rev. A, 59:141-155, 1999.<br /> <br /> ans =<br /> <br /> 1<br /> <br /> &gt;&gt; IsSeparable(IsotropicState(d, 1/(d+1)+0.0001))<br /> Determined to be entangled via the realignment criterion. Reference:<br /> K. Chen and L.-A. Wu. A matrix realignment method for recognizing entanglement. Quantum Inf. Comput., 3:193-202, 2003.<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Werner states===<br /> It is well-known that [[WernerState|Werner states]] $\frac{1}{d^2-d\alpha}(I\otimes I - \alpha S) \in M_d \otimes M_d$ are separable if and only if $\alpha \leq 1/d$,&lt;ref name=&quot;Wer89&quot;&gt;R. F. Werner. Quantum states with Einstein-Podolsky-Rosen correlations admitting a hidden-variable model. ''Phys. Rev. A'', 40(8):4277&amp;ndash;4281.&lt;/ref&gt; which can be verified in the $d = 3$ case as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; d = 3;<br /> &gt;&gt; IsSeparable(WernerState(d, 1/d))<br /> Determined to be separable by closeness to the maximally mixed state. Reference:<br /> L. Gurvits and H. Barnum. Largest separable balls around the maximally mixed bipartite quantum state. Phys. Rev. A, 66:062311, 2002.<br /> <br /> ans =<br /> <br /> 1<br /> <br /> &gt;&gt; IsSeparable(WernerState(d, 1/d+0.0001))<br /> Determined to be entangled via the PPT criterion. Reference:<br /> A. Peres. Separability criterion for density matrices. Phys. Rev. Lett., 77:1413-1415, 1996.<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ==Notes==<br /> In general, we are much better at proving that an operator is entangled than we are at proving that it is separable. Thus, if this script returns a value of -1 (indicating that it was unable to prove that the operator is separable or entangled) then that is a pretty good indicator that the operator is probably separable.<br /> <br /> {{SourceCode|name=IsSeparable}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=IsBlockPositive&diff=906 IsBlockPositive 2018-06-13T16:35:45Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=IsBlockPositive<br /> |desc=Determines whether or not an operator is block positive<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[IsPPT]]&lt;br /&gt;[[IsPSD]]&lt;br /&gt;[[IsSeparable]]<br /> |cat=[[List of functions#Entanglement_and_separability|Entanglement&amp;nbsp;and&amp;nbsp;separability]]<br /> |upd=September 23, 2014<br /> |v=0.50}}<br /> &lt;tt&gt;'''IsBlockPositive'''&lt;/tt&gt; is a [[List of functions|function]] that determines whether or not a bipartite operator is block positive (roughly speaking, it determines whether the operator is an entanglement witness or not). A value of 0 indicates that the operator is not block positive (and hence is not an entanglement witness), a value of 1 indicates that the operator is block positive (and hence is either an entanglement witness or is positive semidefinite), and a value of -1 indicates that the script was unable to determine whether or not the operator is block positive.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;IBP = IsBlockPositive(X)&lt;/tt&gt;<br /> * &lt;tt&gt;IBP = IsBlockPositive(X,K)&lt;/tt&gt;<br /> * &lt;tt&gt;IBP = IsBlockPositive(X,K,DIM)&lt;/tt&gt;<br /> * &lt;tt&gt;IBP = IsBlockPositive(X,K,DIM,STR)&lt;/tt&gt;<br /> * &lt;tt&gt;IBP = IsBlockPositive(X,K,DIM,STR,TOL)&lt;/tt&gt;<br /> * &lt;tt&gt;[IBP,WIT] = IsBlockPositive(X,K,DIM,STR,TOL)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;X&lt;/tt&gt;: A bipartite Hermitian operator.<br /> * &lt;tt&gt;K&lt;/tt&gt; (optional, default 1): A positive integer indicating that the script should determine whether or not &lt;tt&gt;X&lt;/tt&gt; is &lt;tt&gt;K&lt;/tt&gt;-block positive (i.e., whether or not it remains nonnegative under left and right multiplication by vectors with [[SchmidtRank|Schmidt rank]] &lt;tt&gt;&lt;= K&lt;/tt&gt;).<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, by default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the two subsystems that &lt;tt&gt;X&lt;/tt&gt; acts on.<br /> * &lt;tt&gt;STR&lt;/tt&gt; (optional, default 2): An integer that determines how hard the script should work to determine block positivity before giving up (&lt;tt&gt;STR = -1&lt;/tt&gt; means that the script won't stop working until it finds an answer). Other valid values are &lt;tt&gt;0, 1, 2, 3, ...&lt;/tt&gt;. In practice, if &lt;tt&gt;STR &gt;= 4&lt;/tt&gt; then most computers will run out of memory and/or the sun will explode before computation completes.<br /> * &lt;tt&gt;TOL&lt;/tt&gt; (optional, default &lt;tt&gt;eps^(3/8)&lt;/tt&gt;): The numerical tolerance used throughout the script.<br /> <br /> ==Examples==<br /> ===The [[SwapOperator|swap operator]] is block positive===<br /> The [[SwapOperator|swap operator]] always block positive, since it is the Choi matrix of the transpose map (and it is easy to see that the transpose map is positive). We can verify this in small dimensions as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; for d = 2:10<br /> res(d) = IsBlockPositive(SwapOperator(d));<br /> end<br /> &gt;&gt; res(2:10)<br /> <br /> ans =<br /> <br /> 1 1 1 1 1 1 1 1 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> However, the swap operator is ''not'' 2-block positive, which we can verify as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; IsBlockPositive(SwapOperator(5),2)<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The [[ChoiMap|Choi map]] is positive===<br /> The [[ChoiMap|Choi map]] is a well-known example of a positive linear map that acts on 3-by-3 matrices. The following code verifies that this map is indeed positive, but not 2-positive:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; IsBlockPositive(ChoiMap())<br /> <br /> ans =<br /> <br /> 1<br /> <br /> &gt;&gt; IsBlockPositive(ChoiMap(),2)<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===A complicated operator on 4 local dimensions===<br /> A somewhat messy positive linear map was introduced in Lemma 3 of &lt;ref name=&quot;BCJRWY14&quot;&gt;S.&amp;nbsp;Bandyopadhyay, A.&amp;nbsp;Cosentino, N.&amp;nbsp;Johnston, V.&amp;nbsp;Russo, J.&amp;nbsp;Watrous, and N.&amp;nbsp;Yu. ''Limitations on separable measurements by convex optimization''. E-print: [http://arxiv.org/abs/1408.6981 arXiv:1408.6981] [quant-ph], 2014.&lt;/ref&gt;. The following code verifies that this map is indeed positive in the $t = 1$ case.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; b0 = Bell(0);<br /> &gt;&gt; b3 = Bell(3);<br /> &gt;&gt; v0 = kron(b0,b0);<br /> &gt;&gt; Y = (kron(eye(4),b0*b0')/2 + kron(b3*b3',PartialTranspose(b3*b3',1)))/3 - v0*v0'/4;<br /> &gt;&gt; Y = Swap(Y,[2,2,2,2],[2,3]); % this is the Choi matrix of the linear map given in Lemma 3<br /> &gt;&gt; IsBlockPositive(Y)<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> {{SourceCode|name=IsBlockPositive}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=UPBSepDistinguishable&diff=905 UPBSepDistinguishable 2018-06-13T16:34:15Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=UPBSepDistinguishable<br /> |desc=Determines whether or not a UPB is distinguishable by separable measurements<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[LocalDistinguishability]]<br /> |cat=[[List of functions#Distinguishing_objects|Distinguishing objects]]<br /> |upd=October 30, 2014<br /> |v=0.50}}<br /> &lt;tt&gt;'''UPBSepDistinguishable'''&lt;/tt&gt; is a [[List of functions|function]] that determines whether or not a given [[UPB]] is perfectly distinguishable by separable measurements. This question is interesting because it is known that all UPBs are indistinguishable by LOCC measurements &lt;ref&gt;C. Bennett, D. DiVincenzo, T. Mor, P. Shor, J. Smolin, and B. Terhal. Unextendible product bases and bound entanglement. ''Physical Review Letters'', 82(26):5385&amp;ndash;5388, 1999. E-print: [http://arxiv.org/abs/quant-ph/9808030 arXiv:quant-ph/9808030]&lt;/ref&gt;, and all UPBs are distinguishable by PPT measurements. Separable measurements lie between these two classes.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;DIST = UPBSepDistinguishable(U,V,W,...)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;U,V,W,...&lt;/tt&gt;: Matrices, each with the same number of columns as each other, whose columns are the local vectors of the UPB.<br /> <br /> ==Examples==<br /> ===Qutrit UPBs are distinguishable===<br /> It was shown in &lt;ref&gt;D. DiVincenzo, T. Mor, P. W. Shor, J. Smolin, and B. Terhal. Unextendible product bases, uncompletable product bases and bound entanglement. ''Communications in Mathematical Physics'', 238(3):379&amp;ndash;410, 2003. E-print: [http://arxiv.org/abs/quant-ph/9908070 arXiv:quant-ph/9908070]&lt;/ref&gt; that all UPBs in $\mathbb{C}^3 \otimes \mathbb{C}^3$ are distinguishable by separable measurements. We can verify this fact for the &quot;Tiles&quot; UPB as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; [u,v] = UPB('Tiles'); % generates the &quot;Tiles&quot; UPB<br /> &gt;&gt; UPBSepDistinguishable(u,v)<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===The Feng UPB is indistinguishable===<br /> It was shown in &lt;ref&gt;S. Bandyopadhyay, A. Cosentino, N. Johnston, V. Russo, J. Watrous, and N. Yu. ''Limitations on separable measurements by convex optimization''. E-print: [http://arxiv.org/abs/1408.6981 arXiv:1408.6981] [quant-ph], 2014.&lt;/ref&gt; that the UPB in $\mathbb{C}^4 \otimes \mathbb{C}^4$ found by K. Feng is indistinguishable by separable measurements. We can confirm this fact as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; [u,v] = UPB('Feng4x4'); % generates the &quot;Feng&quot; UPB<br /> &gt;&gt; UPBSepDistinguishable(u,v)<br /> <br /> ans =<br /> <br /> 0<br /> &lt;/syntaxhighlight&gt;<br /> <br /> {{SourceCode|name=UPBSepDistinguishable}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=LocalDistinguishability&diff=904 LocalDistinguishability 2018-06-13T16:33:52Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=LocalDistinguishability<br /> |desc=Computes the maximum probability of distinguishing quantum states by symmetric-extendible measurements<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[ChannelDistinguishability]]&lt;br /&gt;[[Distinguishability]]<br /> |cat=[[List of functions#Distinguishing_objects|Distinguishing objects]]<br /> |upd=December 19, 2014}}<br /> &lt;tt&gt;'''LocalDistinguishability'''&lt;/tt&gt; is a [[List of functions|function]] that computes the maximum probability of distinguishing two or more quantum states via PPT or symmetric-extendible measurements, which approximate separable measurements. That is, this function computes the maximum probability of winning the following game: You are given a complete description of a set of $k$ quantum states $\rho_1, \ldots, \rho_k$, and then are given one of those $k$ states, and asked to determine (via quantum measurement) which state was given to you. However, the only measurements that are available to you are &quot;almost&quot; local in the sense that they are PPT and/or have a symmetric extension.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;DIST = LocalDistinguishability(X)&lt;/tt&gt;<br /> * &lt;tt&gt;[DIST,MEAS,DUAL_SOL] = LocalDistinguishability(X)&lt;/tt&gt;<br /> * &lt;tt&gt;[DIST,MEAS,DUAL_SOL] = LocalDistinguishability(X,...)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> ===Input arguments===<br /> * &lt;tt&gt;X&lt;/tt&gt;: The quantum states to be distinguished. &lt;tt&gt;X&lt;/tt&gt; can either be a cell containing 2 or more density matrices, or &lt;tt&gt;X&lt;/tt&gt; can be a matrix whose columns are pure vector states.<br /> * &lt;tt&gt;P&lt;/tt&gt; (optional, default &lt;tt&gt;[1/k, 1/k, ..., 1/k]&lt;/tt&gt;, where &lt;tt&gt;k&lt;/tt&gt; is the number of quantum states): A vector whose j-th entry is the probability that the state $\rho_j$ is given to you in the game described above. * &lt;tt&gt;DIM&lt;/tt&gt; (optional, default has both subsystems of equal dimension): A 1-by-2 vector containing the dimensions of the subsystems on which the states described by &lt;tt&gt;X&lt;/tt&gt; act.<br /> * &lt;tt&gt;COPIES&lt;/tt&gt; (optional, default 2): The number of copies of the second subsystem (i.e., the measurements will have a &lt;tt&gt;COPIES&lt;/tt&gt;-level symmetric extension).<br /> * &lt;tt&gt;PPT&lt;/tt&gt; (optonal, default &lt;tt&gt;true&lt;/tt&gt;): A flag (either &lt;tt&gt;true&lt;/tt&gt; or &lt;tt&gt;false&lt;/tt&gt;) indicating whether the symmetric extensions of the measurement operators must have positive partial transpose.<br /> * &lt;tt&gt;BOS&lt;/tt&gt; (optonal, default &lt;tt&gt;true&lt;/tt&gt;): A flag (either &lt;tt&gt;true&lt;/tt&gt; or &lt;tt&gt;false&lt;/tt&gt;) indicating whether the symmetric extensions of the measurement operators must be Bosonic (i.e., be supported on the symmetric subspace). <br /> * &lt;tt&gt;TOL&lt;/tt&gt; (optonal, default &lt;tt&gt;eps^(1/4)&lt;/tt&gt;): The numerical tolerance used when determining whether or not a symmetric extension exists.<br /> <br /> '''Important note:''' The input arguments are mutually optional (this is different from other QETLAB functions!). For example, if you want to specify the number of &lt;tt&gt;COPIES&lt;/tt&gt; to 3 and the dimension of the two subsystems to &lt;tt&gt;[2 3]&lt;/tt&gt;, you can call the function as follows: &lt;tt&gt;LocalDistinguishability(X, 'COPIES', 3, 'DIM', [2 3])&lt;/tt&gt;<br /> <br /> ===Output arguments===<br /> * &lt;tt&gt;DIST&lt;/tt&gt;: The maximum probability of distinguishing the states specified by &lt;tt&gt;X&lt;/tt&gt;.<br /> * &lt;tt&gt;MEAS&lt;/tt&gt; (optional): A cell containing optimal measurement operators that distinguish the states specified by &lt;tt&gt;X&lt;/tt&gt; with probability &lt;tt&gt;DIST&lt;/tt&gt;.<br /> * &lt;tt&gt;DUAL_SOL&lt;/tt&gt; (optional): A dual solution that verifies that the maximum distinguishability probability is indeed no larger than &lt;tt&gt;DIST&lt;/tt&gt;.<br /> <br /> ==Examples==<br /> Some examples should be added.<br /> <br /> {{SourceCode|name=LocalDistinguishability}}<br /> <br /> ==Notes==<br /> The methods used by this function to compute the local distinguishability of quantum states was developed in &lt;ref&gt;A. Cosentino. ''Quantum State Local Distinguishability via Convex Optimization''. PhD thesis, University of Waterloo, 2015.&lt;/ref&gt;.<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=Distinguishability&diff=903 Distinguishability 2018-06-13T16:33:17Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=Distinguishability<br /> |desc=Computes the maximum probability of distinguishing quantum states<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[ChannelDistinguishability]]&lt;br /&gt;[[LocalDistinguishability]]<br /> |cat=[[List of functions#Distinguishing_objects|Distinguishing objects]]<br /> |upd=October 6, 2014<br /> |v=0.50}}<br /> &lt;tt&gt;'''Distinguishability'''&lt;/tt&gt; is a [[List of functions|function]] that computes the maximum probability of distinguishing two or more quantum states. That is, this function computes the maximum probability of winning the following game: You are given a complete description of a set of $k$ quantum states $\rho_1, \ldots, \rho_k$, and then are given one of those $k$ states, and asked to determine (via quantum measurement) which state was given to you.<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;DIST = Distinguishability(X)&lt;/tt&gt;<br /> * &lt;tt&gt;DIST = Distinguishability(X,P)&lt;/tt&gt;<br /> * &lt;tt&gt;[DIST,MEAS] = Distinguishability(X,P)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> ===Input arguments===<br /> * &lt;tt&gt;X&lt;/tt&gt;: The quantum states to be distinguished. &lt;tt&gt;X&lt;/tt&gt; can either be a cell containing 2 or more density matrices, or &lt;tt&gt;X&lt;/tt&gt; can be a matrix whose columns are pure vector states.<br /> * &lt;tt&gt;P&lt;/tt&gt; (optional, default &lt;tt&gt;[1/k, 1/k, ..., 1/k]&lt;/tt&gt;, where &lt;tt&gt;k&lt;/tt&gt; is the number of quantum states): A vector whose j-th entry is the probability that the state $\rho_j$ is given to you in the game described above. All entries must be non-negative, and the entries of this vector must sum to 1.<br /> <br /> ===Output arguments===<br /> * &lt;tt&gt;DIST&lt;/tt&gt;: The maximum probability of distinguishing the states specified by &lt;tt&gt;X&lt;/tt&gt;.<br /> * &lt;tt&gt;MEAS&lt;/tt&gt; (optional): A cell containing optimal measurement operators that distinguish the states specified by &lt;tt&gt;X&lt;/tt&gt; with probability &lt;tt&gt;DIST&lt;/tt&gt;.<br /> <br /> ==Examples==<br /> ===Orthogonal states can be perfectly distinguished===<br /> Any number of quantum states can be perfectly distinguished (i.e., distinguished with probability 1) if they are mutually orthogonal. The following code generates a random $6\times 6$ unitary matrix (i.e., a matrix with orthogonal pure states as columns) and verifies that those pure states are perfectly distinguishable:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; Distinguishability(RandomUnitary(6))<br /> <br /> ans =<br /> <br /> 1<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Two states===<br /> The maximum probability of distinguishing two quantum states $\rho$ and $\sigma$ is exactly $\frac{1}{2} + \frac{1}{4}\|\rho - \sigma\|_1$&lt;ref&gt;John Watrous. [https://cs.uwaterloo.ca/~watrous/CS766/LectureNotes/all.pdf Theory of Quantum Information lecture notes], Fall 2011.&lt;/ref&gt;, where $\|\cdot\|_1$ is the [[TraceNorm|trace norm]]. We can verify this in a special case as follows:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; rho = RandomDensityMatrix(4);<br /> &gt;&gt; sigma = RandomDensityMatrix(4);<br /> &gt;&gt; Distinguishability({rho, sigma})<br /> <br /> ans =<br /> <br /> 0.7762<br /> <br /> &gt;&gt; 1/2 + TraceNorm(rho - sigma)/4<br /> <br /> ans =<br /> <br /> 0.7762<br /> &lt;/syntaxhighlight&gt;<br /> <br /> ===Three or more states===<br /> We can also compute the maximum probability of distinguishing three or more states, but no simple formula is known in this case.<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; for j = 1:6<br /> rho{j} = RandomDensityMatrix(4);<br /> end<br /> &gt;&gt; Distinguishability(rho)<br /> <br /> ans =<br /> <br /> 0.4156<br /> &lt;/syntaxhighlight&gt;<br /> {{SourceCode|name=Distinguishability}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri http://www.qetlab.com/wiki/index.php?title=ChannelDistinguishability&diff=902 ChannelDistinguishability 2018-06-13T16:32:21Z <p>Rmmateri: </p> <hr /> <div>{{Function<br /> |name=ChannelDistinguishability<br /> |desc=Computes the maximum probability of distinguishing two quantum channels<br /> |req=[http://cvxr.com/cvx/ CVX]<br /> |rel=[[Distinguishability]]&lt;br /&gt;[[LocalDistinguishability]]<br /> |cat=[[List of functions#Distinguishing_objects|Distinguishing objects]]<br /> |upd=November 27, 2014}}<br /> &lt;tt&gt;'''ChannelDistinguishability'''&lt;/tt&gt; is a [[List of functions|function]] that computes the maximum probability of distinguishing two quantum channels. That is, this function computes the maximum probability of winning the following game: You are given a complete description of two quantum channels $\Phi$ and $\Psi$, and then are given one of those two channels, and asked to determine which channel was given to you (by supplying some input state to the channel and then measuring the output).<br /> <br /> ==Syntax==<br /> * &lt;tt&gt;DIST = ChannelDistinguishability(PHI,PSI)&lt;/tt&gt;<br /> * &lt;tt&gt;DIST = ChannelDistinguishability(PHI,PSI,P)&lt;/tt&gt;<br /> * &lt;tt&gt;DIST = ChannelDistinguishability(PHI,PSI,P,DIM)&lt;/tt&gt;<br /> <br /> ==Argument descriptions==<br /> * &lt;tt&gt;PHI,PSI&lt;/tt&gt;: The quantum channels to be distinguished. They can either be input as Choi matrices or as cells of Kraus operators.<br /> * &lt;tt&gt;P&lt;/tt&gt; (optional, default &lt;tt&gt;[1/2, 1/2]&lt;/tt&gt;): A vector that specifies that &lt;tt&gt;PHI&lt;/tt&gt; and &lt;tt&gt;PSI&lt;/tt&gt; are chosen with probability &lt;tt&gt;P(1)&lt;/tt&gt; and &lt;tt&gt;P(2)&lt;/tt&gt;, respectively.<br /> * &lt;tt&gt;DIM&lt;/tt&gt; (optional, by default tries to guess the input and output dimensions): A 1-by-2 vector containing the input and output dimensions of &lt;tt&gt;PHI&lt;/tt&gt; and &lt;tt&gt;PSI&lt;/tt&gt;. &lt;tt&gt;DIM&lt;/tt&gt; is required if and only if both &lt;tt&gt;PHI&lt;/tt&gt; and &lt;tt&gt;PSI&lt;/tt&gt; are provided as Choi matrices and the input and output dimensions are different.<br /> <br /> ==Examples==<br /> ===Perfectly distinguishable channels===<br /> The following code demonstrates that the simple example of two channels that can be perfectly distinguished from &lt;ref&gt;John Watrous. [https://cs.uwaterloo.ca/~watrous/CS766/LectureNotes/20.pdf Lecture 20: Channel distinguishability and the completely bounded trace norm], ''Theory of Quantum Information Lecture Notes'', 2011.&lt;/ref&gt; can indeed be perfectly distinguished:<br /> &lt;syntaxhighlight&gt;<br /> &gt;&gt; n = 4;<br /> &gt;&gt; Phi = SymmetricProjection(n)*2/(n+1);<br /> &gt;&gt; Psi = AntisymmetricProjection(n)*2/(n-1);<br /> &gt;&gt; ChannelDistinguishability(Phi,Psi)<br /> <br /> ans =<br /> <br /> 1.0000<br /> &lt;/syntaxhighlight&gt;<br /> <br /> {{SourceCode|name=ChannelDistinguishability}}<br /> <br /> ==References==<br /> &lt;references /&gt;</div> Rmmateri