Channel Conversions
Conversion
Juqst.choi2liou
— Functionchoi2liou
Takes a superoperator in choi matrix form and returns the liouville superoperator (computational basis)
Juqst.choi2kraus
— Functiontakes the choi matrix and returns the kraus operators. This stays the same, save that we need to take into account dimensional factors. Note slight negative eigenvalue (rounding can cause problems). Here I round to 15 digits.
Juqst.choiX2liou
— Functiontakes the Chi matrix (Choi matrix in Pauli basis) and return the liouville superoperator, computaitonal basis
Juqst.choi2chi
— FunctionTakes a choi matrix and returns the Chi Matrix Note the basis here has changed from marcusps version, The rightmost paulis are varying the quickest.
Juqst.chi2choi
— FunctionTakes a chi matrix and returns the choi Matrix Note the basis here has changed from marcusps version, Note we normalise (divide by dsq). Some conventions differ.
Juqst.kraus2choi
— FunctionTakes a vector of kraus operators and returns the choi matrix
Juqst.kraus2liou
— FunctionTakes a vector of kraus operators (matrices) and converts them to a liouville superoperator (computational basis)
Juqst.liou2choi
— Functionliou2choi
Take a liouville superoperator (computational basis) and return the choi matrix
Juqst.liou2choiX
— Functiontakes a liouville superoperator (computational basis) and returns the Chi matrix (basically the choi matrix in Pauli basis)
Juqst.liou2kraus
— FunctionTakes a liouville superoperator (computational basis) and returns a vector of the equivalen Krawu vectors
Juqst.liou2pauliliou
— FunctionConverts a liouville superoperator in the computaional basis to one in the pauli basis. Order of Paulis is I,X,Y and Z.
Juqst.pauliliou2liou
— FunctionConverts a liouville superoperator in the Pauli basis to one in the computational basis. Order of Paulis is I,X,Y and Z.
Manipulation
Juqst.makeSuper
— Functionfunction makeSuper(u)
Takes an operator and turns into a superoperator. Pauli basis.
Juqst.getSuperVec
— Functionpass in a density matrix, gives you the super vector that corresponds to it
Verification
Juqst.istp
— Functionistp(m;tol)
Returns whether is trace perserving.. Assumes input is in liouville basis (not pauli-liouville - use pauliliou2liou)
Juqst.iscp
— Functioniscp(m;tol)
Returns whether is completely positivel. Assumes input is in liouville basis (not pauli-liouville - use pauliliou2liou) Converts to choi and checks the eigenvalues. – tweaked to increase eps slightly was getting a trivial false !cp right on the boundary.
Juqst.ischannel
— Functionischannel(m;tol)
Returns whether is the liouville superoperator is trace perserving and completely positive. Assumes input is in liouville basis (not pauli-liouville - use pauliliou2liou)
Juqst.isunital
— Functionunital(m;tol)
Returns whether is the liouville superoperator is unital. Assumes input is in liouville basis (not pauli-liouville - use pauliliou2liou)
Helper
Juqst.observeBasis
— FunctionobserveBasis(basis,Λ)
Arguments
basis: Array{Float64,1}
A list of the Paulis basis you want to oberve in. e.g. [1,2,1,3] would be four qubits representing [X,Y,X,Z]Λ: Array{Float64,2}
: The superoperator of the noise. Assumed appropriately sized (4^n x 4^n) , where n is the number of basis provided.
Returns
The 2^n probability distribution (of up/down measurements) that would be seen if you put those Paulis through the channel and tried to measure in the same basis.
observeBasis(basis,Λ)
Arguments
basis: Array{Float64,1}
A list of the Paulis basis you want to oberve in. e.g. [1,2,1,3] would be four qubits representing [X,Y,X,Z]Λ: Array{Float64,1}
: In this case we assume a Pauli channel and the noise is represented as a vector of the Pauli eigenvalues (4^n) long.
Returns
The 2^n probability distribution (of up/down measurements) that would be seen if you put those Paulis through the channel and tried to measure in the same basis.
Juqst.genLabels
— FunctionHelper function for labeling graphs, pass in the qubits get the string of Is and Zs e.g. with two you get ["00","01","10","11"]
Juqst.measure
— Methodmeasure(s,measureNoise, allZs)
Helper function in open-systems.jl Pass in the state, the noise (as a superOperator) and the measurements - use allZs to generate) returns the mapped function (x->x'measureNoises,allZs)
Juqst.genArrows
— FunctionHelper function (chart axis) return all the ups and downs for a certain number of qubits as a list of strings
Juqst.genZs
— Functionreturns an array of the 'measurement' operators that extract each of the z measurements e.g. for two qubits will return the II, IZ, ZI and ZZ measurements