Package: qustop
QUSTOPNOTE: Thequstoppackage is still is under development.Thequstop(QUantum STate OPtimizer) package is a Python toolkit for studying
various quantum state optimization scenarios including calculating optimal
values for quantum state distinguishability, quantum state exclusion, quantum
state cloning, and more.ApplicationsThequstoppackage can be used to:Calculate and approximate optimal probabilities of distinguishing quantum
states over positive, PPT, and separable measurements with either minimum-error
or unambiguously.Calculate and approximate optimal probabilities of excluding quantum states
with either minimum-error or unambiguously.InstallationSee theinstallation guide.UsageSee thedocumentation.ExamplesFor more examples, please consultqustop/examplesas well as thequstopintroductory
tutorial.Quantum state distinguishabilityFurther examples on quantum state distinguishability can be found in thequstop/examples/opt_distdirectory.Consider the following Bell states:We will be using these states to consider a number of applications in the realm
of quantum state distinguishability.Distinguishing two orthogonal statesA result ofarXiv:0007098states that
any two orthogonal pure states can be distinguished perfectly by LOCC
measurements. As the optimal probability of distinguishing via LOCC
measurements is a lower bound on positive, PPT, separable, etc., we should
expect to also see a value of1to indicate perfect probability of
distinguishing.fromtoqito.statesimportbellfromqustopimportState,Ensemble,OptDistdims=[2,2]states=[State(bell(0)*bell(0).conj().T,dims),State(bell(1)*bell(1).conj().T,dims)]probs=[1/2,1/2]ensemble=Ensemble(states,probs)sep_res=OptDist(ensemble,"sep","min-error")sep_res.solve()ppt_res=OptDist(ensemble,"ppt","min-error")ppt_res.solve()pos_res=OptDist(ensemble,"pos","min-error")pos_res.solve()Checking the respective values of the solved instances, we see that all of the
values are equal to one, which indicate that the two pure states are indeed
perfectly distinguishable under PPT, separable, and positive measurements.>>>print(pos_res.value)0.9999999999384911>>>print(ppt_res.value)1.0000000047560667>>>print(sep_res.value)0.9999999995278338Four indistinguishable orthogonal maximally entangled statesIt was shown inarXiv:1205.1031and later
extended inarXiv:1307.3232that for the
following set of statesthat the optimal probability of distinguishing via a PPT measurement should
yield an optimal probability of 7/8.importnumpyasnpfromtoqito.statesimportbellfromqustopimportState,Ensemble,OptDistdims=[2,2,2,2]rho_0=np.kron(bell(0),bell(0))*np.kron(bell(0),bell(0)).conj().Trho_1=np.kron(bell(2),bell(1))*np.kron(bell(2),bell(1)).conj().Trho_2=np.kron(bell(3),bell(1))*np.kron(bell(3),bell(1)).conj().Trho_3=np.kron(bell(1),bell(1))*np.kron(bell(1),bell(1)).conj().Tensemble=Ensemble([State(rho_0,dims),State(rho_1,dims),State(rho_2,dims),State(rho_3,dims)])sd=OptDist(ensemble,"ppt","min-error")sd.solve()Indeed the optimal value obtained viaqustopis equal to 7/8:# 7/8 \approx 0.875>>>print(sd.value)0.8749769201568257It was also shown inarXiv:1205.1031that the optimal
probability of distinguishing amongst these same state unambiguously via PPT measurements was
equal to 3/4.sd=OptDist(ensemble,"ppt","unambiguous")sd.solve()# 3/4 = 0.75>>>print(sd.value)0.749999999939434Entanglement cost of distinguishing Bell statesOne may ask whether the ability to distinguish a state can be improved by
making use of an auxiliary resource state.,for some ε in [0, 1].It was shown inarXiv:1408.6981that the
probability of distinguishing four Bell states with a resource state via PPT
measurements or separable measurements is given by the closed-form expressionwhere the ensemble is defined asUsingqustop, we may encode this scenario as follows.importnumpyasnpfromtoqito.statesimportbasis,bellfromqustopimportState,Ensemble,OptDiste_0,e_1=basis(2,0),basis(2,1)eps=0.5tau=np.sqrt((1+eps)/2)*np.kron(e_0,e_0)+np.sqrt((1-eps)/2)*np.kron(e_1,e_1)dims=[2,2,2,2]states=[State(np.kron(bell(0),tau),dims),State(np.kron(bell(1),tau),dims),State(np.kron(bell(2),tau),dims),State(np.kron(bell(3),tau),dims),]probs=[1/4,1/4,1/4,1/4]ensemble=Ensemble(states,probs)sep_res=OptDist(ensemble,"sep","min-error")sep_res.solve()ppt_res=OptDist(ensemble,"ppt","min-error")ppt_res.solve()eq=1/2*(1+np.sqrt(1-eps**2))Note that when we print out the optimal values for both separable and PPT
measurements that the values obtained agree with the closed form expression.>>>print(eq)0.9330127018922193>>>print(ppt_res.value)0.933010488554166>>>print(sep_res.value)0.9330124607534689It was also shown inarXiv:1408.6981that
the closed-form probability of distinguishing three Bell states with a resource
state using separable measurements to be given by the closed-form expression:where the ensemble is defined asUsingqustop, we may encode this scenario as follows.importnumpyasnpfromtoqito.statesimportbasis,bellfromqustopimportState,Ensemble,OptDiste_0,e_1=basis(2,0),basis(2,1)eps=0.5tau=np.sqrt((1+eps)/2)*np.kron(e_0,e_0)+np.sqrt((1-eps)/2)*np.kron(e_1,e_1)dims=[2,2,2,2]states=[State(np.kron(bell(0),tau),dims),State(np.kron(bell(1),tau),dims),State(np.kron(bell(2),tau),dims),]probs=[1/3,1/3,1/3]ensemble=Ensemble(states,probs)sep_res=OptDist(ensemble,"sep","min-error",level=2)sep_res.solve()eq=1/3*(2+np.sqrt(1-eps**2))Pritning the values of both the closed-form equation and the value obtained via
the SDP, we obtain:>>>print(sep_res.value)0.9583057987150858>>>print(eq)0.9553418012614794Note that the value ofsep_res.valueis actually a bit higher thaneq. This
is because the separable value is calculated by a hierarchy of SDPs. At low
levels of the SDP, the problem can often converge to the optimal value, but
other times it is necessary to compute higher levels of the SDP to eventually
arrive at the optimal value. While this is intractable in general, in practice,
the SDP can often converge or at least get fairly close to the optimal value
for small problem sizes.Werner hiding pairsInarXiv:0011042andarXiv:0103098a quantum data hiding
protocol that encodes a classical bit in a Werner hiding pair was provided.A Werner hiding pair is defined aswhereis the swap operator defined for some dimension n >= 2.It was show inhdl:10012/9572thatwhere the ensemble is defined asUsingqustop, we may encode this scenario as follows.importnumpyasnpfromtoqito.permsimportswap_operatorfromqustopimportEnsemble,State,OptDistdim=2sigma_0=(np.kron(np.identity(dim),np.identity(dim))+swap_operator(dim))/(dim*(dim+1))sigma_1=(np.kron(np.identity(dim),np.identity(dim))-swap_operator(dim))/(dim*(dim-1))states=[State(sigma_0,[2,2]),State(sigma_1,[2,2])]ensemble=Ensemble(states)expected_val=1/2+1/(dim+1)sd=OptDist(ensemble=ensemble,dist_measurement="ppt",dist_method="min-error",eps=1e-8)sd.solve()We can verify that the closed-form expression matches that of the value
returned fromqustop.print(sd.value)0.8333333333668715print(expected_val)0.8333333333333333State exclusionThe primary difference between the quantum state distinguishability
scenario and the quantum state exclusion scenario is that in the former,
Bob want to guess which state he was given, and in the latter, Bob wants to
guess which state he wasnotgiven.State cloning(Coming soon).LicenseGNU GPL v.3.0.