# List of functions

This is a list of functions provided by QETLAB, arranged by category. If you would prefer an alphabetical list of all functions please see 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.

## Basic operations

• IsPSD: Determines whether or not a matrix is positive semidefinite
• Tensor: Kronecker tensor product of two or more matrices
• TensorSum: Computes a vector or operator from its tensor decomposition

## Distinguishing objects

• ChannelDistinguishability: Computes the maximum probability of distinguishing two quantum channels
• Distinguishability: Computes the maximum probability of distinguishing quantum states
• LocalDistinguishability: Computes the maximum probability of distinguishing quantum states by symmetric-extendible and/or PPT measurements
• UPBSepDistinguishable: Determines whether or not an unextendible product basis is distinguishable by separable measurements

## Entanglement and separability

### Ball of separability

• AbsPPTConstraints: Builds the eigenvalue matrices that determine whether or not a state is absolutely PPT
• InSeparableBall: Checks whether or not an operator is in the ball of separability centered at the maximally-mixed state
• IsAbsPPT: Determines whether or not a density matrix is absolutely PPT

### Entanglement measures

• Concurrence: Computes the concurrence of a 2-qubit state
• EntFormation: Computes the entanglement of formation of a bipartite quantum state
• Negativity: Computes the negativity of a bipartite density matrix
• RandomRobustnessEntanglement: Computes the random robustness of entanglement of a bipartite quantum state

## Information theory

• Entropy: Computes the von Neumann or Rényi entropy of a density matrix

## Nonlocality and Bell inequalities

• BCSGameLB: Computes a lower bound on the quantum value of a binary contraint system (BCS) game
• BCSGameValue: Computes the maximum value of a binary constraint system (BCS) game
• BellInequalityMax: Computes the maximum value of a Bell inequality
• BellInequalityMaxQubits: Approximates the optimal value of a Bell inequality in qubit (i.e., 2-dimensional quantum) settings
• NonlocalGameLB: Computes a lower bound on the quantum value of a non-local game
• NonlocalGameValue: Computes the value of a two-player non-local game
• NPAHierarchy: Determines whether or not a set of probabilities satisfy the conditions of the NPA hierarchy
• XORGameValue: Computes the classical or quantum value of a non-local binary XOR game

## Norms and distance measures

### Operators and mixed states

• Fidelity: Computes the fidelity of two density matrices
• InducedMatrixNorm: Computes a lower bound of the induced p→q norm of a matrix
• kpNorm: Computes the (k,p)-norm of a vector or matrix
• kpNormDual: Computes the dual of the (k,p)-norm of a vector or matrix
• KyFanNorm: Computes the Ky Fan k-norm of an operator
• SkOperatorNorm: Bounds the S(k)-norm of an operator
• SchattenNorm: Computes the Schatten p-norm of an operator
• TraceNorm: Computes the trace norm of an operator

### Superoperators and channels

• CBNorm: Computes the completely bounded norm of a superoperator
• DiamondNorm: Computes the diamond norm of a superoperator
• InducedSchattenNorm: Computes a lower bound of the induced Schatten p→q norm of a superoperator
• MaximumOutputFidelity: Computes the maximum output fidelity of two quantum channels

## Special states, vectors, and operators

### Pure states

• Bell: Produces a Bell state
• BrauerStates: Produces all Brauer states
• DickeState: Generates a Dicke state
• GHZState: Generates a (generalized) GHZ state
• MaxEntangled: Produces a maximally entangled bipartite pure state
• WState: Generates a (generalized) W-state

### Other operators

• FourierMatrix: Generates the unitary matrix that implements the quantum Fourier transform
• GellMann: Produces a Gell-Mann operator
• GenGellMann: Produces a generalized Gell-Mann operator
• GenPauli: Produces a generalized Pauli operator (sometimes called a Weyl operator)
• Pauli: Produces a Pauli operator

## Superoperators

• ApplyMap: Applies a superoperator to an operator
• ChoiMatrix: Computes the Choi matrix of a superoperator
• ChoiMap: Produces the Choi map or one of its generalizations
• ComplementaryMap: Computes the complementary map of a superoperator
• DephasingChannel: Produces a dephasing channel
• DepolarizingChannel: Produces a depolarizing channel
• DualMap: Computes the dual of a superoperator in the Hilbert-Schmidt inner product
• IsCP: Determines whether or not a superoperator is completely positive
• IsHermPreserving: Determines whether or not a superoperator is Hermiticity preserving
• KrausOperators: Computes a set of Kraus operators for a superoperator
• PartialMap: Applies a superoperator to a subsystem of an operator
• PartialTrace: Computes the partial trace of a matrix
• PartialTranspose: Computes the partial transpose of a matrix
• PauliChannel: Generates a Pauli channel (i.e., a quantum channel with Pauli Kraus operators)
• Realignment: Computes the realignment of a bipartite operator
• ReductionMap: Produces the reduction map
• Twirl: Twirls a bipartite or multipartite operator

## Unextendible product bases

• IsUPB: Determines whether or not a set of product vectors form a UPB
• MinUPBSize: Gives the minimum cardinality of an unextendible product basis in given dimensions
• UPB: Generates an unextendible product basis

## Miscellaneous

• Commutant: Computes the commutant of a set of matrices
• IsTotallyNonsingular: Determines whether or not a matrix is totally nonsingular
• IsTotallyPositive: Determines whether or not a matrix is totally positive
• Majorizes: Determines whether or not a vector or matrix majorizes another
• OperatorSinkhorn: Performs the operator Sinkhorn iteration, making all single-party reduced states proportional to the identity
• Purity: Computes the purity of a quantum state

## Helper functions

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.

• bcs_to_nonlocal: Converts a constraint description of a binary constraint system (BCS) game to a general non-local game description
• dec_to_bin: Converts a decimal number to a binary number in a similar way to `de2bi' in MATLAB
• iden: Computes a sparse or full identity matrix
• jacobi_poly: Computes the coefficients of Jacobi polynomials
• normalize_cols: Scales the columns of a matrix to have norm 1
• one_factorization: Computes a 1-factorization of a list of objects
• opt_args: Handles optional input arguments for functions
• opt_disp: Display a message to the user (sometimes)