Complete Quantum Relational Hoare Logics from Optimal Transport Duality Thanks: 1 Key Laboratory of System Software (Chinese Academy of Sciences) and State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences, China Gilles Barthe 1 2 , Minbo Gao 3 , Theo Wang 4 , Li Zhou 1 5 Abstract We introduce a quantitative relational Hoare logic for quantum programs. Assertions of the logic range over a new infinitary extension of positive semidefinite operators. We prove that our logic is sound, and complete for bounded postconditions and almost surely terminating programs. Our completeness result is based on a quantum version of the duality theorem from optimal transport. We also define a complete embedding into our logic of a relational Hoare logic with projective assertions. I Introduction Relational Hoare logics are program logics used to reason about relationships between programs. Typically, their judgments are of the form \{P\}\ S_{1}\sim S_{2}\ \{Q\} , where S_{1} and S_{2} are programs, and P and Q are relational assertions, traditionally known as pre- and postcondition. In this paper, we consider the setting where S_{1} and S_{2} are quantum programs in the pure \mathsf{qWhile} language. In this setting, it is natural to define validity based on quantum couplings. Indeed, there exist several proof systems that support a rich set of proof rules and are sound w.r.t.  coupling-based notions of validity [ 1 , 2 , 3 ] . These proof systems have been used to reason about quantum processes and quantum security. However, the proof-theoretic foundations of these proof systems remain unexplored. In particular, there is no prior account of the completeness of these systems. The challenge with completeness arises from the existential nature of coupling-based reasoning: validity of a Hoare judgment \{P\}\ S_{1}\sim S_{2}\ \{Q\} asserts the existence of a suitable coupling, called witness coupling, between (output states of) S_{1} and S_{2} . Therefore, the completeness of the proof system is intuitively equivalent to proving that the rules of the proof system suffice to build all valid couplings between two programs. Unfortunately, it seems difficult to establish a direct argument of this kind. One reason is that proof rules are compositional and allow to build couplings that respect the structure of programs, so it seems plausible that the proof rules are incomplete. In this paper, we do not attempt a direct proof of completeness. Rather, we observe that one can achieve completeness by leveraging a duality theorem for quantum couplings. Contributions The main contribution of this paper is a complete proof system for almost surely terminating programs and positive semi-definite (PSD) assertions. The proof system contains three parts. The first part is a minimalistic, standard, set of rules—concretely, one left and right rule for each construct, two-sided rules for skip and sequential composition, and a rule of consequence w.r.t.  the usual Löwner order \sqsubseteq on assertions. We prove that this set of rules is complete for split postconditions, i.e.  postconditions of the form Q_{1}\otimes I+I\otimes Q_{2} , where Q_{1} and Q_{2} are unary assertions. The proof follows by classic structural induction on programs—for technical considerations that will be explained later, the proof also requires that validity be defined using a new variant of quantum coupling, called partial coupling, of independent interest. The second part is a new structural rule, called the duality rule. The validity of the (duality) rule is based on a quantum duality theorem, akin to the celebrated Kantorovich-Rubinstein duality theorem for the probabilistic setting. The main benefit of the rule is that it allows to reduce a judgment of the form \{P\}\ S_{1}\sim S_{2}\ \{Q\} to a judgment of the form \{P\}\ S_{1}\sim S_{2}\ \{Q_{1}\otimes I-I\otimes Q_{2}\} where informally Q_{1} and Q_{2} are quantified universally over all unary assertions such that Q_{1}\otimes I-I\otimes Q_{2}\sqsubseteq Q . Therefore, the duality rules allow us to reduce the proof of a judgment with an arbitrary postcondition to the validity of a judgment with a split postcondition, for which the standard rules suffice. The third part of the logic are two-sided proof rules. These proof rules are important for the usability of the logic and are present in prior works, but are not needed for completeness, and will only be discussed briefly in the paper. The second contribution of the paper is an alternative interpretation of our proof system where assertions are drawn from an infinite-valued generalization of PSD operators. The logic remains sound for all postconditions and complete for all bounded postconditions—provided one restricts the (dual) rule to bounded postconditions. However, the main benefit of this generalization is that it provides a means to unify projective assertions, used e.g.  in [ 1 ] , and positive semi-definite operators. As an application, we provide a complete embedding into our logic of a relational Hoare logic with projective predicates. Finally, we leverage our completeness theorems to characterize some properties of interest. We give two characterizations of program equivalence. The first characterization is based on (finite-valued) positive semi-definite assertions and uses tools from stable quantum optimal transport. The second characterization is based on projective assertions (and infinite-valued predicates). We also present characterizations of quantum distance measures (trace distance and Wasserstein semi-distance), diamond norm for programs, non-interference and quantum differential privacy. Finally, as a contribution of independent interest, we prove that the recently proposed relational Hoare logic \mathsf{eRHL} for probabilistic programs [ 4 ] is complete for all bounded postconditions and AST programs. Summary of contributions In summary, the main contributions of the paper are: • a sound and complete relational program logic for quantum programs ( Theorem VI.3 , Theorem VI.7 ); • a complete semantic embedding of quantum relational Hoare logics using projective predicates using infinite-valued predicates ( Proposition VII.2 ); • characterizations of observational equivalence ( Theorem VIII.1 ), trace distance and diamond norm ( Proposition VIII.3 and Theorem VIII.6 ), Wasserstein distance ( Theorem VIII.8 ), non-interference ( Theorem VIII.13 ), and quantum differential privacy ( Theorem VIII.16 ); • a proof of completeness for the \mathsf{eRHL} relational program logic for probabilistic programs ( Proposition IX.2 ). II Notation and Preliminaries We assume basic familiarity to quantum computing (see standard textbook [ 5 ] ) and set the scene with some notations. Quantum states and maps Let \mathcal{H} be a Hilbert space. We define \mathcal{D}(\mathcal{H}) and \mathcal{D}^{1}(\mathcal{H}) to be the set of partial density operators (i.e. positive semi-definite (PSD) operators with trace \leq 1 ) and density operators (i.e. partial density operators with trace 1) over \mathcal{H} , respectively. Intuitively, \mathcal{D}(\mathcal{H}) represents the subdistributions over pure states in \mathcal{H} and \mathcal{D}^{1}(\mathcal{H}) contains only the full distributions. Furthermore, we write \mathcal{QC}(\mathcal{H}) and \mathcal{QO}(\mathcal{H}) for the set of quantum channels (CPTP maps) and quantum operations (trace-nonincreasing CP maps) over \mathcal{H} . We use the former to interpret all almost surely terminating quantum programs and the latter to represent general quantum programs. Obviously, \mathcal{QC}(\mathcal{H})\subsetneq\mathcal{QO}(\mathcal{H}) . Quantum predicates We define \mathcal{S}(\mathcal{H}) and \mathsf{Pos}(\mathcal{H}) to be respectively the closed subspaces (equivalently the orthogonal projectors) and the PSD operators on \mathcal{H} . Subspaces can be used as a ‘discrete’ predicate: a state \rho\in\mathcal{D}(\mathcal{H}) satisfies X\in\mathcal{S}(\mathcal{H}) if \supp(\rho)\subseteq X . General PSD operators are used as bounded quantitative predicates: the ‘extent’ to which \rho satisfies P\in\mathsf{Pos}(\mathcal{H}) is defined to be \tr(P\rho) . Commonly used predicates in the work include: the ‘symmetric’ predicate P_{sym}[\mathcal{H}]=\frac{1}{2}(I+\mathsf{SWAP}[\mathcal{H}]) (we sometimes denote it as =_{\text{sym}} ) where \mathsf{SWAP}[\mathcal{H}]=\sum_{ij}|ij\rangle\langle ji| , and parameter \mathcal{H} is omitted if it is clear from the context; and the ‘anti-symmetric’ predicate P_{sym}^{\bot} , i.e., the complement of the projector P_{sym} , P_{sym}^{\bot}[\mathcal{H}]=\frac{1}{2}(I-\mathsf{SWAP}[\mathcal{H}]) . Note that both P_{sym}[\mathcal{H}] and P_{sym}^{\bot}[\mathcal{H}] are in \mathcal{S}(\mathcal{H}\otimes\mathcal{H}) . Infinite-valued predicates In this work, we introduce a novel notion of possibly infinite-valued quantitative predicates, denoted \mathsf{Pos}^{\infty}(\mathcal{H}) , by allowing positive operators to have an eigenspace corresponding to eigenvalue +\infty . In other words, any A\in\mathsf{Pos}^{\infty}(\mathcal{H}) has an eigenvalue decomposition \{(\lambda_{i},X_{i})\}_{i} where \lambda_{i}\in\mathbb{R}^{+\infty}\triangleq[0,+\infty] , the non-zero eigenspaces X_{i} are pairwise orthogonal, and \sum_{i}X_{i}=I . As a convention, we define (+\infty)\cdot 0=0\cdot(+\infty)=0 , (+\infty)+a=a+(+\infty)=+\infty for a\in\mathbb{R}^{+\infty} , and +\infty\leq+\infty . We now extend the definitions of various operations on PSD operators to \mathsf{Pos}^{\infty}(\mathcal{H}) . Firstly, for any |\psi\rangle , the inner product \langle\psi|A|\psi\rangle is defined as \langle\psi|A|\psi\rangle\triangleq\sum_{i}\lambda_{i}\langle\psi|X_{i}|\psi\rangle. This definition allows us to extend all the operations and constructions on PSD operators that this work relies on to the infinite-valued case. For example, the extended Löwner order is defined by A_{1}\sqsubseteq A_{2} if for all |\psi\rangle , \langle\psi|A_{1}|\psi\rangle\leq\langle\psi|A_{2}|\psi\rangle . We refer the reader to the appendix for more details on the supported operations (see Definition A.6 ). Finally, for X\in\mathcal{S}(\mathcal{H}) and A\in\mathsf{Pos}^{\infty}(\mathcal{H}) , we define X\mid A\triangleq A+(+\infty\cdot X^{\bot})\in\mathsf{Pos}^{\infty}(\mathcal{H}) . This will be useful for enforcing assertion-based, projective preconditions in the quantitative setting. For compactness reasons, in this paper, we present the technical development of our results in terms of the more general infinite-valued predicates. III Quantum Couplings We review basic definitions and theorems of quantum couplings and quantum optimal transport. III-A Basic Definitions and Duality Theorems In probability theory, probabilistic couplings are a powerful tool for reasoning about different ways of correlating two distributions. A coupling of two distributions d_{1} , d_{2} is a joint distribution with d_{1} , d_{2} as its respective marginals. Quantum couplings are the quantum analogue of probabilistic couplings; instead of (sub)distributions, they relate (partial) density operators. Definition III.1 (Quantum Coupling) . Let \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) be two partial density operators. A coupling between \rho_{1} and \rho_{2} is a partial density operator \rho\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) such that \tr_{2}(\rho)=\rho_{1} and \tr_{1}(\rho)=\rho_{2} . We write \rho:\langle\rho_{1},\rho_{2}\rangle . Strassen’s theorem [ 6 ] provides a necessary and sufficient condition for the existence of a coupling with respect to a given relation. Zhou et al . [ 7 ] lift Strassen’s theorem to the quantum setting. Their theorem relates a quantum lifting (where for any subspace X , a lifting \rho_{1}X^{\#}\rho_{2} is witnessed by couplings of the form \rho:\langle\rho_{1},\rho_{2}\rangle such that \supp(\rho)\subseteq X ) to a universally quantified property that reasons about \rho_{1} and \rho_{2} separately. Their proof is based on semi-definite programming (SDP), a common technique in quantum computing and information theory. It turns out that the same technique can be generalized to accommodate for a more general, ‘quantitative’ version of liftings, as stated below. Definition III.2 (Quantum Lifting with Defects) . Let \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) , and \epsilon\in\mathbb{R}^{+\infty} be a defect. Let X\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) . Then \rho\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) is called a witness of the lifting \rho_{1}X^{\#}_{\epsilon}\rho_{2} iff 1. \rho:\langle\rho_{1},\rho_{2}\rangle , 2. \tr(X\rho)\leq\epsilon , Note that for any subspace X , \rho_{1}X^{\#}\rho_{2} iff \rho_{1}(X^{\bot})^{\#}_{0}\rho_{2} . Theorem III.3 (Quantum Strassen’s Theorem with Defects) . For any \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) with \tr(\rho_{1})=\tr(\rho_{2}) , for any defect \epsilon\in\mathbb{R}^{+\infty} and for any X\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , the following are equivalent: 1. \rho_{1}X^{\#}_{\epsilon}\rho_{2} ; 2. For any Y_{1}\in\mathsf{Pos}(\mathcal{H}_{1}) and Y_{2}\in\mathsf{Pos}(\mathcal{H}_{2}) such that X\sqsupseteq Y_{1}\otimes I_{2}-I_{1}\otimes Y_{2} , it holds that \tr(Y_{1}\rho_{1})\leq\tr(Y_{2}\rho_{2})+\epsilon The setting of the primal and dual problems in the proof is essentially the same as in [ 7 , 8 ] . III-B Partial Couplings The following fact is a basic consequence of the definition of quantum couplings. Lemma III.4 (Trace Equivalence) . Let \rho:\langle\rho_{1},\rho_{2}\rangle . Then, \tr(\rho)=\tr(\rho_{1})=\tr(\rho_{2}) . It follows that partial density operators can be coupled only if they have the same trace. This basic fact is a limiting factor for coupling-based relational Hoare logics. In particular, it limits our ability to reason about pairs of non-trace-preserving quantum operations (e.g. quantum programs with while loops). To address this limitation, we draw ideas from [ 4 ] ( \star -couplings) and [ 3 ] (quantum \bot -memories) and introduce the concept of partial couplings (see Proposition B.3 for precise relationship between \star -couplings and partial couplings). Definition III.5 (Partial Coupling) . For \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) , we say \rho\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) is a partial coupling of \rho_{1} and \rho_{2} , written \rho:\langle\rho_{1},\rho_{2}\rangle_{p} , if: \tr_{2}(\rho)\sqsubseteq\rho_{1},\quad\tr_{1}(\rho)\sqsubseteq\rho_{2},\quad\tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\rho). The first two inequalities say that the coupling \rho is partial: it represents a correlation between parts of the marginal state \rho_{1} , \rho_{2} , and leaves another part of the states uncorrelated. The last inequality is a requirement on the uncorrelated parts of the marginal states. It can be decomposed into two inequalities: \displaystyle\tr(\rho_{1}-\tr_{2}(\rho)) \displaystyle\leq 1-\tr(\rho_{2}) \displaystyle\tr(\rho_{2}-\tr_{1}(\rho)) \displaystyle\leq 1-\tr(\rho_{1}). Explained using programming language terms, the first inequality says that the probability of the uncorrelated part of the first system, \tr(\rho_{1}-\tr_{2}(\rho)) , should not exceed the probability of non-termination in the second system, 1-\tr(\rho_{2}) . The meaning of the second inequality can be obtained by symmetry. Obviously, any coupling is a partial coupling, i.e., \rho:\langle\rho_{1},\rho_{2}\rangle implies \rho:\langle\rho_{1},\rho_{2}\rangle_{p} . In the case where \rho_{1},\rho_{2} are density operators, any partial coupling is also a coupling, i.e., \rho:\langle\rho_{1},\rho_{2}\rangle_{p} implies \rho:\langle\rho_{1},\rho_{2}\rangle if \tr(\rho_{1})=\tr(\rho_{2})=1 . Partial coupling is preserved under (sub-)convex combination and scalar multiplication (see Proposition B.4 ). A variant of duality theorem for partial coupling is established via SDP (see Theorem B.5 ). IV Quantum Optimal Transport One of the applications of quantum coupling is to reason about relational properties of quantum states and thus quantum channels and operations. We first review the basic concept of quantum optimal transport and then show how it can be used to characterize the equivalence of quantum channels. IV-A Basic Definitions The optimal transport problem [ 9 ] is a classical optimization problem. Its goal is to minimize the transportation cost of goods from sources to sinks. The optimal transport problem has a natural formulation based on probabilistic couplings. In this section, we review a quantum version of optimal transport. We mainly follow [ 8 ] . Definition IV.1 (Partial Quantum Optimal Transport (c.f. [ 8 ] )) . For a given cost function C\in\mathsf{Pos}^{\infty}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) and two states \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}),\rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) , the quantum optimal transport T_{C}(\rho_{1},\rho_{2})\triangleq\min_{\rho:\langle\rho_{1},\rho_{2}\rangle_{p}}\tr(C\rho), where \rho is ranging over all partial couplings of \rho_{1} and \rho_{2} . The minimum can be attained because the set of partial couplings is an non-empty, closed and convex set (see Proposition C.1 ). Whenever \rho_{1} and \rho_{2} are (total) density operators, every partial coupling is a coupling, and therefore, T_{C}(\rho_{1},\rho_{2})=\min_{\rho:\langle\rho_{1},\rho_{2}\rangle}\tr(C\rho) . The basic properties of QOT have been systematically studied, see [ 8 ] for a comprehensive review. For example, QOT is jointly convex on its input (see Proposition C.2 ). IV-B QOT under Data Processing The original definition of QOT studies the relationship between quantum states . In this work, we go one step further and ask: can QOT be used to represent and evaluate the relationship between quantum state transformers (i.e. quantum channels or operations)? To answer this question, we study how QOT evolves ‘under data processing’. Definition IV.2 . Let C_{i},C_{o}\in\mathsf{Pos}^{\infty}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) be input and output cost functions respectively. We say that a pair of quantum operations (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} iff T_{C_{o}}(\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2}))\leq T_{C_{i}}(\rho_{1},\rho_{2}) hold for all possible inputs \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) . It can be shown that it is sufficient to check monotonicity on inputs \rho_{1}\in\mathcal{D}^{1}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}^{1}(\mathcal{H}_{2}) , see Lemma C.3 . The next proposition establishes key properties of monotonicity. Proposition IV.3 . Monotonicity satisfies several desired properties for data processing: 1. Backward . (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. (\mathcal{E}_{1}^{\dagger}\otimes\mathcal{E}_{2}^{\dagger})(C) and C . Here, \mathcal{E}^{\dagger} is the dual of \mathcal{E} , which satisfies \tr(A\mathcal{E}(B))=\tr(\mathcal{E}^{\dagger}(A)B) for all linear operator A,B 1 1 1 For any super-operator \mathcal{E} , its dual \mathcal{E}^{\dagger} is another super-operator. Whenever \mathcal{E} is a quantum operation with Kraus operator \{E_{i}\} , then \mathcal{E}^{\dagger} has Kraus representation \{E_{i}^{\dagger}\} . . 2. Consequence . Suppose (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i}^{\prime} and C_{o}^{\prime} , and C_{i}^{\prime}\sqsubseteq C_{i} , C_{o}\sqsubseteq C_{o}^{\prime} , then (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} . 3. Sequential composition . Suppose (\mathcal{E}_{1},\mathcal{E}_{1}^{\prime}) is monotone w.r.t. C_{i} and C_{m} , and (\mathcal{E}_{2},\mathcal{E}_{2}^{\prime}) is monotone w.r.t. C_{m} and C_{o} , then (\mathcal{E}_{2}\circ\mathcal{E}_{1},\mathcal{E}_{2}^{\prime}\circ\mathcal{E}_{1}^{\prime}) is monotone w.r.t. C_{i} and C_{o} . Here, \circ is the composition of two quantum operations, i.e., for all \rho , (\mathcal{E}_{1}\circ\mathcal{E}_{2})(\rho)\triangleq\mathcal{E}_{1}(\mathcal{E}_{2}(\rho)) . The (Backward) property asserts that every pair of quantum channels is monotonic w.r.t.  an output cost and its pre-image under some form of relational pre-image. The (Consequence) property states that one can strengthen the input cost or weaken the output cost in the style of the rule of consequence. The (Sequential composition) property states that monotonocity is compositional. Additionally, our formulation of QOT under data processing allows us to translate the previous duality result about quantum states ( Theorem III.3 ) to the following duality theorem about quantum operations. Specifically, we show that monotonicity w.r.t. C_{i} and C_{o} is equivalent to monotonicity w.r.t.  a split output cost function. The duality theorem is carefully stated to match our assumptions, in particular that C_{o} is positive. It is also restricted to the case that C_{o} is finite. Theorem IV.4 (Duality under Data Processing) . Suppose \mathcal{E}_{1} and \mathcal{E}_{2} are quantum channels and costs C_{i}\in\mathsf{Pos}^{\infty} and C_{o}\in\mathsf{Pos} (i.e., C_{o} is finite). Then the following statements are equivalent: 1. (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} ; 2. for all (Y_{1},Y_{2},n)\in\mathcal{Y} , (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i}+nI and Y_{1}\otimes I+I\otimes(nI-Y_{2}) , where \mathcal{Y}\triangleq\{(Y_{1},Y_{2},n)\ |\ n\in\mathbb{N};0\sqsubseteq Y_{1};0\sqsubseteq Y_{2}\sqsubseteq nI;C_{o}\sqsupseteq Y_{1}\otimes I-I\otimes Y_{2}\} . This formalization will be instrumental in reducing arbitrary judgments to judgments with split postconditions. IV-C Characterizing Equivalence The symmetric and anti-symmetric predicates are standard tools used to characterize equivalence of quantum states [ 1 , 2 ] : indeed, two states \rho_{1} , \rho_{2} are equal iff there a (non-quantitative) lifting of the form \rho_{1}(=_{\text{sym}})^{\#}\rho_{2} . In this section, by lifting this tool to the setting of QOT under data processing, we give a complete characterization of equivalence between quantum channels . This is a significant result: as we shall see in Theorem VIII.1 , it directly leads to the first complete characterization of program equivalence in quantum relational Hoare logics only using finite-valued PSD predicates. Our starting point is the instantiation of QOT under data processing with C_{o}=C_{i}=P_{sym}^{\perp} , studied in [ 10 , 8 , 11 , 12 ] . For simplicity, we write T instead of T_{P_{sym}^{\bot}} . It is clear that T encapsulates some notion of equivalence: T(\rho,\sigma)=0 if and only if \rho=\sigma , given \rho,\sigma density operators. However, T cannot fully capture equivalence under data processing, because it is not monotone under general quantum channels [ 11 ] , i.e. the following does not always hold for every \mathcal{E} . T(\mathcal{E}(\rho),\mathcal{E}(\sigma))\leq T(\rho,\sigma) Indeed, it does hold for tensoring with an arbitrary quantum state [ 8 ] , i.e., \mathcal{E}:\rho\mapsto\rho\otimes\gamma , but not for the partial trace. This makes it difficult to completely reason about the equivalence of data processing operations using the current definition of T . Fortunately, [ 11 ] proposed a stabilized version of T , defined by T_{s}\triangleq\inf_{\gamma}T(\rho\otimes\gamma,\sigma\otimes\gamma) by extending (tensoring) with an arbitrary auxiliary state \gamma , which satisfies several desired properties such as joint convexity, and • (Invariance under tensor product) T_{s}(\rho\otimes\gamma,\sigma\otimes\gamma)=T_{s}(\rho,\sigma). • (Monotonicity under data processing) For \mathcal{E}\in\mathcal{QC} , T_{s}(\mathcal{E}(\rho),\mathcal{E}(\sigma))\leq T_{s}(\rho,\sigma). Surprisingly, it turns out that T_{s}(\rho,\sigma)=T\big(\rho\otimes\frac{I}{2},\sigma\otimes\frac{I}{2}\big) . The proof is technical and employs techniques like the Haar measure; we leave the details to Appendix G , and provide some intuition. Intuitively, this fact can be understood from two perspectives: 1) the quantum marginal problem, such as the monogamy of entanglement [ 13 ] , implies that extending the state can yield more couplings and therefore T_{s}(\rho,\sigma)\leq T(\rho,\sigma) and 2) extending it by a maximally mixed qubit is sufficient to produce all couplings that minimize optimal transport on the cost function P_{sym}^{\bot} , instead of ranging over all \gamma . These properties give a complete criterion for checking the equivalence of two quantum channels: Proposition IV.5 . Two quantum channels \mathcal{E}_{1} and \mathcal{E}_{2} are equivalent if and only if for all density operators \rho_{1},\rho_{2} , T_{s}(\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2}))\leq T_{s}(\rho_{1},\rho_{2}). While [ 11 ] already gives a precise characterization of T_{s} in terms of QOT, as a semi-definite program, we rephrase it as the following duality theorem: Proposition IV.6 (Duality for Stabilized QOT) . Given \rho_{1},\rho_{2}\in\mathcal{D}^{1}(\mathcal{H}) and \epsilon\in\mathbb{R}^{+} , the following are equivalent: 1. T_{s}(\rho_{1},\rho_{2})\leq\epsilon ; 2. For all Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}) such that P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq 2(Y_{1}\otimes I-I\otimes Y_{2}) , it holds that: \tr(\tr_{2}(Y_{1})\rho_{1})\leq\tr(\tr_{2}(Y_{2}))\rho_{2})+\epsilon. This property is crucial for establishing a judgment characterizing program equivalence (see Theorem VIII.1 ), as T_{s} itself cannot be directly encoded within our program logic. It additionally allows us to use a split postcondition and thus make the judgment completely derivable ( Theorem VI.6 ) without first applying the duality rule. V Quantum Programs We now present the syntax and semantics of the quantum programs considered in this paper. V-A Syntax We choose to use the quantum while -language defined in [ 14 , 15 ] . We assume a finite set qVar of quantum variables and use q,q_{0},q_{1},q_{2},\dots to denote them. The finite-dimensional state Hilbert space of a quantum variable q is denoted \mathcal{H}_{q} . A quantum register is a finite sequence of distinct quantum variables. The state space of a quantum register \overline{q}=q_{0}\dots q_{n} is then the tensor product \mathcal{H}_{\overline{q}}=\bigotimes_{i=0}^{n}\mathcal{H}_{q_{i}}. Definition V.1 (Syntax [ 14 ] ) . The set qProgs of quantum while -programs is defined by the following syntax: \displaystyle S::=\ \displaystyle\mathbf{skip}\mid S_{1};S_{2}\mid q:=|0\rangle\mid\overline{q}:=U[\overline{q}] (1) \displaystyle\mid\mathbf{if}\ (\Box m\cdot M[\overline{q}]=m\to S_{m})\ \mathbf{fi} (2) \displaystyle\mid\mathbf{while}\ M[\overline{q}]=1\ \mathbf{do}\ S\ \mathbf{od} (3) The constructs \mathbf{skip} and sequential composition S_{1};S_{2} are similar to their counterparts in the classical or probabilistic while -programs. The initialization q:=|0\rangle sets the quantum register q to the basis state |0\rangle . The statement \overline{q}:=U[\overline{q}] means that unitary transformation U is performed on the quantum register \overline{q} . The construct in ( 2 ) is a quantum generalization of classical case statement. In the execution, measurement M=\{M_{m}\} is performed on \overline{q} , and then a subprogram S_{m} will be selected according to the outcome of the measurement. The statement in ( 3 ) is a quantum generalization of while -loop, where the measurement M has only two possible outcomes: if the outcome is 0 , the program terminates, and if the outcome 1 occurs, the program executes the loop body S and then continues the loop. V-B Semantics For each quantum program S , we write \mathit{var}(S)\subseteq V for the set of all variables q\in\textbf{qVar} appearing in S . The Hilbert space of program S is the tensor product \mathcal{H}_{S}=\bigotimes_{q\in\mathit{var}(S)}\mathcal{H}_{q}. We interpret each program S denotationally as a complete positive trace non-increasing map \llbracket S\rrbracket\in\mathcal{QO}(\mathcal{H}_{S}) as follows: Definition V.2 (Denotational Semantics [ 14 ] ) . For any input state \rho\in\mathcal{H}_{S} , we have: 1. \llbracket\mathbf{skip}\rrbracket(\rho)=\rho ; 2. \llbracket q:=|0\rangle\rrbracket(\rho)=\sum_{n}|0\rangle_{q}\langle n|\rho|n\rangle_{q}\langle 0| ; 3. \llbracket\overline{q}:=U[\overline{q}]\rrbracket(\rho)=U_{\overline{q}}\rho U_{\overline{q}}^{\dagger} ; 4. \llbracket S_{1};S_{2}\rrbracket(\rho)=\llbracket S_{2}\rrbracket(\llbracket S_{1}\rrbracket(\rho)) ; 5. \llbracket\mathbf{if}(\Box m\cdot M[\overline{q}]=m\to S_{m})\mathbf{fi}\rrbracket(\rho)\\ =\sum_{m}\llbracket S_{m}\rrbracket(M_{m}\rho M_{m}^{\dagger}) ; 6. for loop \mathbf{while}[M,S]\equiv\mathbf{while}\ M[\overline{q}]=1\ \mathbf{do}\ S\ \mathbf{od} : \llbracket\mathbf{while}[M,S]\rrbracket(\rho)=\bigsqcup_{k=0}^{\infty}\llbracket\mathbf{while}^{(k)}[M,S]\rrbracket(\rho), where \mathbf{while}^{(k)}[M,S] is the k -fold iteration of the loop \mathbf{while} : \begin{cases}&\mathbf{while}^{(0)}[M,S]\equiv\textbf{abort},\\ &\mathbf{while}^{(k+1)}[M,S]\\ &\begin{aligned} \equiv\ &\mathbf{if}\ M[\overline{q}]=\ 0\to\mathbf{skip}\\ &\Box\qquad\qquad 1\to S;\mathbf{while}^{(k)}[M,S]\ \mathbf{fi}\end{aligned}\end{cases} for k\geq 0 , \bigsqcup stands for the least upper bound in the CPO of partial density operators with the Löwner order \sqsubseteq (see [ 15 ] , Lemma 3.3.2), and abort is a program that never terminates so that \llbracket\textbf{abort}\rrbracket(\rho)=\bf{0} for all \rho . In the special case where \llbracket S\rrbracket\in\mathcal{QC}(\mathcal{H}_{S}) , we say that S is almost-surely terminating (AST), or simply write S\in\mathsf{AST} . VI A Quantum Relational Hoare Logic We now present \mathsf{qOTL} , a quantum relational Hoare logic similar to [ 2 ] extended with logical variables, and prove its soundness. As we shall see in Section VI-B , this extension is crucial to enabling our completeness results. VI-A Definition In \mathsf{qOTL} , judgments are of the form \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} where predicates P,Q\in\mathsf{Pos}^{\infty}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , i.e., are infinite-valued positive semi-definite operators over \mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}} , parameterized over Z , and S_{1},S_{2} are programs. Validity of the judgment is defined using partial couplings. Definition VI.1 ( \mathsf{qOTL} Validity) . The judgment \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} is valid, written \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} if for every z\in Z , and \rho\in\mathcal{D}^{1}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , there exists a partial coupling \sigma for \langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle_{p} such that \tr(P_{z}\rho)\geq\tr(Q_{z}\sigma). We usually write P (resp Q ) instead of P_{z} (resp Q_{z} ) when there is no ambiguity. Whenever S_{1},S_{2} are AST programs, the partial coupling \sigma is a coupling (see Lemma D.3 ), which is consistent or similar to previous works [ 1 , 2 ] . Validity can be recast in terms of monotonicity, which allows us to investigate it from a QOT view. Lemma VI.2 . \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} if and only if for all z\in Z , (\llbracket S_{1}\rrbracket,\llbracket S_{2}\rrbracket) is monotone w.r.t. P and Q . Fig. 1 introduces a minimal set of proof rules of our logic. Our set of proof rules contains so-called one-sided rules for initialization, unitaries, conditionals and loops. We only show left rules; there exists a similar right rule for each construct. We note that the one-sided rules are the obvious counterparts of the usual rules for quantum Hoare logic [ 14 ] ; for instance, the rule for while loops requires users to provide a loop invariant. Besides, our proof system features the usual two-sided rules for skip and sequential compositions. Lastly, our proof system features two structural rules. The (csq) rule is the rule of consequence; it is based on Löwner order. The (duality) rule is an application of the duality theorem, and is used to reduce postconditions to universally quantified split postconditions. Note that the rule requires that the postcondition Q is bounded, i.e. Q\in\mathsf{Pos} rather than Q\in\mathsf{Pos}^{\infty} . In particular, our core set of rules does not feature additional two sided-rules. We discuss two-sided rules in Section VI-C . Two-sided rules: (skip) \vdash Z:\{P\}\ \mathbf{skip}\sim\mathbf{skip}\ \{P\} (seq) \vdash Z:\{P\}\ S_{1}\sim S^{\prime}_{1}\ \{Q\} \vdash Z:\{Q\}\ S_{2}\sim S^{\prime}_{2}\ \{R\} \vdash Z:\{P\}\ S_{1};S_{2}\sim S_{1}^{\prime};S_{2}^{\prime}\ \{R\} One-sided rules: (assign-L) \vdash Z:\{\sum_{ij}(|i\rangle_{q_{1}\langle 1\rangle}\langle 0|)P(|0\rangle_{q\langle 1\rangle}\langle i|)\}\ q:=|0\rangle\sim q:=|0\rangle\ \{P\} (apply-L) \vdash Z:\{(U\otimes I_{2})^{\dagger}P(U\otimes I_{2})\}\ \bar{q}:=U[\bar{q}]\sim\mathbf{skip}\ \{P\} (if-L) \forall m.\vdash Z:\{P_{m}\}\ S_{m}\sim\mathbf{skip}\ \{Q\} \vdash Z:\{\sum_{m}(M_{m}\otimes I)^{\dagger}_{m}P_{m}(M_{m}\otimes I)\}\ \mathbf{if}\ (\Box m\cdot M[\overline{q}]=m\to S_{m})\ \mathbf{fi}\sim\mathbf{skip}\ \{Q\} (while-L) \vdash Z:\{Q\}\ S\sim\mathbf{skip}\ \{(M_{0}\otimes I)^{\dagger}P(M_{0}\otimes I)+(M_{1}\otimes I)^{\dagger}Q(M_{1}\otimes I)\} \vdash Z:\{(M_{0}\otimes I)^{\dagger}P(M_{0}\otimes I)+(M_{1}\otimes I)^{\dagger}Q(M_{1}\otimes I)\}\ \mathbf{while}\ M[\overline{q}]=1\ \mathbf{do}\ S\ \mathbf{od}\sim\mathbf{skip}\ \{P\} Structural rule: (csq) P\sqsupseteq P^{\prime} \vdash Z:\{P^{\prime}\}\ S_{1}\sim S_{2}\ \{Q^{\prime}\} Q^{\prime}\sqsupseteq Q \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} Logical rule: (duality) \begin{array}[]{c}\vdash Z,(Y_{1},Y_{2},n)\in\mathcal{Y}:\{P+nI\}\ S_{1}\sim S_{2}\ \{Y_{1}\otimes I+I\otimes(nI-Y_{2})\}\qquad\qquad\quad S_{1},S_{2}\in\mathsf{AST}\\[1.00006pt] \mbox{ where }\mathcal{Y}\triangleq\{(Y_{1},Y_{2},n)\ |\ n\in\mathbb{N};0\sqsubseteq Y_{1};0\sqsubseteq Y_{2}\sqsubseteq nI;Q\sqsupseteq Y_{1}\otimes I-I\otimes Y_{2}\}\qquad\quad Q\in\mathsf{Pos}\end{array} \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} Fig. 1: Rules for \mathsf{qOTL} VI-B Soundness and Completeness Every derivable judgment is valid. Theorem VI.3 (Soundness) . If \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} then \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} . Conversely, one can prove completeness for bounded postconditions and AST programs. The proof is divided into two main steps. First, we establish completeness result for split postconditions , i.e., postconditions of the form Q_{1}\otimes I_{2}+I_{1}\otimes Q_{2} . With this result in place, we can then leverage duality to derive completeness for all AST programs, and bounded postconditions. The first step towards completeness is to show some form of one-sided weakest precondition for AST programs. Lemma VI.4 (One-Sided Weakest Preconditions) . For every AST program S , we have \vdash Z:\{(\llbracket S\rrbracket^{\dagger}\otimes I)(Q)\}\ S\sim\mathbf{skip}\ \{Q\}. The lemma is proved by structural induction on the program S . One can then lift the results to the case of two programs. Lemma VI.5 (Two-Sided Weakest Preconditions) . For every AST programs S_{1},S_{2} , we have \vdash Z:\{(\llbracket S_{1}\rrbracket^{\dagger}\otimes\llbracket S_{2}\rrbracket^{\dagger})(Q)\}\ S_{1}\sim S_{2}\ \{Q\} Now we are ready to give our completeness result. Theorem VI.6 (Completeness for Split Postconditions) . For every AST programs S_{1},S_{2} , we have: \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q_{1}\otimes I+I\otimes Q_{2}\} implies \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q_{1}\otimes I+I\otimes Q_{2}\} Using the duality theorem, we can then derive that \mathsf{qOTL} is complete for all terminating programs with finite postconditions. Theorem VI.7 (Completeness for Terminating Programs) . For every AST S_{1},S_{2} programs and bounded predicate Q\in\mathsf{Pos}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , we have \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} implies \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} Proof. The desired judgment follows from an application of the duality rule and the provability of: \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\}\iff\\ \vdash Z,(Y_{1},Y_{2},n)\in\mathcal{Y}:\{P+nI\}\ \\ S_{1}\sim S_{2}\ \{Y_{1}\otimes I+I\otimes(nI-Y_{2})\} where \mathcal{Y} is defined as in Theorem IV.4 with C_{i}=P and C_{o}=Q . Provability of the latter follows from completeness for split postconditions. ∎ VI-C Two-Sided Rules This part considers two-sided rules. Such rules are not needed for completeness. However, they allow to carry lock-step reasoning about structurally similar programs, and typically lead to simpler and more intuitive derivations. For example, it may be easier to establish the equivalence of two loops using a two-sided loop rule rather than using twice a one-sided loop rule, simply because a two-sided loop rule may use the loop invariant that the two loop bodies preserve state equivalence. However, it can be challenging to define sound and expressive two-sided proof rules for control-flow constructs. For instance, [ 2 ] uses two-sided rules that involve measurement conditions and entailment between measurement conditions—where these entailments are proved by semantic means. In this section, we show that these rules remain sound for infinite-valued predicates, and we further show how our formalism yields some proof rules to reason about measurement conditions. Definition VI.8 (Measurement Condition and Entailment, c.f. [ 2 ] ) . Suppose M=\{M_{1},\cdots,M_{k}\} and N=\{N_{1},\cdots,N_{k}\} are two measurements with the same output set. We say two states \rho,\sigma\in\mathcal{D} satisfy the measurement condition M\approx N , written (\rho,\sigma)\vDash M\approx N , if for all i , \tr(M_{i}\rho M_{i}^{\dagger})=\tr(N_{i}\sigma N_{i}^{\dagger}) . We further define the entailment relation of two programs S_{1},S_{2} , written \Gamma\stackrel{{\scriptstyle(S_{1},S_{2})}}{{\vDash}}\Gamma^{\prime} , if for all \rho,\sigma\in\mathcal{D}^{1} such that (\rho,\sigma)\vDash\Gamma , it holds (\llbracket S_{1}\rrbracket(\rho),\llbracket S_{2}\rrbracket(\sigma))\vDash\Gamma^{\prime} . Checking the entailment relation involves the program constructions is highly nontrivial [ 2 ] . In fact, the proposed method in [ 2 ] is based on the semantics of the programs. Here, we give a complete characterization so that checking entailment itself can be done using program logic. Theorem VI.9 . For AST programs S_{1},S_{2} , and measurements M=\{M_{1},\cdots,M_{k}\} and N=\{N_{1},\cdots,N_{k}\} , the following are equivalent: 1. \emptyset\stackrel{{\scriptstyle(S_{1},S_{2})}}{{\vDash}}M\approx N ; 2. \vDash(Y_{1},\cdots,Y_{k},Z_{1},\cdots,Z_{k},n)\in\mathcal{Y}_{k}:\{nI\}S_{1}\sim S_{2} \qquad\ \big\{(\mbox{$\sum_{i}$}M_{i}^{\dagger}Y_{i}M_{i})\otimes I+I\otimes\big[nI-(\mbox{$\sum_{i}$}N_{i}^{\dagger}Z_{i}N_{i})\big]\big\} where \mathcal{Y}_{k}=\{(Y_{1},\cdots,Y_{k},Z_{1},\cdots,Z_{k},n)\mid \forall\,i,\ 0\sqsubseteq Y_{i},\ 0\sqsubseteq Z_{i}\sqsubseteq nI,Y_{i}\otimes I-I\otimes Z_{i}\sqsubseteq 0,\\ \forall\,j\neq i,\ Y_{i}\otimes I-I\otimes Z_{j}\sqsubseteq I\}. We further define measurement properties as side conditions to set up two-sided rules for \mathbf{if} and \mathbf{while} . Our definition unifies Def. 5.4 and 7.2 in [ 2 ] (see Proposition E.3 ). Definition VI.10 (Measurement Property, c.f. [ 2 ] ) . Define \Gamma\vDash Z:\{P\}M\approx N\{Q_{k}\} if for all \rho,\sigma\in\mathcal{D}^{1} such that (\rho,\sigma)\vDash\Gamma and z\in Z , if T_{P}(\rho,\sigma)<+\infty , then there exist couplings \delta_{i}:\langle M_{i}\rho M_{i}^{\dagger},N_{i}\sigma N_{i}^{\dagger}\rangle for each i , such that: T_{P}(\rho,\sigma)\geq\sum_{i}\tr(Q_{i}\delta_{i}). Extra rules: (if) \Gamma\vDash Z:\{P\}M\approx M^{\prime}\{R_{k}\} \forall\,k,\ \vdash Z:\{R_{k}\}\ S_{k}\sim S_{k}^{\prime}\ \{Q\} \Gamma\vdash Z:\{P\}\ \mathbf{if}\ (\Box k\cdot M[\overline{q}]=k\to S_{k})\ \mathbf{fi}\sim\mathbf{if}\ (\Box k\cdot M^{\prime}[\overline{q}]=k\to S_{k}^{\prime})\ \mathbf{fi}\ \{Q\} (while) \vDash Z:\{P\}M\approx M^{\prime}\{Q_{0},Q_{1}\} \vdash Z:\{Q_{1}\}\ S\sim S^{\prime}\ \{P\} \vdash Z:\{P\}\ \mathbf{while}\ M[\overline{q}]=1\ \mathbf{do}\ S\ \mathbf{od}\sim\mathbf{while}\ M^{\prime}[\overline{q}]=1\ \mathbf{do}\ S^{\prime}\ \mathbf{od}\ \{Q_{0}\} (seq+) \Gamma\vdash Z:\{P\}\ S_{1}\sim S_{1}^{\prime}\ \{Q\} \Gamma^{\prime}\vdash Z:\{Q\}\ S_{2}\sim S_{2}^{\prime}\ \{R\} \Gamma\stackrel{{\scriptstyle(S_{1},S_{1}^{\prime})}}{{\vDash}}\Gamma^{\prime} \Gamma\vdash Z:\{P\}\ S_{1};S_{2}\sim S_{1}^{\prime};S_{2}\ \{R\} Fig. 2: Extra two-side rules for \mathsf{qOTL} . We can now defined two-sided rules in Fig. 2 and prove their soundness. Theorem VI.11 (Soundness of Two-Sided Rules) . The extra rules for \mathsf{qOTL} in Fig. 2 are sound regarding the notion of validity. VII Infinite-Valued and Projective Predicates It might seem curious why we chose to present everything in terms of infinite-valued predicates. What exactly do they buy us? In this section, we answer this question by showcasing the expressiveness of infinite-valued predicates, by showing how it enables a complete semantic embedding of projector-based quantum relational Hoare logics in \mathsf{qOTL} . In the context of \mathsf{qOTL} , this gives us complete characterisations of non-trivial properties like program equivalence, for free. In the wider field of quantum program logics, this gives us a general way of unifying the two types of predicates (projective and quantitative) in the same logic. VII-A Projective Predicates Our logic, \mathsf{qOTL} , follows a quantitative paradigm: we use (generalised) positive semi-definite operators as predicates, and reason about the ‘extent’ to which quantum states satisfy those predicates by the expectations of the operators over the states. The alternative approach, followed by [ 1 , 16 ] and parts of [ 2 ] , uses subspaces (or equivalently projectors) as assertions: a state \rho satisfies X\in\mathcal{S}(\mathcal{H}) if \supp(\rho)\subseteq X . In the setting of quantum relational Hoare logics, this corresponds to a notion of validity as follows: Definition VII.1 (Logic for Projective Predicates) . We write \vDash_{\mathsf{pqRHL}}:\{X\}\ S_{1}\sim S_{2}\ \{Y\} , where X,Y\in\mathcal{S}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , if for any initial state \rho with \supp(\rho)\subseteq X , there exists a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle such that \supp(\sigma)\subseteq Y . This formulation has several advantages compared to its quantitative counterpart: the resulting logic often has simpler rules, and several non-trivial properties have much simpler formulations. Crucially, this is possible only because \mathsf{pqRHL} allows one to enforce projective preconditions , i.e., membership of the initial state in a particular subspace. For example, equivalence between two programs S_{1} , S_{2} , or, equivalently, the property that \forall\rho\in\mathcal{D}(\mathcal{H}).\llbracket S_{1}\rrbracket(\rho)=\llbracket S_{2}\rrbracket(\rho) can be expressed as the judgement \vDash_{\mathsf{pqRHL}}\{=_{\text{sym}}\}\ S_{1}\sim S_{2}\ \{=_{\text{sym}}\} where importantly, the precondition =_{\text{sym}} forces the arbitrary initial state \rho to satisfy \tr_{2}(\rho)=\tr_{1}(\rho) . Unfortunately, similar constraints on the initial state/coupling are not known to be expressible in the bounded quantitative case. As a consequence, it takes much more effort to characterise properties like program equivalence using only positive semi-definite operators as predicates, as we will later show in theorem VIII.1 . VII-B Enforcing Projective Preconditions Using Infinite-Valued Predicates It turns out that things are different when we allow infinite-valued predicates. Consider a \mathsf{qOTL} judgement of the form \vDash\{P\}\ S_{1}\sim S_{2}\ \{Q\} where P is of the form X|A=\infty\cdot X^{\perp}+A . For any initial coupling \rho , if \supp(\rho)\subseteq X , then the judgement acts as if P=A ; if \supp(\rho)\nsubseteq X however, then the judgement is rendered trivially true. In other words, X|A is the same thing as a normal quantitative precondition A constrained by a projective precondition X ! A direct consequence of this insight is a semantic embedding of \mathsf{pqRHL} in \mathsf{qOTL} as follows: Proposition VII.2 . For AST programs S_{1} , S_{2} , and X,Y\in\mathcal{S}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) be projectors. The following holds: \vDash\{X\mid 0\}\ S_{1}\sim S_{2}\ \{Y^{\bot}\}\iff\ \vDash_{\mathsf{pqRHL}}\{X\}\ S_{1}\sim S_{2}\ \{Y\}. Noting that the postcondition here is bounded, by the completeness theorem ( Theorem VI.7 ), we directly obtain a complete embedding of the projector logic into our logic for AST programs, as shown in the following theorem. Theorem VII.3 . For AST programs S_{1} , S_{2} , and X,Y\in\mathcal{S}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) be projectors, we can completely characterise any property defined by the judgement \vDash_{\mathsf{pqRHL}}\{X\}\ S_{1}\sim S_{2}\ \{Y\} in \mathsf{qOTL} . Therefore, as a corollary, we obtain a complete characterisation of program equivalence for AST programs – this has not been achieved so far in existing quantitative quantum relational Hoare logics [ 2 , 3 ] . VII-C Wider Consequences Infinite-valued predicates provide a general recipe for unifying quantitative and projective quantum predicates. We have seen how it works in the relational case; the same approach also works in the non-relational case. Indeed, if we define a quantum Hoare logic using projective predicates: Definition VII.4 . Let S be a \mathsf{qWhile} program and X,Y\in\mathcal{S}(\mathcal{H}_{S}) . We define \vDash_{\mathsf{pqHL}}\{X\}\ S\ \{Y\} to mean \forall\rho\in\mathcal{D}(\mathcal{H}_{S}).\ \supp(\rho)\subseteq X\implies\supp\llbracket S\rrbracket(\rho)\subseteq Y . A logic similar to [ 14 ] but using infinite-valued quantitative predicates can also be defined: Definition VII.5 . Let S be a program and P,Q\in\mathsf{Pos}^{\infty}(\mathcal{H}_{S}) . We define \vDash_{\mathsf{iqHL}}\{P\}\ S\ \{Q\} to mean \forall\rho\in\mathcal{D}(\mathcal{H}_{S}).\ \tr(P\rho)\geq\tr(Q\llbracket S\rrbracket\rho) . Following a similar reasoning, we could conclude a semantic embedding result: Theorem VII.6 . For S AST, X,Y\in\mathcal{S}(\mathcal{H}_{S}) , the following holds: \vDash_{\mathsf{pqHL}}\{X\}\ S\ \{Y\}\iff\vDash_{\mathsf{iqHL}}\{X\mid 0\}\ S\ \{Y^{\perp}\}. Note that this is not the first or the unique possible embedding of \mathsf{pqHL} in a quantitative quantum Hoare logic. In fact, in the simple, non-relational case, the naive embedding is complete [ 17 ] : \vDash_{\mathsf{pqHL}}\{X\}\ S\ \{Y\}\iff\vDash_{\mathsf{qHL}}\{X^{\perp}\}\ S\ \{Y^{\perp}\} where \mathsf{qHL} is a special case of \mathsf{iqHL} where all predicates are bounded. The advantage of our approach lies in its generality: it works even when the naive embedding does not apply, as is the case of (quantum) relational logics [ 2 ] . VIII Applications We present more applications of our completeness results in characterizing non-trivial relational properties, including quantum non-interference, quantum differential privacy, as well as an alternative characterization of equivalence that only needs bounded predicates. Interestingly, most of these results are direct consequences of completeness for split postconditions and do not require the duality rule. VIII-A Program Equivalence In the previous section, we showed how equivalence can be characterized with the help of infinite-valued predicates. But can we do it only with bounded quantitative predicates? This question is of particular interest, for it allows us to obtain a complete characterization of equivalence with a more minimal extension to existing quantum relational Hoare logics [ 2 ] . We show that this is indeed possible, and it relies on deep results in QOT. Theorem VIII.1 . Let S_{1},S_{2} be AST programs acting on the same Hilbert spaces, \mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}}=\mathcal{H} . S_{1} and S_{2} are semantically equivalent, i.e., \llbracket S_{1}\rrbracket=\llbracket S_{2}\rrbracket , if and only if, \displaystyle\vdash(Y_{1}, \displaystyle Y_{2},n)\in\mathcal{Y}:\{nI+P_{sym}^{\bot}\} \displaystyle S_{1}\sim S_{2}\{\tr_{2}(Y_{1})\otimes I+I\otimes(nI-\tr_{2}(Y_{2}))\}. (4) where \mathcal{Y}=\{(Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}),n\in\mathbb{N})\mid 0\sqsubseteq Y_{1},0\sqsubseteq 2Y_{2}\sqsubseteq nI,P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq 2(Y_{1}\otimes I-I\otimes Y_{2})\} . Proof. Immediate consequence of Theorem VI.6 and Proposition IV.6 . ∎ Therefore, the fragment of \mathsf{qOTL} using only finite-valued predicates is complete for program equivalence for AST programs. VIII-B Trace Distance and Diamond Norm Another application of our completeness result for split postconditions would be a notion of completeness with respect to the diamond norm of quantum channels, which builds upon the encoding of the trace distance – the quantum analogue of the total variation distance. The diamond norm is closely related to channel discrimination, as it quantifies the maximum probability of successfully distinguishing between two quantum channels in a single-shot scenario with the help of auxiliary systems. As such, it serves as the foundation in reasoning about the robustness [ 18 ] and error analysis [ 19 ] of quantum programs, particularly important in the current noisy intermediate-scale quantum (NISQ) era and beyond [ 20 ] . We first recall some relevant definitions and properties. Definition VIII.2 (Trace Distance (see e.g. [ 21 ] Definition 9.1.2)) . Let \rho_{1},\rho_{2} be density operators over \mathcal{H} . Then their trace distance is defined as \mathsf{TD}(\rho,\sigma)\triangleq\frac{1}{2}\|\rho-\sigma\|_{1}, where \|\cdot\|_{1} is the trace norm defined by \|M\|_{1}=\tr(\sqrt{M^{\dagger}M}) . Trace distance is also referred to as a quantum generalisation of total variation distance, as it can be alternatively characterised by the maximum (see Lemma 9.1.1 in [ 21 ] ): \mathsf{TD}(\rho,\sigma)=\max_{0\sqsubseteq P\sqsubseteq I}\tr(P(\rho-\sigma)). We have the following characterization of the trace distance. Proposition VIII.3 (Encoding of Trace Distance) . The following are equivalent for all AST programs S_{1},S_{2} such that 2 2 2 We could also just ask all programs to be interpreted over \mathcal{H}=\mathcal{H}_{\text{all variables}} , or over \mathcal{H}=\mathcal{H}_{\mathit{var}(S_{1})\cup\mathit{var}(S_{2})} . \mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}} : 1. \mathsf{TD}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))\leq\tr(\Phi_{1}\rho_{1})+\tr(\Phi_{2}\rho_{2}) for all z\in Z and \rho_{1}X^{\#}\rho_{2} , for some given subspace X ; 2. \vDash 0\sqsubseteq P\sqsubseteq I:\{X\mid(I+\Phi_{1}\otimes I+I\otimes\Phi_{2})\}\ S_{1}\sim S_{2}\ \{P\otimes I+I\otimes(I-P)\} . We now introduce the notion of diamond norms of quantum channels. Definition VIII.4 (Diamond Norm, Definition 8 in [ 22 ] ) . Let \Phi:M_{n}(\mathbb{C})\to M_{m}(\mathbb{C}) be a linear transformation, where M_{n}(\mathbb{C}) denote the set of n\times n complex matrices, and let id_{n}:M_{n}(\mathbb{C})\to M_{n}(\mathbb{C}) be the identity map. Then, the diamond norm (also known as the completely bounded trace norm) of \Phi is given by \|\Phi\|_{\diamond}=\max_{X;\|X\|_{1}\leq 1}\|(\Phi\otimes id_{n})X\|. The diamond norm induces the diamond distance. For completely positive, trace non-increasing maps \mathcal{E}_{1} and \mathcal{E}_{2} with domain \mathsf{Pos}(\mathcal{H}) , their diamond distance could be written as \|\mathcal{E}_{1}-\mathcal{E}_{2}\|_{\diamond}=\max_{\rho\in\mathcal{D}^{1}(\mathcal{H}\otimes\mathcal{H})}\|(\mathcal{E}_{1}\otimes\mathcal{I})(\rho)-(\mathcal{E}_{2}\otimes\mathcal{I})(\rho)\|_{1}, where \mathcal{I} is the identity quantum channel on \mathcal{H} . Now, consider setting X=P_{sym}[\mathcal{H}\otimes\mathcal{H}] , and \Phi_{1}=\Phi_{2}=cI/2 in Proposition VIII.3 , where c\geq 0 is a constant. The property we are trying to encode becomes \mathsf{TD}((\llbracket S_{1}\rrbracket\otimes\mathcal{I})(\rho_{1}),(\llbracket S_{2}\rrbracket\otimes\mathcal{I})(\rho_{2}))\leq c,\ \ \forall\rho_{1}(=_{sym})^{\#}\rho_{2}. Noting that \rho_{1}(=_{sym})^{\#}\rho_{2} iff \rho_{1}=\rho_{2} , this gives an encoding of the diamond distance between \llbracket S_{1}\rrbracket and \llbracket S_{2}\rrbracket , which we formally stated as follows. Proposition VIII.5 (Encoding of Diamond Norm) . Let c\in\mathbb{R}^{+} . The following are equivalent for all AST programs S_{1},S_{2} such that \mathcal{H}=\mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}} : 1. \|\llbracket S_{1}\rrbracket-\llbracket S_{2}\rrbracket\|_{\diamond}\leq 2c ; 2. \vDash 0\sqsubseteq P\sqsubseteq I_{\mathcal{H}\otimes\mathcal{H}}:\{P_{sym}[\mathcal{H}\otimes\mathcal{H}]\mid(1+c)I\}\ S_{1}\sim S_{2}\ \{P\otimes I+I\otimes(I-P)\} . Theorem VIII.6 (Completeness with respect to Diamond Norm) . The \mathsf{qOTL} is complete with respect to diamond norm, for AST programs. Comparison to [ 18 , 19 ] The program logic introduced in [ 18 , 19 ] provides a sound method for reasoning about the upper bound of (Q,\lambda) -diamond norm between a noisy program and its ideal counterpart. However, its completeness remains unknown. Theorem VIII.6 can be extended to establish complete reasoning for the upper bound of (X,1) -diamond norm where X\in\mathcal{S}(\mathcal{H}) is a subspace. VIII-C Quantum Wasserstein Semi-Distance The Wasserstein metric, also known as the earth mover’s distance, is a measure of distance between two probability distributions. It is important because it characterizes the minimal cost required to transform one probability distribution into the other in the context of optimal transport. Several quantum generalizations of the Wasserstein metric have been proposed. However, so far, these generalizations have only been shown to satisfy the properties of a semi-distance for density matrices. In this work, we adopt the following definition of the quantum Wasserstein semi-distance discussed in [ 8 ] . Let \rho,\sigma\in\mathcal{D}^{1}(\mathcal{H}) be two density operators. Their quantum 2 -Wasserstein semi-distance W(\rho,\sigma) is defined as W(\rho,\sigma)=\sqrt{T(\rho,\sigma)}, where T(\rho,\sigma)=T_{P_{sym}^{\bot}}(\rho,\sigma) is the QOT between \rho and \sigma with the cost function P_{sym}^{\bot} , see Section IV-C for details. Verifying properties of programs related to the above quantum Wasserstein semi-distance can be easily encoded in our logic. Specifically, we investigate the Lipschitz property of programs with respect to the quantum Wasserstein semi-distance. This property asserts that the quantum Wasserstein semi-distance between a program’s outputs is bounded by the quantum Wasserstein semi-distance between its inputs scaled by a constant \lambda . This property can be directly encoded and verified in our logic: Proposition VIII.7 (Encoding of Quantum Wasserstein Semi-Distance) . Let \lambda>0 . The following are equivalent for all AST programs S_{1},S_{2} such that \mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}} : 1. W(\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho)))\leq\lambda\cdot W(\tr_{2}(\rho),\tr_{1}(\rho)) for all \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) ; 2. \vDash\{\lambda^{2}P_{sym}^{\bot}\}\ S_{1}\sim S_{2}\ \{P_{sym}^{\bot}\} . Theorem VIII.8 (Completeness with respect to Quantum Wasserstein Semi-Distance) . The \mathsf{qOTL} is complete with respect to the Lipschitz property of quantum Wasserstein semi-distance for AST programs. VIII-D Quantum Non-Interference Another application of our logic involves characterizing the concept of quantum non-interference. Intuitively, non-interference refers to a critical property where the actions of one group of agents in a computer system do not influence the actions of another group of agents. This concept was later extended to quantum settings in [ 23 ] . The key components for defining quantum non-interference in their work include quantum computer systems, a pseudo-distance for measuring output distributions, and the degree of interference. We introduce these notions as follows. Definition VIII.9 (Quantum Systems, Definition 3.1 in [ 23 ] ) . A quantum system is a 6 -tuple \mathbb{S}=\left\langle\mathcal{H},\rho_{0},A,C,do,measure\right\rangle, where • \mathcal{H} is a Hilbert space specifying the state space; • \rho\in\mathcal{D}(\mathcal{H}) specifying the initial state; • A is a set of agents; • C is a set of commands; • do=\{\mathcal{E}_{a,c}|a\in A\text{ and }c\in C\} is a set of trace-preserving operations \mathcal{E}_{a,c} which describes how states are updated when agent a executes command c ; • measure=\{\mathbb{M}_{a}|a\in A\} is a collection of sets of POVM measurements, where each \mathbb{M}_{a} is allowable for agent a . The quantum non-interference influence is measured by the following pseudo distance d_{\mathbb{M}} induced by POVM measurements \mathbb{M} . Let d(p,q) denote the total variation distance between two probability distributions p and q over the sample space X . For a density operator \rho and a POVM measurement E=\{E_{\lambda}|\lambda\in\Lambda\} , we define the probability distribution p_{E,\rho} as p_{E,\rho}(\lambda)=\tr(E_{\lambda}\rho) . The pseudo distance d_{\mathbb{M}} is formalized as follows. Definition VIII.10 (Definition 3.2 in [ 23 ] ) . The pseudo distance d_{\mathbb{M}} between two density operators \rho,\sigma\in\mathcal{D}(\mathcal{H}) induced by a set of POVM measurements \mathbb{M} is defined as d_{\mathbb{M}}(\rho,\sigma)=\sup_{E\in\mathbb{M}}d(p_{E}(\rho),p_{E}(\sigma)). For each agent a\in A in a quantum system \mathbb{S} , we write d_{a}=d_{\mathbb{M}_{a}} for the pseudo distance defined by the set \mathbb{M}_{a} of POVM measurements. Let G\subseteq A be a group of agents, D\subseteq A be a set of commands. For a sequence of actions \alpha=\alpha_{1}\alpha_{2}\cdots\alpha_{n}\in(A\times C)^{*} , we define a function \mathsf{purge}_{G,D} for \alpha that removes the actions in D by the agents in group G . In other words, \mathsf{purge_{G,D}}(\alpha)=\alpha_{1}^{\prime}\alpha_{2}^{\prime}\cdots\alpha_{n}^{\prime}, where \alpha_{i}^{\prime}=\epsilon (the empty action) if \alpha_{i}^{\prime}=(a_{i},c_{i}) with a_{i}\in G and c_{i}\in D , and \alpha_{i}^{\prime}=\alpha_{i} otherwise. The degree of (non-) interference is measured by the pseudo distance d_{\mathbb{M}} between the state operated by the original actions and the state operated by the purged actions. Definition VIII.11 (Interference Degree, Definition 3.3 in [ 23 ] ) . For a quantum system \mathbb{S}=\left\langle\mathcal{H},\rho_{0},A,C,do,measure\right\rangle , let G_{1},G_{2}\subseteq A be two groups of agents, and D\subseteq C be a set of commands. Then, the degree that agents in G_{1} with commands D interfere agents in G_{2} is Int(G_{1},D|G_{2})=\sup_{\begin{subarray}{c}\alpha\in(A\times C)^{*},\\ a\in G_{2}\end{subarray}}\{d_{a}(\mathcal{E}_{\alpha}(\rho_{0}),\mathcal{E}_{\mathsf{purge}_{G_{1},D}(\alpha)}(\rho_{0}))\} If Int(G_{1},D|G_{2})=0 , we will denote this as G_{1},D:|G_{2} . For a quantum system \mathbb{S}=\left\langle\mathcal{H},\rho_{0},A,C,do,measure\right\rangle with an initial state \rho_{0}=|0\rangle\langle 0| , we represent trace-preserving operations \mathcal{E}_{a,c} as corresponding AST programs S_{a,c} , and sequence of actions \alpha as AST programs S_{\alpha} . The following and theorem shows the quantum non-interference property can be encoded and verified using our logic. Proposition VIII.12 (Encoding of Quantum Non-Interference) . For a quantum system \mathbb{S}=\left\langle\mathcal{H},\rho_{0},A,C,do,measure\right\rangle with \rho_{0}=|0\rangle\langle 0| , let G_{1},G_{2}\subseteq A be two groups of agents, and D\subseteq C be a set of commands. The following are equivalent: • G_{1},D:|G_{2} . • \forall\alpha\in(A\times C)^{*} , \displaystyle\vDash a \displaystyle\in G_{2},E=\{E_{\lambda}|\lambda\in\Lambda_{E}\}\in\mathbb{M}_{a},T\subseteq\Lambda_{E}: \displaystyle\{I\}\ q:=|0\rangle;S_{\alpha}\sim q:=|0\rangle;S_{\mathsf{purge}_{G_{1},D}(\alpha)}\ \{M\}{}, where M=M_{T}\otimes I+I\otimes(I-M_{T}) with M_{T}=\sum_{\lambda\in T}E_{\lambda} . Theorem VIII.13 (Completeness with respect to Quantum Non-Interference) . The \mathsf{qOTL} is complete with respect to the quantum non-interference property for AST programs. VIII-E Quantum Differential Privacy Finally, with the help of infinite-valued predicates, we can characterize a quantum version of differential privacy. Differential privacy is a mathematical framework about providing statistical properties about datasets while preserving private information of individual objects. The core intuition behind differential privacy is that the output distributions of a program should remain nearly indistinguishable when run on two “neighboring” inputs, usually differing only by a single element. This concept has been successfully extended to quantum computing, resulting in the development of related but distinct notions of quantum differential privacy. These notions, as explored in works such as [ 24 , 25 ] , primarily differ in how they define and characterize “neighboring inputs”. In this paper, we adopt the following definition proposed in [ 24 ] . Definition VIII.14 (Quantum Differential Privacy, Definition 3 in [ 24 ] ) . Let \varepsilon,\delta>0 be constants. A quantum operation \mathcal{E} on an n -qubit system is (\varepsilon,\delta) -differentially private, if for every POVM M=\{M_{m}\}_{m\in\mathsf{Out}(m)} , every S\subseteq\mathsf{Out}(m) , and every input \rho,\sigma that differs at most one qubit (i.e., there exists i\in[n] that \tr_{i}(\rho)=\tr_{i}(\sigma) ), it holds that \Pr[\mathcal{E}(\rho)\in_{M}S]\leq\exp(\varepsilon)\cdot\Pr(\mathcal{E}(\sigma)\in_{M}S)+\delta, where \Pr(\rho\in_{M}S)=\sum_{m\in S}\tr(M_{m}\rho) . Let S_{1} be some quantum program that corresponds to the quantum operation \mathcal{E} . We could verify whether \mathcal{E} , or equivalent S_{1} is (\varepsilon,\delta) -differentially private in our logic, as implied by the following proposition and theorem. Proposition VIII.15 (Encoding of Differential Privacy) . The following are equivalent for all AST programs S_{1} on an n -qubit system with: 1. S_{1} is (\varepsilon,\delta) -differentially private; 2. \vDash i\in[n],0\sqsubseteq M\sqsubseteq I:\{P_{i,sym}\mid(\exp(\varepsilon)+\delta)I\}\ S_{1}\sim S_{1}\ \{M\otimes I+\exp(\varepsilon)I\otimes(I-M)\} . Here P_{i,sym}=P_{sym}[\mathcal{H}_{[n]-i}]\otimes(I_{i\langle 1\rangle}\otimes I_{i\langle 2\rangle}) for i\in[n] . Theorem VIII.16 (A Complete Characterization of Quantum Differential Privacy) . The \mathsf{qOTL} is complete with respect to the quantum differential privacy property for AST programs. IX Probabilistic Duality There is a variety of relational program logics for probabilistic programs [ 26 , 27 , 28 , 4 ] . Similar to the quantum case, validity of these logics is based on probabilistic couplings, their completeness has remained an open problem. Recent work by Avanzini et al . [ 4 ] defines a quantitative relational Hoare logic, called \mathsf{eRHL} , and shows that it achieves completeness for non-trivial classes of properties. Their proof of completeness leverages a notion of split post-condition similar to ours. However, their work lacks a general completeness theorem. We show that their logic is in fact complete for bounded postconditions. Completeness follows from the classic Kantorovich-Rubinstein duality. Our phrasing of the theorem is stated w.r.t. positive functions c_{1} and c_{2} , to match the assumption that assertions in \mathsf{eRHL} take positive values. Theorem IX.1 (Kantorovich-Rubinstein Duality) . Let \mu,\nu be discrete probability distributions over X and Y respectively, and let c:X\times Y\rightarrow[0,+\infty) be a bounded function. Then \inf_{\theta\in\Gamma(\mu,\nu)}\mathbb{E}_{\theta}[c]=\sup_{(n,c_{1},c_{2})\in\mathcal{W}}(\mathbb{E}_{\mu}[c_{1}]+\mathbb{E}_{\nu}[c_{2}]-n) where \Gamma(\mu,\nu) denotes the set of probabilistic couplings of \mu and \nu and (n,c_{1},c_{2})\in\mathcal{W} iff for every x\in X and y\in Y , we have 0\leq c_{1}(x),c_{2}(y) and c_{1}(x)+c_{2}(y)\leq c(x,y)+n . It follows that every bounded post-condition is logically equivalent to a universally quantified split post-condition—where in the probabilistic setting a split post-condition is simply the addition of two unary assertions on the first and second state respectively. Therefore \mathsf{eRHL} is complete for all bounded postconditions. Proposition IX.2 . \mathsf{eRHL} is complete for all AST programs and bounded postconditions. Note that completeness does not require adding a duality rule, due to a difference of settings. Indeed, \mathsf{eRHL} features a very general rule of consequence, which allows using arbitrary theorems from the theory of couplings. Interestingly, [ 4 ] establishes a completeness theorem for judgments of the \mathsf{pRHL} logic, using Strassen’s theorem [ 6 ] . This is very similar in spirit to our use of the duality theorem. In fact, Strassen’s theorem can be seen as a specialized variant of the duality theorem for boolean-valued cost functions. Furthermore, note that [ 4 ] uses the Kantorovich-Rubinstein duality to prove that \mathsf{eRHL} characterizes Kantorovich distance, but fails to establish a link with completeness. X Related work and Discussion X-A Quantum Relational Hoare Logics Our logic can be seen as a generalization of Barthe et al .’s \mathsf{rqPD} [ 2 ] . It differs with \mathsf{rqPD} in three ways: we consider possibly infinite-valued positive predicates (instead of finite-valued and subunital ones), we consider an upper-bounding instead of a lower-bounding semantics, and we allow for logical variables. That said, \mathsf{rqPD} can be semantically embedded in our logic as follows: Proposition X.1 . Let S_{1} , S_{2} be AST programs and 0\sqsubseteq P,Q\sqsubseteq I be predicates. Then \vDash_{\mathsf{rqPD}}\{P\}\ S_{1}\sim S_{2}\ \{Q\}\iff\vDash\{I-P\}\ S_{1}\sim S_{2}\ \{I-Q\}. Moreover, most of our proof rules are adapted from \mathsf{rqPD} ’s rules, and it turns out that straightforwardly generalizing \mathsf{rqPD} ’s one-sided rules to our setting is sufficient to achieve completeness without needing two-sided rules with complex semantic conditions like measurement conditions. Nevertheless, the said rules being still sound and potentially more usable, we adapt them and further show that measurement conditions can be reasoned about within our logic. Barthe et al . [ 2 ] also discuss a logic using projective (instead of quantitative) predicates similar to \mathsf{pqRHL} , as well as an incomplete embedding of that logic into \mathsf{rqPD} . This work achieves a complete embedding with the help of infinite-valued predicates. Another line of work [ 1 , 3 ] is based on separable couplings (instead of general couplings like in [ 2 ] and our work). Unruh [ 1 ] defines the first sound relational program logic for quantum programs based on projective predicates and separable couplings. The primary motivation for using separable couplings is that it is possible to prove soundness of a frame rule. Li and Unruh [ 3 ] define an expectation-based variant of [ 1 ] . The soundness of their logic is also proved with a notion of validity based on separable couplings. Interestingly, the motivation for using separable couplings in this case is soundness—there is no frame rule in this logic. Neither of these logics are known to be complete. Comparing our logic to separable-coupling-based ones is not the focus of our work. As already extensively discussed by [ 2 ] and [ 3 ] , while similar sets of proof rules can be sound for both general-coupling-based and separable-coupling-based notions of validity, it is unclear how these notions of validity actually relate to each other. Moreover, it is unclear whether it is possible to adapt ideas in our work (like Strassen’s theorem) to obtain similar completeness results. Finally, in [ 16 ] , Yan et al . study approximative relational reasoning by giving a logic similar to [ 2 ] ’s projective logic, but based on approximate couplings (where a \rho is an \epsilon -coupling of \rho_{1} and \rho_{2} if both \mathsf{TD}(\rho_{1},\tr_{2}(\rho)) and \mathsf{TD}(\rho_{2},\tr_{1}(\rho)) are upper-bounded by \epsilon , where \mathsf{TD} is the trace distance). In comparsion, while our logic is quantitative and completely characterizes various distance metrics like the Wasserstein semi-distance, we do require couplings to be exact. It would indeed be interesting to explore how expressive our logic is for approximative reasoning compared to their work. X-B Quantum Optimal Transport Over the past decades, efforts have been made to generalize the optimal transport problem to the quantum setting. Early attempts [ 29 ] defined the cost between two quantum states using the (probabilistic) Monge distance based on their corresponding Husimi distributions, and then explored the physical consequences including unitary evolution and decoherence [ 30 ] . More recent approaches have framed quantum optimal transport in terms of expectations over couplings. Specifically, given quantum states \rho_{1} and \rho_{2} , they have studied the expectation \tr(C\rho) over possible ”couplings” \rho of \rho_{1} and \rho_{2} , for both general and specific types of costs: [ 31 ] explored the QOT based on quantum coupling ( Definition III.1 but on continuous space), with the cost specified as energies involving position and momentum operators, primarily for investigating applications in quantum mean-field theory and its classical limits. Related results include such as inequalities involving QOT and related potentials or metrics [ 31 , 32 ] , Kantorovich type duality theorem [ 33 ] , and showing that QOT can be cheaper than the classical one [ 34 ] . Another approach [ 35 , 36 ] examines QOT from a view of changing one state to another, i.e, focusing on the properties of quantum channels \mathcal{E} that satisfy \mathcal{E}(\rho_{1})=\rho_{2} . It was shown that there is a one-to-one correspondence between such channels and the couplings of \langle\rho_{1}^{T},\rho_{2}\rangle , offering an alternative definition of couplings. They further studied the cost function \sum_{i}(R_{i}\otimes I_{2}-I_{1}\otimes R_{i}^{T})^{2} , and established related entropic and concentration inequalities [ 37 , 38 ] , with an application showing the limitations of Variational Quantum Algorithms in the presence of noise [ 37 ] . In addition to special cost functions, prior works have systematically explored the general properties and associated metrics or distances in quantum optimal transport (QOT) [ 8 , 39 , 40 ] . For instance, [ 11 ] introduced a stable version of QOT, as briefly summarized in Section IV . This line of research aligns closely with our objectives, as we prioritize the general relational properties of program states over specific costs or physically oriented properties. X-C Reasoning about Program Equivalence Outside of quantum relational Hoare logics, reasoning techniques about equivalence between quantum programs/circuits have been widely studied. Several lines of works create axiomatizations of program equivalence in the form of equational theories. Similarly to our work, they look at notions of quantum computing with existing and well-defined denotational semantics, with respect to which they would prove properties like soundness and completeness. However, they only focus on program equivalence and have a very different goal of enabling equational reasoning. One line of work stems from the categorical quantum mechanics (CQM) programme [ 41 , 42 , 43 ] and leverages categorical formalisms developed therein to produce string-diagrammatic axiomatizations of quantum theory like the ZX calculus and others [ 44 , 45 , 46 ] . Similarly to these calculi, [ 47 ] develop a tool for reasoning about expressions formally written in Dirac notation. Other works, including ours, have a specific focus on quantum computing (CP and trace non-decreasing maps), a proper subset of quantum theory (CP maps). In [ 48 ] , Staton presents an algebraic theory of qubit quantum computing and proved that it completely axiomatizes a standard model of quantum computation. Recently, [ 49 ] complements [ 48 ] by giving an equational theory for unitary quantum circuits that is complete for various gate sets, by extending \Pi , a model of classical reversible computing. Other works focus on models of quantum computation (e.g. quantum concurrency) that do not yet have a readily available notion of program equivalence. Quantum process calculi [ 50 , 51 , 52 , 53 ] , for instance, model quantum concurrency by extending classical process calculi with quantum primitives. Several notions of behavioural equivalence were then developed based on bisimulation. However, as [ 52 ] points out, each of these proposals is subtly different from the others, and there is not yet a consensus on which is the right one. Compared to our work, quantum bisimulation handles a richer programming language, but once again only handles equivalence. XI Conclusion We have defined a sound and complete relational proof system for quantum programs. Our proof system achieves completeness from the duality theorem of quantum optimal theorem. In addition, with the help of infinite-valued predicates, we have given a complete embedding of projective assertions into our logic. Appendix A Deferred Proofs in “Notations and Preliminaries” Section We first briefly review some basic concepts and propositions in linear algebra and quantum computing. Quantum States . The state space of a quantum system is described by a complex Hilbert space \mathcal{H} , which we ususally assume to be finite-dimensional. A pure state is a unit (column) vector in the Hilbert space. For example, an d -dimensional quantum state in \mathbb{C}^{d} has the form v=(v_{0},v_{1},v_{2},\dots,v_{d-1})^{\intercal}, usually denoted as |v\rangle with the Dirac symbol |\cdot\rangle . The computational basis of \mathbb{C}^{d} is denoted as \{|i\rangle\}_{i=0}^{d-1} , where the j -th coordinate of |i\rangle is 1 if j=i , and 0 otherwise. The inner product between states |u\rangle and |v\rangle is denoted as \langle u|v\rangle , which is the standard inner product in the Hilbert space, where \langle u| stands for the conjugate transpose of |u\rangle . Let |u\rangle\in\mathbb{C}^{d_{1}} and |v\rangle\in\mathbb{C}^{d_{2}} be two states. Their tensor product, written as |u\rangle\otimes|v\rangle , or |u\rangle|v\rangle in short, is defined to as the following vector |u\rangle|v\rangle=(u_{0}v_{0},u_{0}v_{1},u_{0}v_{2},\dots,u_{d_{1}}v_{d_{2}})^{\intercal} . A quantum bit (or qubit for short), is a quantum state |\phi\rangle=\alpha|0\rangle+\beta|1\rangle\in\mathbb{C}^{2} , with |\alpha|^{2}+|\beta|^{2}=1 . An n -qubit state is in the Hilbert space of dimension 2^{n} . Let \mathcal{H} be a d -dimensional Hilbert space. The (linear) operators on \mathcal{H} are just d\times d matrices. For an operator A , the trace of A , \tr(A) is defined as \sum_{j=0}^{d-1}\langle j|A|j\rangle . It can be shown that \tr(AB)=\tr(BA) and thus \tr(UAU^{\dagger})=\tr(A) holds for linear operators A,B and unitary operator U , meaning that the trace of an operator does not rely on the choice of basis. A density operator \rho in \mathcal{H} , is a positive semi-definite operator with trace 1 . Applying the spectral decomposition theorem, we could write it as \rho=\sum_{i}p_{i}|\phi_{i}\rangle\langle\phi_{i}| , meaning that it can be regarded as a distribution over pure states. We could also regard pure states |\phi\rangle as rank 1 density matrices |\phi\rangle\langle\phi| . We call a positive semi-definite operator with trace no more than 1 a partial density operator. Quantum Operations . Evolutions on pure quantum states on \mathcal{H} are described by the unitary operators U on \mathcal{H} with UU^{\dagger}=U^{\dagger}U=I . Given any state |\phi\rangle , the evolution of U gives U|\phi\rangle . A more general concept of quantum operations is quantum channel, which could be seen as completely-positive and trace-preserving linear maps from the set of density operators in a Hilbert space into another set of density operators in some Hilbert space. For a linear map \mathcal{E}:\mathcal{D}(\mathcal{H})\to\mathcal{D}(H) , we say it is completely positive if for all \mathcal{H}^{\prime} , the map \mathcal{E}\otimes I maps positive semi-definite operators on \mathcal{H}\otimes\mathcal{H}^{\prime} to positive semi-definite operators, and it is trace-preserving if \tr(\mathcal{E}(\rho))=\tr(\rho) for any density operator \rho . In this work, we only consider projective measurements. For a projective measurement \mathcal{M}=\{P_{i}\} , we require all the P_{i} ’s are projectors, and \sum_{i}P_{i}=I . Given any density operator \rho , after performing the projective measurement \mathcal{M}=\{P_{i}\} , we will observe the event i with probability \tr(P_{i}\rho) , with the post measured state P_{i}\rho P_{i}/\tr(P_{i}\rho) . An observable, or a quantum predicate, is a positive semi-definite operator on \mathcal{H} . For an observable A , its spectral decomposition can be written as A=\sum\lambda P_{\lambda} , where P_{\lambda} is the projector onto the eigenspace corresponding to the eigenvalue \lambda . The expection of A in a state \rho is given by \sum\lambda\tr(P_{\lambda}\rho)=\tr(A\rho) . The notion partial trace is a special quantum operation that discard the state of a system. Formally, for the Hilbert space \mathcal{H}_{1}\otimes\mathcal{H}_{2} , we define partial trace over \mathcal{H}_{1} , written as \tr_{1} as a mapping from \mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) to \mathsf{Pos}(\mathcal{H}_{2}) , that satisfies \tr_{1}(A)=\sum_{i}(\langle i|\otimes I)A(|i\rangle\otimes I) where |i\rangle ranges over all computational basis of \mathcal{H}_{1} . For more introductions and explanations of the above notions, we refer the readers to [ 5 ] . We now introduce some concepts that are useful in the study of quantum programs. The Löwner order is a partial order of positive semi-definite operators, defined as follows: for A,B\in\mathsf{Pos}(\mathcal{H}) , A\sqsubseteq B if and only if B-A is positive semi-definite. Definition A.1 (Support) . Let P\in\mathsf{Pos}(\mathcal{H}) be a positive semi-definite operator. Then, the support of P , denoted as \supp(P) , is the subspace of \mathcal{H} that are spanned by the eigenvectors of P associated with non-zero eigenvalues. Definition A.2 . Let \mathcal{H} be a Hilbert space, X and Y be its subspaces. The join of X and Y is defined as X\vee Y=\overline{\spanv\{X\cup Y\}} , where \overline{\cdot} represents the operation of taking the topological closure. The meet of X and Y is defined as X\wedge Y=X\cap Y . The orthogonal complement of X is X^{\bot}=\{|\psi\rangle\in\mathcal{H}||\psi\rangle\perp|\phi\rangle,\forall|\phi\rangle\in X\} . Here are some of the properties of the support that are needed for proofs in the subsequent parts. Proposition A.3 (Properties of the Support) . We have the following properties: • Let P,Q\in\mathsf{Pos}(\mathcal{H}) , then \supp(P+Q)=\supp(P)\vee\supp(Q) ; • Let X_{1} and X_{2} be subspaces of a Hilbert space \mathcal{H} , then \mathcal{E}(X_{1}\vee X_{2})=\mathcal{E}(X_{1})\vee\mathcal{E}(X_{2}) for any CP maps \mathcal{E} . Infinite-valued predicates. In the following, we introduce the basic notions that are related to the infinite-valued predicates. We first formally define the notion of infinite-valued predicates as follows. Definition A.4 (Infinite-Valued Predicates) . Given a Hilbert space \mathcal{H} , A is called an infinite-valued predicate on \mathcal{H} , if it has a unique spectral decomposition \{(\lambda_{i},X_{i})\}_{i} , where \lambda_{i}\in\mathbb{R}^{+\infty} are its eigenvalues, X_{i} ’s are projections onto eigenspaces that are pairwise orthogonal, with \sum_{i}X_{i}=I . The set of all infinite-valued predicates is denoted as \mathsf{Pos}^{\infty}(\mathcal{H}) . For the arithmetic operations related to the +\infty , we make the conventions that (+\infty)\cdot 0=0\cdot(+\infty)=0 , (+\infty)+a=a+(+\infty)=+\infty for a\in\mathbb{R}^{+\infty} , 0/0=0 (this is used in normalization of quantum states, i.e., \rho=\tr(\rho)(\rho/\tr(\rho)) even if \rho=0 ), and +\infty\leq+\infty . The following lemma enables us to represent the infinite-valued predicates as two parts, namely the “finite” and “infinite” part. Lemma A.5 . For any A\in\mathsf{Pos}^{\infty}(\mathcal{H}) , it can be uniquely represented as (P_{A},X_{A}) , written A\triangleq(P_{A},X_{A}) , where P_{A}\in\mathsf{Pos}(\mathcal{H}) , X_{A}\in\mathcal{S}(\mathcal{H}) such that P_{A}X_{A}=0 , and we will write it as A=P_{A}+(+\infty\cdot X_{A}) . Proof. Suppose A=\sum_{j}\lambda_{j}X_{j} . We set P_{A}=\sum_{j:\lambda_{j}<+\infty}\lambda_{j}X_{j} and X_{A}=\sum_{j:\lambda_{j}=+\infty}X_{j} . It is clear that P_{A}X_{A}=0 . Now we prove the uniqueness. Suppose A could also be written as P_{A}^{\prime}+\infty\cdot X_{A}^{\prime} . We first prove X_{A}=X_{A}^{\prime} . If not, there must exist a non-zero vector |\psi\rangle\in X_{A}\cap X_{A}^{\prime\bot} , which satisfies \langle\psi|A|\psi\rangle=\langle\psi|P_{A}|\psi\rangle+\infty\langle\psi|X_{A}|\psi\rangle=+\infty , and \langle\psi|A|\psi\rangle=\langle\psi|P_{A}^{\prime}|\psi\rangle+\infty\langle\psi|X_{A}^{\prime}|\psi\rangle=\langle\psi|P_{A}^{\prime}|\psi\rangle<+\infty , a contradiction. Then, we have P_{A}=X_{A}^{\bot}AX_{A}^{\bot}=X_{A}^{\prime\bot}AX_{A}^{\prime\bot}=P_{A}^{\prime} as we desired. ∎ Here we introduces some basic operations for infinite-valued predicates: Definition A.6 (Operations of Infinite-Valued Predicate) . The basic operations of infinite-valued predicates can be defined as follows. • The addition for two infinite-valued predicates A_{1},A_{2} is: A_{1}+A_{2}\triangleq(X^{\perp}\left(P_{A_{1}}+P_{A_{2}}\right)X^{\perp},X), where X=X_{A_{1}}\vee X_{A_{2}} . • The tensor product for two infinite-valued predicates A_{1},A_{2} is A_{1}\otimes A_{2}\triangleq\left(P_{A_{1}}\otimes P_{A_{2}},X\right), where X=\left(\supp\left(P_{A_{1}}\right)\otimes X_{A_{2}}\right)\vee\left(X_{A_{1}}\otimes\supp\left(P_{A_{2}}\right)\right)\vee\left(X_{A_{1}}\otimes X_{A_{2}}\right) . • For any |\psi\rangle\in\mathcal{H} and A\in\mathsf{Pos}^{\infty}(\mathcal{H}) with spectral decomposition \{(\lambda_{i},X_{i})\} , the inner product \langle\psi|A|\psi\rangle is defined as \langle\psi|A|\psi\rangle\triangleq\sum_{i}\lambda_{i}\langle\psi|X_{i}|\psi\rangle. • For a density operator \rho\in\mathcal{D}(\mathcal{H}) , its expectation value on an infinite-valued predicate A is \tr(A\rho)\triangleq\begin{cases}\tr(P_{A}\rho),\text{ if }X_{A}\rho=0\\ \infty,\text{ otherwise}\end{cases} • For subspace X , X\mid A\triangleq X\cdot A\cdot X+(+\infty\cdot X^{\bot}) , or equivalently, X\mid A\triangleq((X\vee X_{A}^{\bot})P_{A}(X\vee X_{A}^{\bot}),X^{\bot}\vee X_{A}) . Lemma A.7 (Basic Properties of Operations of Infinite-Valued Predicates) . We have the following properties for A,A_{1},A_{2}\in\mathsf{Pos}^{\infty}(\mathcal{H}) : • Scalar product cA for c\in\mathbb{R}^{+\infty} is defined such that for all |\psi\rangle , \langle\psi|cA|\psi\rangle=c\langle\psi|A|\psi\rangle . • Addition A_{1}+A_{2} such that for all |\psi\rangle\in\mathcal{H} , \langle\psi|(A_{1}+A_{2})|\psi\rangle=\langle\psi|A_{1}|\psi\rangle+\langle\psi|A_{2}|\psi\rangle . • Tensor product A_{1}\otimes A_{2} such that for all |\psi_{1}\rangle,|\psi_{2}\rangle , (\langle\psi_{1}|\otimes\langle\psi_{2}|)(A_{1}\otimes A_{2})(|\psi_{1}\rangle\otimes|\psi_{2}\rangle)=(\langle\psi_{1}|A_{1}|\psi_{1}\rangle)\cdot(\langle\psi_{2}|A_{2}|\psi_{2}\rangle) . • Let M be a linear operator with \mathcal{H} as its domain, M^{\dagger}AM can be defined such that for all |\psi\rangle , \langle\psi|(M^{\dagger}AM)|\psi\rangle=\langle\phi|A|\phi\rangle where |\phi\rangle=M|\psi\rangle . • For P\in\mathsf{Pos} with decomposition P=\sum_{i}a_{i}|\psi_{i}\rangle\langle\psi_{i}| ( 0\leq a_{i} ), the trace is \tr(AP)=\sum_{i}a_{i}\langle\psi_{i}|A|\psi_{i}\rangle . Note that the value is unique for any decomposition. • For \mathcal{E}\in\mathcal{QO} (more generally, CP maps) with Kraus operators \{E_{i}\} , \mathcal{E}^{\dagger}(A)=\sum_{i}E_{i}^{\dagger}AE_{i} . Note that it is unique for arbitrary Kraus operators. • A_{1}=A_{2} if for all |\psi\rangle , \langle\psi|A_{1}|\psi\rangle=\langle\psi|A_{2}|\psi\rangle . • A_{1}\sqsubseteq A_{2} if for all |\psi\rangle , \langle\psi|A_{1}|\psi\rangle\leq\langle\psi|A_{2}|\psi\rangle . For readability, we postpone the proof of the above lemma to Appendix I . Lemma A.8 (Algebraic Properties) . In the following, let a,b,c\in\mathbb{R}^{+\infty} , A,A_{1},A_{2}\in\mathsf{Pos}^{\infty} , M,M_{1},M_{2},\cdots\in\mathcal{L} , and P,P_{1},P_{2}\cdots\in\mathsf{Pos} . We have the following properties: • 0A=0 , 1A=A , a(bA)=(ab)A ; • 0+A=A+0=A , A_{1}+A_{2}=A_{2}+A_{1} , A_{1}+(A_{2}+A_{3})=(A_{1}+A_{2})+A_{3} ; • 0\otimes A=A\otimes 0=0 , A_{1}\otimes(A_{2}\otimes A_{3})=(A_{1}\otimes A_{2})\otimes A_{3} ; • A\otimes(cA_{1}+A_{2})=c(A\otimes A_{1})+(A\otimes A_{2}) ; (cA_{1}+A_{2})\otimes A=c(A_{1}\otimes A)+(A_{2}\otimes A) ; • 0^{\dagger}A0=0 , M_{2}^{\dagger}(M_{1}^{\dagger}AM_{1})M_{2}=(M_{1}M_{2})^{\dagger}A(M_{1}M_{2}) ; M^{\dagger}(cA_{1}+A_{2})M=c(M^{\dagger}A_{1}M)+M^{\dagger}A_{2}M ; • (M_{1}\otimes M_{2})^{\dagger}(A_{1}\otimes A_{2})(M_{1}\otimes M_{2})=(M_{1}^{\dagger}A_{1}M_{1})\otimes(M_{2}^{\dagger}A_{2}M_{2}) ; • \tr(A(cP_{1}+P_{2}))=c\tr(AP_{1})+\tr(AP_{2}) ; \tr((cA_{1}+A_{2})P)=c\tr(A_{1}P)+\tr(A_{2}P) ; • \tr((A_{1}\otimes A_{2})(P_{1}\otimes P_{2}))=\tr(A_{1}P_{1})\tr(A_{2}P_{2}) ; \tr((M^{\dagger}AM)P)=\tr(A(MPM^{\dagger})) . • \tr((A\otimes I)P)=\tr(A\tr_{2}(P)) ; \tr((I\otimes A)P)=\tr(A\tr_{1}(P)) ; • \tr(A|\phi\rangle\langle\phi|)=\langle\phi|A|\phi\rangle . • A_{1}=A_{2} iff for all P\in\mathsf{Pos} (or P\in\mathcal{D} ) such that \tr(A_{1}P)=\tr(A_{2}P) ; • A_{1}\sqsubseteq A_{2} iff for all P\in\mathsf{Pos} (or P\in\mathcal{D} ) such that \tr(A_{1}P)\leq\tr(A_{2}P) ; • A_{1}\sqsubseteq A_{2} implies M^{\dagger}A_{1}M\sqsubseteq M^{\dagger}A_{2}M ; A_{1}\sqsubseteq A_{2} and A_{3}\sqsubseteq A_{4} implies cA_{1}+A_{3}\sqsubseteq cA_{2}+A_{4} . As direct corollaries, for CP map \mathcal{E},\mathcal{E}_{1},\mathcal{E}_{2} , • \tr(A\mathcal{E}(P))=\tr(\mathcal{E}^{\dagger}(A)P) ; A_{1}\sqsubseteq A_{2} implies \mathcal{E}(A_{1})\sqsubseteq\mathcal{E}(A_{2}) ; • (c\mathcal{E}_{1}+\mathcal{E}_{2})(A)=c\mathcal{E}_{1}(A)+\mathcal{E}_{2}(A) ; \mathcal{E}(cA_{1}+A_{2})=c\mathcal{E}(A_{1})+\mathcal{E}(A_{2}) ; • \mathcal{E}_{2}(\mathcal{E}_{1}(A))=(\mathcal{E}_{2}\circ\mathcal{E}_{1})(A) ; (\mathcal{E}_{1}\otimes\mathcal{E}_{2})(A_{1}\otimes A_{2})=\mathcal{E}_{1}(A_{1})\otimes\mathcal{E}_{2}(A_{2}) . For readability, we postpone the proof of the above lemma to Appendix I . Appendix B Deferred Proofs in “Quantum Coupling” Section Theorem B.1 ( Theorem III.3 ) . For any \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) with \tr(\rho_{1})=\tr(\rho_{2}) , for any defect \epsilon\in\mathbb{R}^{+\infty} and for any X\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , the following are equivalent: 1. \rho_{1}X^{\#}_{\epsilon}\rho_{2} ; 2. For any Y_{1}\in\mathsf{Pos}(\mathcal{H}_{1}) and Y_{2}\in\mathsf{Pos}(\mathcal{H}_{2}) such that X\sqsupseteq Y_{1}\otimes I_{2}-I_{1}\otimes Y_{2} , it holds that \tr(Y_{1}\rho_{1})\leq\tr(Y_{2}\rho_{2})+\epsilon Proof. If \epsilon=+\infty , then both (1) and (2) trivially hold. So we consider the case that \epsilon\in\mathbb{R}^{+} , i.e., \epsilon is finite. • (1\Longrightarrow 2) . Suppose \rho_{1}X^{\#}_{\epsilon}\rho_{2} , let \rho:\langle\rho_{1},\rho_{2}\rangle be the witness such that \tr(X\rho)\leq\epsilon . Then for any Hermitian Y_{1},Y_{2} , if X\geq Y_{1}\otimes I-I\otimes Y_{2} , we have \tr(Y_{1}\rho_{1})=\tr((Y_{1}\otimes I)\rho)\leq\tr((X+I\otimes Y_{2})\rho)\leq\tr((I\otimes Y_{2})\rho)+\epsilon=\tr(Y_{2}\rho_{2})+\epsilon , where the second last step uses the assumption. • (2\Longrightarrow 1) . In this part of the proof, we write \langle A,B\rangle to mean the Hilbert-Schmidt inner product \langle A,B\rangle\triangleq\tr(A^{\dagger}B) . The original proof [ 7 ] considers a semi-definite program (\Phi,A,B) . The primal formulation is that of maximising \langle A,Z\rangle , subject to \Phi(Z)=B,Z\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , and the dual one is that of minimising \langle B,Y\rangle subject to \Phi^{\dagger}(Y)\geq A,Y\in\mathsf{Herm}(\mathcal{H}_{1}\oplus\mathcal{H}_{2}) , where: \displaystyle A=I-X,B=\begin{pmatrix}\rho_{1}&\\ &\rho_{2}\end{pmatrix} \displaystyle\Phi(Z)=\begin{pmatrix}\tr_{2}(Z)&\\ &\tr_{1}(Z)\end{pmatrix} \displaystyle\Phi^{\dagger}(Y)=\Phi^{\dagger}\begin{pmatrix}Y_{1}&\cdot\\ \cdot&Y_{2}\end{pmatrix}=Y_{1}\otimes I_{2}+I_{1}\otimes Y_{2} The above formulation can be shown to satisfy strong duality, meaning that the optima for the primal and dual problems exist and are equal. Then, let us consider for all Hermitians Y_{1}\in\mathsf{Herm}(\mathcal{H}_{1}) , Y_{2}\in\mathsf{Herm}(\mathcal{H}_{2}) satisfying Y_{1}\otimes I_{2}+I_{1}\otimes Y_{2}\geq I-X , observe that \displaystyle\langle B,Y\rangle \displaystyle=\tr(Y_{1}\rho_{1}+Y_{2}\rho_{2}) \displaystyle=\tr(Y_{2}^{\prime}\rho_{2})-\tr(Y_{1}^{\prime}\rho_{1})+\tr(\rho_{1}) \displaystyle\geq\tr(\rho_{1})-\epsilon where Y_{2}^{\prime}=Y_{2}+nI , Y_{1}^{\prime}=(n+1)I-Y_{1} with sufficiently large n\in\mathbb{R}^{+} (e.g., bigger than all singular values of Y_{1} and Y_{2} ) such that Y_{2}^{\prime} and Y_{1}^{\prime} are both positive. The second line is derived by using the assumption \tr(\rho_{1})=\tr(\rho_{2}) . By condition (2) since Y_{1}^{\prime}\otimes I_{2}-I_{1}\otimes Y_{2}^{\prime}=I-(Y_{1}\otimes I_{2}+I_{1}\otimes Y_{2})\sqsubseteq I-(I-X)=X , we have \tr(Y_{2}^{\prime}\rho_{2})-\tr(Y_{1}^{\prime}\rho_{1})\geq-\epsilon , and this leads to third line. By strong duality, we have \langle I-X,Z_{\max}\rangle\geq\tr(\rho_{1})-\epsilon , or equivalently, \tr(Z_{\max})-\tr(XZ_{\max})\geq\tr(\rho_{1})-\epsilon . Since \tr(Z_{\max})=\tr(\rho_{1}) , we have \tr(XZ_{\max})\leq\epsilon , which says that Z_{\max} is a witness of the lifting \rho_{1}X^{\#}_{\epsilon}\rho_{2} . ∎ Lemma B.2 ( Lemma III.4 ) . Let \rho:\langle\rho_{1},\rho_{2}\rangle . Then, \tr(\rho)=\tr(\rho_{1})=\tr(\rho_{2}) . Proof. This is direct by noting \tr(\rho)=\tr(\tr_{1}(\rho))=\tr(\rho_{1})=\tr(\tr_{2}(\rho))=\tr(\rho_{2}) . ∎ Before proving the relationship between \star -coupling and partial coupling and its variant of Strassen’s theorem, i.e., Proposition B.3 and Theorem B.5 , we first introduce some useful definitions: • For any Hilbert space \mathcal{H} , we additionally extend it to \mathcal{H}^{\star} with one-dimension denoted by |\star\rangle . Let P_{\star}=|\star\rangle\langle\star| the projection of \star space and P_{\star}^{\bot}=I_{\star}-P_{\star} the projection to original space. (To avoid ambiguity, we write I_{\star} for the identity of \mathcal{H}^{\star} .) • For any \rho\in\mathcal{D}(\mathcal{H}) , we define the star-extension \rho^{\star}\triangleq(1-\tr(\rho))|\star\rangle\langle\star|+\rho\in\mathcal{D}^{1}(\mathcal{H}^{\star}) . Obviously, P_{\star}^{\bot}\rho^{\star}P_{\star}^{\bot}=\rho . • For \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) , we say \rho\in\mathcal{D}(\mathcal{H}_{1}^{\star}\otimes\mathcal{H}_{2}^{\star}) is a \star -coupling of \rho_{1} and \rho_{2} , written \rho:\langle\rho_{1},\rho_{2}\rangle_{\star} , if \rho:\langle\rho_{1}^{\star},\rho_{2}^{\star}\rangle . • For any A\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , we define A^{\star}\in\mathsf{Pos}(\mathcal{H}_{1}^{\star}\otimes\mathcal{H}_{2}^{\star}) as the embedding of A . • For \rho\in\mathcal{D}(\mathcal{H}_{1}^{\star}\otimes\mathcal{H}_{2}^{\star}) , we define the projection: \Pi_{\star}^{\bot}(\rho)=(P_{\star}^{\bot}\otimes P_{\star}^{\bot})\rho(P_{\star}^{\bot}\otimes P_{\star}^{\bot})\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}). • For any \rho\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) such that \rho:\langle\rho_{1},\rho_{2}\rangle_{p} , define \displaystyle\rho^{\uparrow}= \displaystyle(1+\tr(\rho)-\tr(\rho_{1})-\tr(\rho_{2}))|\star\star\rangle\langle\star\star|\ + \displaystyle(\rho_{1}-\tr_{2}(\rho))\otimes|\star\rangle\langle\star|+|\star\rangle\langle\star|\otimes(\rho_{2}-\tr_{1}(\rho))+\rho. Proposition B.3 (Relation to \star -coupling) . For given \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) , \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) and A\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , we claim that: 1. Any \star -coupling provide a partial-coupling, i.e., \Pi_{\star}^{\bot}(\rho):\langle\rho_{1},\rho_{2}\rangle_{p} if \rho:\langle\rho_{1},\rho_{2}\rangle_{\star} . 2. We can construct \star -coupling from a partial-coupling, i.e., \rho^{\uparrow}:\langle\rho_{1},\rho_{2}\rangle_{\star} if \rho:\langle\rho_{1},\rho_{2}\rangle_{p} . In fact, \Pi_{\star}^{\bot}(\rho^{\uparrow})=\rho . 3. If \rho:\langle\rho_{1},\rho_{2}\rangle_{\star} , \tr(A^{\star}\rho)=\tr(A\Pi_{\star}^{\bot}(\rho)) . As a consequence, if \rho:\langle\rho_{1},\rho_{2}\rangle_{p} , then \tr(A^{\star}\rho^{\uparrow})=\tr(A\rho) . Proof. (1). Suppose \rho:\langle\rho_{1},\rho_{2}\rangle_{\star} . Compute \displaystyle\tr_{2}(\Pi_{\star}^{\bot}(\rho)) \displaystyle=\tr_{2}((P_{\star}^{\bot}\otimes P_{\star}^{\bot})\rho(P_{\star}^{\bot}\otimes P_{\star}^{\bot})) \displaystyle=P_{\star}^{\bot}\tr_{2}((I_{\star}\otimes P_{\star}^{\bot})\rho(I_{\star}\otimes P_{\star}^{\bot}))P_{\star}^{\bot} \displaystyle\sqsubseteq P_{\star}^{\bot}\tr_{2}(\rho)P_{\star}^{\bot} \displaystyle=P_{\star}^{\bot}\rho_{1}^{\star}P_{\star}^{\bot} \displaystyle=\rho_{1} where we use the fact that \tr_{2}(\rho)=\tr_{2}((I_{\star}\otimes P_{\star})\rho(I_{\star}\otimes P_{\star})+(I_{\star}\otimes P_{\star}^{\bot})\rho(I_{\star}\otimes P_{\star}^{\bot})) . Similarly, \tr_{2}(\Pi_{\star}^{\bot}(\rho))\sqsubseteq\rho_{2} . Furthermore, observe that \displaystyle\tr(\rho)=\, \displaystyle\tr((P_{\star}\otimes P_{\star})\rho(P_{\star}\otimes P_{\star}))+\tr((I_{\star}\otimes P_{\star}^{\bot})\rho(I_{\star}\otimes P_{\star}^{\bot}))\,+ \displaystyle\tr((P_{\star}^{\bot}\otimes I_{\star})\rho(P_{\star}^{\bot}\otimes I_{\star}))-\tr((P_{\star}^{\bot}\otimes P_{\star}^{\bot})\rho(P_{\star}^{\bot}\otimes P_{\star}^{\bot})) \displaystyle=\, \displaystyle\tr((P_{\star}\otimes P_{\star})\rho(P_{\star}\otimes P_{\star}))+\tr(\rho_{2})+\tr(\rho_{1})-\tr(\Pi_{\star}^{\bot}(\rho)) Note that \tr(\rho)=1 , 0\leq\tr((P_{\star}\otimes P_{\star})\rho(P_{\star}\otimes P_{\star})) , we have \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\Pi_{\star}^{\bot}(\rho)) . All above implies that \Pi_{\star}^{\bot}(\rho):\langle\rho_{1},\rho_{2}\rangle_{p} . (2). Suppose \rho:\langle\rho_{1},\rho_{2}\rangle_{p} . It is straightforward that : \displaystyle\tr_{2}(\rho^{\uparrow})=\, \displaystyle(1+\tr(\rho)-\tr(\rho_{1})-\tr(\rho_{2}))|\star\rangle\langle\star|\,+ \displaystyle(\rho_{1}-\tr_{2}(\rho))+\tr(\rho_{2}-\tr_{1}(\rho))|\star\rangle\langle\star|+\tr_{2}(\rho) \displaystyle=\ \displaystyle(1-\tr(\rho_{1}))|\star\rangle\langle\star|+\rho_{1} \displaystyle=\ \displaystyle\rho_{1}^{\star}. Similarly, \tr_{1}(\rho^{\uparrow})=\rho_{2}^{\star} . Thus, \rho^{\uparrow}:\langle\rho_{1}^{\star},\rho_{2}^{\star}\rangle , or equivalently, \rho^{\uparrow}:\langle\rho_{1},\rho_{2}\rangle_{\star} . \Pi_{\star}^{\bot}(\rho^{\uparrow})=\rho is trivial by computation. (3). Note that, A^{\star} is preserved under the projection P_{\star}^{\bot}\otimes P_{\star}^{\bot} , so : \displaystyle\tr(A^{\star}\rho) \displaystyle=\tr(A^{\star}(P_{\star}^{\bot}\otimes P_{\star}^{\bot})\rho(P_{\star}^{\bot}\otimes P_{\star}^{\bot}))) \displaystyle=\tr(A\Pi_{\star}^{\bot}(\rho)). ∎ Proposition B.4 ((Sub-)convex Combination of Partial Coupling) . Let \{\lambda_{i}\}_{i\in I} be a subdistribution over index set I (i.e., 0\leq\lambda_{i}\leq 1 for all i , and \sum_{i}\lambda_{i}\leq 1 ), and \rho_{i}\in\mathcal{D}(\mathcal{H}_{1}) , \sigma_{i}\in\mathcal{D}(\mathcal{H}_{2}) , and partial couplings \delta_{i}:\langle\rho_{i},\sigma_{i}\rangle_{p} with indices from I . Then \sum_{i}\lambda_{i}\delta_{i}:\Big\langle\sum_{i}\lambda_{i}\rho_{i},\sum_{i}\lambda_{i}\sigma_{i}\Big\rangle_{p}. As an corollary, for any \rho\in\mathcal{D}(\mathcal{H}_{1}) , \sigma\in\mathcal{D}(\mathcal{H}_{2}) and 0\leq c\leq 1 , if \delta:\langle\rho,\sigma\rangle_{p} , then c\delta:\langle c\rho,c\sigma\rangle_{p} . Proof. First observe: \displaystyle\tr_{2}\Big(\sum_{i}\lambda_{i}\delta_{i}\Big)=\sum_{i}\lambda_{i}\tr_{2}(\delta_{i})\sqsubseteq\sum_{i}\lambda_{i}\rho_{i}; \displaystyle\tr_{1}\Big(\sum_{i}\lambda_{i}\delta_{i}\Big)=\sum_{i}\lambda_{i}\tr_{1}(\delta_{i})\sqsubseteq\sum_{i}\lambda_{i}\sigma_{i}. Further notice that, \displaystyle\tr\Big(\sum_{i}\lambda_{i}\rho_{i}\Big)+\tr\Big(\sum_{i}\lambda_{i}\sigma_{i}\Big) \displaystyle=\sum_{i}\lambda_{i}(\tr(\rho_{i})+\tr(\sigma_{i})) \displaystyle\leq\sum_{i}\lambda_{i}(1+\tr(\delta_{i}))=\sum_{i}\lambda_{i}+\tr\Big(\sum_{i}\lambda_{i}\delta_{i}\Big) \displaystyle\leq 1+\tr\Big(\sum_{i}\lambda_{i}\delta_{i}\Big) as \{\lambda_{i}\}_{i\in I} is a subdistribution. This completes the proof. ∎ Theorem B.5 (Quantum Strassen’s Theorem for Partial Coupling) . For any \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) , \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) , A\in\mathsf{Pos}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) and \epsilon\in\mathbb{R}^{+\infty} , the following are equivalent: 1. There exists partial-coupling \rho:\langle\rho_{1},\rho_{2}\rangle_{p} such that \tr(A\rho)\leq\epsilon ; 2. For any y_{1},y_{2}\in\mathbb{R}^{+} , Y_{1}\in\mathsf{Pos}(\mathcal{H}_{1}),Y_{2}\in\mathsf{Pos}(\mathcal{H}_{2}) , such that y_{1}\leq y_{2} , Y_{1}\leq y_{2}I_{1} , y_{1}I_{2}\leq Y_{2} and A\sqsupseteq Y_{1}\otimes I_{2}-I_{1}\otimes Y_{2} , it holds that: y_{1}(1-\tr(\rho_{1}))+\tr(Y_{1}\rho_{1})\leq y_{2}(1-\tr(\rho_{2}))+\tr(Y_{2}\rho_{2})+\epsilon. Proof. If \epsilon=+\infty , then both (1) and (2) trivially hold. So we consider the case that \epsilon\in\mathbb{R}^{+} , i.e., \epsilon is finite. We first introduce the following condition: 3) There exists star-coupling \rho:\langle\rho_{1},\rho_{2}\rangle_{\star} , i.e., \rho:\langle\rho_{1}^{\star},\rho_{2}^{\star}\rangle , such that \tr(A^{\star}\rho)\leq\epsilon . \bullet (1 \Rightarrow 3). Let \rho be the witness of (1), then \rho^{\uparrow}:\langle\rho_{1},\rho_{2}\rangle_{\star} by Lemma B.3 (2). According to Lemma B.3 (3), \tr(A^{\star}\rho^{\uparrow})=\tr(A\rho)\leq\epsilon . \bullet (3 \Rightarrow 1). Let \rho be the witness of (3), then \Pi_{\star}^{\bot}(\rho):\langle\rho_{1},\rho_{2}\rangle_{p} by Lemma B.3 (1). According to Lemma B.3 (3), \tr(A\Pi_{\star}^{\bot}(\rho))=\tr(A^{\star}\rho)\leq\epsilon . Thus, (1) is equivalent to (3). (3) says that, \rho_{1}^{\star}A^{\star\#}_{\epsilon}\rho_{2}^{\star} , then by Theorem III.3 , it is then equivalent to: 4) For any Z_{1}\in\mathsf{Pos}(\mathcal{H}_{1}^{\star}) and Z_{2}\in\mathsf{Pos}(\mathcal{H}_{2}^{\star}) such that A^{\star}\sqsupseteq Z_{1}\otimes I_{2^{\star}}-I_{1^{\star}}\otimes Z_{2} , it holds that \tr(Z_{1}\rho_{1}^{\star})\leq\tr(Z_{2}\rho_{2}^{\star})+\epsilon. What remaining to be shown is (2) equivalent to (4). \bullet (4 \Rightarrow 2). Set Z_{1}=y_{1}|\star\rangle\langle\star|+Y_{1} and Z_{2}=y_{2}|\star\rangle\langle\star|+Y_{2} . Obviously, Z_{1}\in\mathsf{Pos}(\mathcal{H}_{1}^{\star}) and Z_{2}\in\mathsf{Pos}(\mathcal{H}_{2}^{\star}) . Observe that: \displaystyle A^{\star}-(Z_{1}\otimes I_{2^{\star}}-I_{1^{\star}}\otimes Z_{2}) \displaystyle=\ \displaystyle A-(y_{1}|\star\rangle\langle\star|+Y_{1})\otimes(|\star\rangle\langle\star|+I_{2}) \displaystyle+(|\star\rangle\langle\star|+I_{1})\otimes(y_{2}|\star\rangle\langle\star|+Y_{2}) \displaystyle=\ \displaystyle(A-(Y_{1}\otimes I_{2}-I_{1}\otimes Y_{2}))+(y_{2}-y_{1})|\star\star\rangle\langle\star\star| \displaystyle+(y_{2}I_{1}-Y_{1})\otimes|\star\rangle\langle\star|+|\star\rangle\langle\star|\otimes(Y_{2}-y_{1}I_{2}) \displaystyle\sqsupseteq\ \displaystyle 0. So, \tr(Z_{1}\rho_{1}^{\star})\leq\tr(Z_{2}\rho_{2}^{\star})+\epsilon , or equivalently, y_{1}(1-\tr(\rho_{1}))+\tr(Y_{1}\rho_{1})\leq y_{2}(1-\tr(\rho_{2}))+\tr(Y_{2}\rho_{2})+\epsilon. \bullet (2 \Rightarrow 4). For any Z_{1}\in\mathsf{Pos}(\mathcal{H}_{1}^{\star}) and Z_{2}\in\mathsf{Pos}(\mathcal{H}_{2}^{\star}) such that A^{\star}\sqsupseteq Z_{1}\otimes I_{2^{\star}}-I_{1^{\star}}\otimes Z_{2} , by projecting it to P_{\star}\otimes P_{\star} , P_{\star}^{\bot}\otimes P_{\star} , P_{\star}\otimes P_{\star}^{\bot} and P_{\star}^{\bot}\otimes P_{\star}^{\bot} , the Löwner preserves, and thus: \displaystyle y_{1}-y_{2}\leq 0 \displaystyle\qquad y_{1}I_{2}-Y_{2}\sqsubseteq 0\qquad Y_{1}-y_{2}I_{1}\sqsubseteq 0 \displaystyle Y_{1}\otimes I_{2}-I_{1}\otimes Y_{2}\sqsubseteq A where Z_{1}=\left(\begin{smallmatrix}y_{1}&\cdot\\ \cdot&Y_{1}\end{smallmatrix}\right) and Z_{2}=\left(\begin{smallmatrix}y_{2}&\cdot\\ \cdot&Y_{2}\end{smallmatrix}\right) . Furthermore, observe that \displaystyle\tr(Z_{1}\rho_{1}^{\star})-\tr(Z_{2}\rho_{2}^{\star}) \displaystyle=\ \displaystyle y_{1}(1-\tr(\rho_{1}))+\tr(Y_{1}\rho_{1})-(y_{2}(1-\tr(\rho_{2}))+\tr(Y_{2}\rho_{2})) \displaystyle\leq\ \displaystyle\epsilon by employing (2), and this completes the proof. ∎ Appendix C Deferred Proofs in “Quantum Optimal Transport” Section Proposition C.1 . Given \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) where \mathcal{H}_{1} and \mathcal{H}_{2} are finite-dimensional Hilbert spaces, the set of partial couplings S=\{\rho\mid\rho:\langle\rho_{1},\rho_{2}\rangle_{p}\} is a non-empty, closed and convex set. Proof. For non-emptiness, given \rho_{1}\in\mathcal{D}(\mathcal{H})_{1} and \rho_{2}\in\mathcal{D(\mathcal{H}_{2})} . We claim \rho=\rho_{1}\otimes\rho_{2}\in S . It is direct to see that \tr_{2}(\rho)\sqsubseteq\rho_{1} and \tr_{1}(\rho)\sqsubseteq\rho_{2} . For the trace constraint, notice that \tr(\rho)=\tr(\rho_{1})\tr(\rho_{2}) , \tr(\rho_{1})\leq 1 , and \tr(\rho_{2})\leq 1 , we have (1-\tr(\rho_{1}))(1-\tr(\rho_{2}))\geq , meaning that \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\rho) as we want. For closeness, given \rho^{i}\to\rho with \rho^{i}\in S , we show that \rho\in S . By definition, we know \tr_{2}(\rho^{i})\sqsubseteq\rho_{1} , or equivalently, for any \sigma\in\mathcal{D}(\mathcal{H}_{1}) , \tr(\rho_{i}\sigma\otimes I)\leq\tr(\rho_{1}\sigma) . Fixed \sigma , the function \tr((\sigma\otimes I)\cdot) is linear and continuous. Therefore, by \rho^{i}\to\rho we know \tr(\tr_{2}(\rho)\sigma)\leq\tr(\rho_{1}\sigma) . Since the above inequality holds for any \sigma\in\mathcal{D}(\mathcal{H}) , we conclude that \tr_{2}(\rho)\sqsubseteq\rho_{1} . Similarly we can prove \tr_{1}(\rho)\sqsubseteq\rho_{2} . By the continuity of the trace function, we can also conclude \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\rho) . Therefore we have \rho\in S . For convexity, suppose \sigma_{1},\sigma_{2}\in S and \lambda\in(0,1) . Consider \rho=\lambda\sigma_{1}+(1-\lambda)\sigma_{2} . From \tr_{2}(\sigma_{1})\sqsubseteq\rho_{1} and \tr_{2}(\sigma_{2})\sqsubseteq\rho_{1} , we know \lambda\tr_{2}(\sigma_{1})+(1-\lambda)\tr_{2}(\sigma_{2})\sqsubseteq\lambda\rho_{1}+(1-\lambda)\rho_{1} . Simplifying above, we get \tr_{2}(\rho)\sqsubseteq\rho_{1} . Similarly we have \tr_{1}(\rho)\sqsubseteq\rho_{2} . From \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\sigma_{1}) and \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\sigma_{2}) , we get \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\lambda\tr(\sigma_{1})+(1-\lambda)\tr(\sigma_{2}) , meaning \tr(\rho_{1})+\tr(\rho_{2})\leq 1+\tr(\rho) and \rho\in S as we desired. ∎ Proposition C.2 (Jointly Convexity of QOT) . Let \{\lambda_{i}\}_{i\in I} be a subdistribution over index set I , and \rho_{i}\in\mathcal{D}(\mathcal{H}_{1}) , \sigma_{i}\in\mathcal{D}(\mathcal{H}_{2}) with indices from I . For any cost function C , It holds that: T_{C}\Big(\sum_{i}\lambda_{i}\rho_{i},\sum_{i}\lambda_{i}\sigma_{i}\Big)\leq\sum_{i}\lambda_{i}T_{C}(\rho_{i},\sigma_{i}). As a corollary, if \{\lambda_{i}\}_{i\in I} is a distribution and \sigma\in\mathcal{D}(\mathcal{H}_{2}) , then T_{C}\big(\sum_{i}\lambda_{i}\rho_{i},\sigma\big)\leq\sum_{i}\lambda_{i}T_{C}(\rho_{i},\sigma). Proof. Select \delta_{i}:\langle\rho_{i},\sigma_{i}\rangle_{p} such that T_{C}(\rho_{i},\sigma_{i})=\tr(C\delta_{i}) . By Proposition B.4 , \sum_{i}\lambda_{i}\delta_{i}:\big\langle\sum_{i}\lambda_{i}\rho_{i},\sum_{i}\lambda_{i}\sigma_{i}\big\rangle_{p} , so \displaystyle T_{C}\Big(\sum_{i}\lambda_{i}\rho_{i},\sum_{i}\lambda_{i}\sigma_{i}\Big)\leq\tr\Big(C\sum_{i}\lambda_{i}\delta_{i}\Big)=\sum_{i}\lambda_{i}\tr(C\delta_{i})=\sum_{i}\lambda_{i}T_{C}(\rho_{i},\sigma). ∎ The following lemma demonstrates that for monotonicity it suffices to consider only density operators, which appears useful in the following proofs. Lemma C.3 (Alternative Characterization) . Given two quantum operations \mathcal{E}_{1}\in\mathcal{QO}(\mathcal{H}_{1}),\mathcal{E}_{2}\in\mathcal{QO}(\mathcal{H}_{2}) , input and output costs , the following statement are equivalent: 1. (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} ; 2. For all \rho_{1}\in\mathcal{D}^{1}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}^{1}(\mathcal{H}_{2}) , T_{C_{o}}(\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2}))\leq T_{C_{i}}(\rho_{1},\rho_{2}). Proof. (1 \Rightarrow 2) is trivial. For (2 \Rightarrow 1), by definition, it is sufficient to show that, for all \rho_{1}\in\mathcal{D}(\mathcal{H}_{1}) , \rho_{2}\in\mathcal{D}(\mathcal{H}_{2}) and \rho:\langle\rho_{1},\rho_{2}\rangle_{p} , there exists \sigma:\langle\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2})\rangle_{p} such that : \tr(C_{o}\sigma)\leq\tr(C_{i}\sigma). Since \rho is a partial coupling, then \rho_{1}^{\prime}\triangleq\tr_{2}(\rho)\sqsubseteq\rho_{1} , \rho_{2}^{\prime}\triangleq\tr_{1}(\rho)\sqsubseteq\rho_{2} , 1+\tr(\rho)\geq\tr(\rho_{1})+\tr(\rho_{2}) . Set \tr(\rho)=c . If c=0 , then \tr(\mathcal{E}_{1}(\rho_{1}))+\tr(\mathcal{E}_{2}(\rho_{2}))\leq\tr(\rho_{1})+\tr(\rho_{2})\leq 1 , thus 0:\langle\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2})\rangle_{p} , and obviously \tr(C_{i}\rho)=\tr(C_{o}0)=0 . If c>0 , by taking \rho_{1}^{\prime}/c and \rho_{2}^{\prime}/c in (2), there must exist a partial coupling \sigma:\langle\mathcal{E}_{1}(\rho_{1}^{\prime}/c),\mathcal{E}_{1}(\rho_{2}^{\prime}/c)\rangle_{p} such that \tr(C_{i}(\rho/c))\geq\tr(C_{o}\sigma) . By Proposition B.4 , c\sigma:\langle\rho_{1}^{\prime},\rho_{2}^{\prime}\rangle_{p} , and \tr(C_{i}\rho)\geq\tr(C_{o}(c\sigma)) , so it is sufficient to show c\sigma:\langle\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2})\rangle_{p} . First observe that, \tr_{2}(c\sigma)=c\tr(\sigma)\sqsubseteq c\mathcal{E}_{1}(\rho_{1}^{\prime}/c)=\mathcal{E}_{1}(\rho_{1}^{\prime})\sqsubseteq\mathcal{E}_{1}(\rho_{1}) and similarly, \tr_{1}(c\sigma)\sqsubseteq\mathcal{E}_{2}(\rho_{2}) . On the other hand, \displaystyle 1+\tr(c\sigma) \displaystyle=1-c+c(1+\tr(\sigma)) \displaystyle\geq 1-c+c(\tr(\mathcal{E}_{1}(\rho_{1}^{\prime}/c))+\tr(\mathcal{E}_{2}(\rho_{2}^{\prime}/c))) \displaystyle=1-c+(\tr(\mathcal{E}_{1}(\rho_{1}^{\prime}))+\tr(\mathcal{E}_{2}(\rho_{2}^{\prime}))). Notice that \tr(\rho_{1}-\rho_{1}^{\prime})\geq\tr(\mathcal{E}_{1}(\rho_{1}-\rho_{1}^{\prime})) since \rho_{1}^{\prime}\sqsubseteq\rho_{1} and \mathcal{E}_{1} is a quantum operation, and similarly holds for \rho_{2},\rho_{2}^{\prime} , we get: \displaystyle\tr(\mathcal{E}_{1}(\rho_{1}^{\prime}))+\tr(\mathcal{E}_{2}(\rho_{2}^{\prime})) \displaystyle\geq\ \displaystyle\tr(\mathcal{E}_{1}(\rho_{1}))+\tr(\mathcal{E}_{2}(\rho_{2}))-(\tr(\rho_{1})+\tr(\rho_{2})) \displaystyle+\tr(\rho_{1}^{\prime})+\tr(\rho_{2}^{\prime}) \displaystyle\geq\ \displaystyle\tr(\mathcal{E}_{1}(\rho_{1}))+\tr(\mathcal{E}_{2}(\rho_{2}))-(1+\tr(\rho))+2\tr(\rho) \displaystyle=\ \displaystyle\tr(\mathcal{E}_{1}(\rho_{1}))+\tr(\mathcal{E}_{2}(\rho_{2}))-1+c Combine these two inequalities, we obtain: 1+\tr(c\sigma)\geq\tr(\mathcal{E}_{1}(\rho_{1}))+\tr(\mathcal{E}_{2}(\rho_{2})), which completes the proof. ∎ Lemma C.4 (Monotonicity for Quantum Channels) . Suppose \mathcal{E}_{1}\in\mathcal{QC}(\mathcal{H}_{1}),\mathcal{E}_{2}\in\mathcal{QC}(\mathcal{H}_{2}) are two quantum channels. Then (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} if and only if for every \rho\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , there exists a coupling \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))\rangle such that \tr(C_{i}\rho)\geq\tr(C_{o}\sigma). Proof. (if) part. For all \rho_{1}\in\mathcal{D}^{1}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}^{1}(\mathcal{H}_{2}) , set \rho:\langle\rho_{1},\rho_{2}\rangle which obtains \tr(C_{i}\rho)=T_{C_{i}}(\rho_{1},\rho_{2}) . Then by assumption, there exists a coupling \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))\rangle (i.e., \sigma:\langle\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2})\rangle ) such that: T_{C_{o}}(\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2}))\leq\tr(C_{o}\sigma)\leq\tr(C_{i}\rho)=T_{C_{i}}(\rho_{1},\rho_{2}). Then by Lemma C.3 we finish this part. (only if) part. Since coupling is preserved under scaling, and by Lemma A.8 , we only need to focus on \rho\in\mathcal{D}^{1}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) . Choose \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))\rangle which \tr(C_{o}\sigma)=T_{C_{o}}(\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))) . By assumption, we have: \tr(C_{o}\sigma)=T_{C_{o}}(\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho)))\leq T_{C_{i}}(\tr_{2}(\rho),\tr_{1}(\rho))\leq\tr(C_{i}\rho). ∎ Proposition C.5 ( Proposition IV.3 ) . The monotonicity satisfies several desired properties for data processing: 1. Backward . (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. (\mathcal{E}_{1}^{\dagger}\otimes\mathcal{E}_{2}^{\dagger})(C) and C . Here, \mathcal{E}^{\dagger} is the dual of \mathcal{E} , which satisfies \tr(A\mathcal{E}(B))=\tr(\mathcal{E}^{\dagger}(A)B) for all linear operator A,B . 2. Consequence . Suppose (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i}^{\prime} and C_{o}^{\prime} , and C_{i}^{\prime}\sqsubseteq C_{i} , C_{o}\sqsubseteq C_{o}^{\prime} , then (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} . 3. Sequential composition . Suppose (\mathcal{E}_{1},\mathcal{E}_{1}^{\prime}) is monotone w.r.t. C_{i} and C_{m} , and (\mathcal{E}_{2},\mathcal{E}_{2}^{\prime}) is monotone w.r.t. C_{m} and C_{o} , then (\mathcal{E}_{2}\circ\mathcal{E}_{1},\mathcal{E}_{2}^{\prime}\circ\mathcal{E}_{1}^{\prime}) is monotone w.r.t. C_{i} and C_{o} . For any super-operator \mathcal{E} , its dual \mathcal{E}^{\dagger} is another super-operator. Whenever \mathcal{E} is a quantum operation with Kraus operator \{E_{i}\} , then \mathcal{E}^{\dagger} has Kraus representation \{E_{i}^{\dagger}\} . \circ is the composition of two quantum operations, i.e., for all \rho , (\mathcal{E}_{1}\circ\mathcal{E}_{2})(\rho)\triangleq\mathcal{E}_{1}(\mathcal{E}_{2}(\rho)) . Proof. (1) By Lemma C.3 , for any \rho\in\mathcal{D}^{1}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , set \sigma=(\mathcal{E}_{1}\otimes\mathcal{E}_{2})(\rho) . By the property of dual map, we have: \tr((\mathcal{E}_{1}^{\dagger}\otimes\mathcal{E}_{2}^{\dagger})(C)\rho)=\tr(C(\mathcal{E}_{1}\otimes\mathcal{E}_{2})(\rho))=\tr(C\sigma). It is then sufficient to show that \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))\rangle_{p} , which is completed by noticing that: \displaystyle\tr_{2}(\sigma) \displaystyle=\tr_{2}((\mathcal{E}_{1}\otimes\mathcal{E}_{2})(\rho))\sqsubseteq\mathcal{E}_{1}(\tr_{2}(\rho)), \displaystyle\tr_{1}(\sigma) \displaystyle=\tr_{1}((\mathcal{E}_{1}\otimes\mathcal{E}_{2})(\rho))\sqsubseteq\mathcal{E}_{2}(\tr_{1}(\rho)), \displaystyle 1+\tr(\sigma) \displaystyle=\tr(\rho)+\tr((I\otimes I)(\mathcal{E}_{1}\otimes\mathcal{E}_{2})(\rho)) \displaystyle=\tr((I\otimes I+\mathcal{E}_{1}^{\dagger}(I)\otimes\mathcal{E}_{2}^{\dagger}(I))\rho) \displaystyle\geq\tr((\mathcal{E}_{1}^{\dagger}(I)\otimes I+I\otimes\mathcal{E}_{2}^{\dagger}(I))\rho) \displaystyle=\tr(\mathcal{E}_{1}^{\dagger}(I)\tr_{2}(\rho))+\tr(\mathcal{E}_{2}^{\dagger}(I)\tr_{1}(\rho)) \displaystyle=\tr(\mathcal{E}_{1}(\tr_{2}(\rho)))+\tr(\mathcal{E}_{2}(\tr_{1}(\rho))). First two hold since \mathcal{E}_{1} and \mathcal{E}_{2} are quantum operations, and furthermore, \mathcal{E}_{1}^{\dagger}(I)\sqsubseteq I and \mathcal{E}_{2}^{\dagger}(I)\sqsubseteq I , thus, 0\sqsubseteq(I-\mathcal{E}_{1}^{\dagger}(I))\otimes(I-\mathcal{E}_{2}^{\dagger}(I)) which then leads to the inequality of fifth line. (2) By Lemma C.3 , for any \rho\in\mathcal{D}^{1}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , by assumption, there exists \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))\rangle_{p} such that \tr(C_{i}^{\prime}\rho)\geq\tr(C_{o}^{\prime}\sigma) . Thus, \tr(C_{i}\rho)\geq\tr(C_{i}^{\prime}\rho)\geq\tr(C_{o}^{\prime}\sigma)\geq\tr(C_{o}\sigma). (3) For any \rho_{1} and \rho_{1}^{\prime} , and any partial coupling \rho:\langle\rho_{1},\rho_{1}^{\prime}\rangle_{p} , by the first assumption, there exists a partial coupling \sigma:\langle\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{1}^{\prime}(\rho_{1}^{\prime})\rangle_{p} such that \tr(C_{i}\rho)\geq\tr(C_{m}\sigma) . From the second assumption there is a partial coupling \sigma^{\prime}:\langle\mathcal{E}_{2}(\mathcal{E}_{1}(\rho_{1})),\mathcal{E}_{2}^{\prime}(\mathcal{E}_{1}^{\prime}(\rho_{1}^{\prime}))\rangle_{p} , or equivalently, \sigma^{\prime}:\langle(\mathcal{E}_{1}\circ\mathcal{E}_{2})(\rho_{1}),(\mathcal{E}_{1}^{\prime}\circ\mathcal{E}_{2}^{\prime})(\rho_{1}^{\prime})\rangle_{p} such that \tr(C_{m}\sigma)\geq\tr(C_{o}\sigma^{\prime}) , which concludes the proof by noticing \tr(C_{i}\rho)\geq\tr(C_{o}\sigma^{\prime}) . ∎ Proposition C.6 (Split Cost) . The monotonicity can further be checked via splitting output cost. Formally, Suppose \mathcal{E}_{1},\mathcal{E}_{2} are quantum channels. (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C and Q_{1}\otimes I+I\otimes Q_{2} if and only if C\sqsupseteq\mathcal{E}_{1}^{\dagger}(Q_{1})\otimes I+I\otimes\mathcal{E}_{2}^{\dagger}(Q_{2}). Proof. The if part can be proved by combining Proposition IV.3 ( 1 ) and ( 2 ). For the only if part, by employing Lemma C.4 , we have for all \rho\in\mathcal{D}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) , there exists \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1}(\rho))\rangle such that \displaystyle\tr(C\rho) \displaystyle\geq\tr((Q_{1}\otimes I+I\otimes Q_{2})\sigma) \displaystyle=\tr(Q_{1}\tr_{2}(\sigma))+\tr(Q_{2}\tr_{1}(\sigma)) \displaystyle=\tr(Q_{1}\mathcal{E}_{1}(\tr_{2}(\rho)))+\tr(Q_{2}\mathcal{E}_{2}(\tr_{1}(\rho)) \displaystyle=\tr((\mathcal{E}_{1}^{\dagger}(Q_{1})\otimes I+I\otimes\mathcal{E}_{2}^{\dagger}(Q_{2}))\rho). Since this holds for all \rho , we must have: C\sqsupseteq\mathcal{E}_{1}^{\dagger}(Q_{1})\otimes I+I\otimes\mathcal{E}_{2}^{\dagger}(Q_{2}) . ∎ Theorem C.7 ( Theorem IV.4 ) . Suppose \mathcal{E}_{1} and \mathcal{E}_{2} are quantum channels and costs C_{i}\in\mathsf{Pos}^{\infty} and C_{o}\in\mathsf{Pos} (i.e., C_{o} is finite). Then the following statements are equivalent: 1. (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i} and C_{o} 2. for all (Y_{1},Y_{2},n)\in\mathcal{Y} , (\mathcal{E}_{1},\mathcal{E}_{2}) is monotone w.r.t. C_{i}+nI and Y_{1}\otimes I+I\otimes(nI-Y_{2}) , where \mathcal{Y}\triangleq\{(Y_{1},Y_{2},n)\ |\ n\in\mathbb{N};0\sqsubseteq Y_{1};0\sqsubseteq Y_{2}\sqsubseteq nI;C_{o}\sqsupseteq Y_{1}\otimes I-I\otimes Y_{2}\} . Proof. As \mathcal{E}_{1} and \mathcal{E}_{2} are quantum channels, we employ Lemma C.4 to interpret monotonicity. (1) says that for all \rho\in\mathcal{D}({\mathcal{H}_{1}\otimes\mathcal{H}_{2}}) there is a \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1})(\rho)\rangle such that \tr(C_{o}\sigma)\leq\tr(C_{i}\rho) , or equivalently, \mathcal{E}_{1}(\tr_{2}(\rho)){C_{o}}^{\#}_{\epsilon}\mathcal{E}_{2}(\tr_{1})(\rho) where \epsilon=\tr(C_{i}\rho) . (2) says that for all \rho\in\mathcal{D}({\mathcal{H}_{1}\otimes\mathcal{H}_{2}}) , positive Hermitians Y_{1},Y_{2} and n such that Y_{2}\sqsubseteq nI (where such an n always exists for any Y_{2} ) and Y_{1}\otimes I-I\otimes Y_{2}\sqsubseteq C_{o} , there exists a coupling \sigma:\langle\mathcal{E}_{1}(\tr_{2}(\rho)),\mathcal{E}_{2}(\tr_{1})(\rho)\rangle such that \tr(C_{i}\rho)+n\tr(\rho)\geq\tr((Y_{1}\otimes I)\sigma)+n\tr(\sigma)-\tr((I\otimes Y_{2})\sigma) which, by noticing \tr(\sigma)=\tr(\rho) since \mathcal{E}_{1} and \mathcal{E}_{2} are quantum channels, is equivalent to \tr(Y_{1}(\mathcal{E}_{1}\tr_{2}(\rho)))\leq\tr(Y_{2}(\mathcal{E}_{2}\tr_{1}(\rho)))+\tr(C_{i}\rho). The equivalence then follows from Theorem III.3 . ∎ Symmetric space is useful for describing equivalence of states, as studied in [ 7 ] : Lemma C.8 (State Equivalence (e.g. [ 2 ] prop 3.2)) . Let =_{\text{sym}} be the projector \frac{1}{2}(I+\mathsf{SWAP}) . Then, for any \rho_{1},\rho_{2}\in\mathcal{D}(\mathcal{H}) , \rho_{1}=\rho_{2}\iff\rho_{1}(=_{\text{sym}})^{\#}\rho_{2}. Proposition C.9 ( Proposition IV.5 ) . Two quantum channels \mathcal{E}_{1} and \mathcal{E}_{2} are equivalent if and only if for all density operators \rho_{1},\rho_{2} , T_{s}(\mathcal{E}_{1}(\rho_{1}),\mathcal{E}_{2}(\rho_{2}))\leq T_{s}(\rho_{1},\rho_{2}). Proof. The “only if” part holds directly by the monotonicity of stable QOT under data processing [ 11 ] . For the “if” part, for any \rho\in\mathcal{D}^{1}(\mathcal{H}) , from the assumption, we have 0\leq T_{s}(\rho,\rho)\leq T(\rho,\rho)=0 . Thus, T_{s}(\mathcal{E}_{1}(\rho),\mathcal{E}_{2}(\rho))=0 , or equivalently, T(\mathcal{E}_{1}(\rho)\otimes\frac{I}{2},\mathcal{E}_{2}(\rho)\otimes\frac{I}{2})=0 , indicating \mathcal{E}_{1}(\rho)\otimes\frac{I}{2}=\mathcal{E}_{2}(\rho)\otimes\frac{I}{2} . Then, we know \mathcal{E}_{1}(\rho)=\mathcal{E}_{2}(\rho) for all \rho , meaning that \mathcal{E}_{1}=\mathcal{E}_{2} . ∎ Proposition C.10 ( Proposition IV.6 ) . Given \rho_{1},\rho_{2}\in\mathcal{D}^{1}(\mathcal{H}) and \epsilon\in\mathbb{R}^{+} , the following are equivalent: 1. T_{s}(\rho_{1},\rho_{2})\leq\epsilon ; 2. For all Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}) such that P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq 2(Y_{1}\otimes I-I\otimes Y_{2}) , it holds that: \tr(\tr_{2}(Y_{1})\rho_{1})\leq\tr(\tr_{2}(Y_{2}))\rho_{2})+\epsilon. Proof. By the property of T_{s} , we first observe: T_{s}(\rho_{1},\rho_{2})=\inf_{\tau:\langle\rho_{1}\otimes\frac{I}{2},\rho_{2}\otimes\frac{I}{2}\rangle}(P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\tau), which implies that, (1) is equivalent to (\rho_{1}\otimes\frac{I}{2})\big(P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\big)^{\#}_{\epsilon}(\rho_{2}\otimes\frac{I}{2}) . Employing Theorem III.3 , (1) is further equivalent to: 3) for all Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}) such that P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq Y_{1}\otimes I-I\otimes Y_{2} , it holds that: \tr\Big(Y_{1}\big(\rho_{1}\otimes\frac{I}{2}\big)\Big)\leq\tr\Big(Y_{2}\big(\rho_{2}\otimes\frac{I}{2}\big)\Big)+\epsilon. Notice that, \tr(Y_{i}(\rho_{i}\otimes\frac{I}{2}))=\tr(\tr_{2}(\frac{Y_{i}}{2})\rho_{i}) for i=1,2 , direct substitutions of Y_{i}^{\prime}=\frac{Y_{i}}{2} translate (3) to (2). ∎ Appendix D Deferred Proofs in “A Quantum Relational Hoare Logic” Section Lemma D.1 ( Lemma VI.2 ) . \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} if and only if for all z\in Z , (\llbracket S_{1}\rrbracket,\llbracket S_{2}\rrbracket) is monotone w.r.t. P and Q . Proof. We employ Lemma C.3 to interpret monotone. (if) part. For all z\in Z , and \rho\in\mathcal{D}^{1}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , by assumption we have: T_{Q}(\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho)))\leq T_{P}(\tr_{2}(\rho),\tr_{1}(\rho))\leq\tr(P\rho). Set \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle_{p} such that T_{Q}(\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho)))=\tr(Q\sigma) . Then \tr(Q\sigma)\leq\tr(P\rho) . (only if) part. For all z\in Z , \rho_{1}\in\mathcal{D}^{1}(\mathcal{H}_{1}) and \rho_{2}\in\mathcal{D}^{1}(\mathcal{H}_{2}) , set \rho:\langle\rho_{1},\rho_{2}\rangle such that T_{P}(\rho_{1},\rho_{2})=\tr(P\rho) . By assumption, there exists \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle_{p} (i.e., \sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle_{p} ) such that: T_{P}(\rho_{1},\rho_{2})=\tr(P\rho)\geq\tr(Q\sigma)\geq T_{Q}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})). ∎ Lemma D.2 ( \mathsf{qOTL} Validity Alternative) . \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} if and only if for every z\in Z , \rho_{1}\in\mathcal{D}(\mathcal{H}_{S_{1}}) , \rho_{2}\in\mathcal{D}(\mathcal{H}_{S_{2}}) and partial coupling \rho:\langle\rho_{1},\rho_{2}\rangle_{p} , there exists a partial coupling \sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle_{p} such that \tr(P\rho)\geq\tr(Q\sigma). Proof. (if) part. For every z\in Z , \rho_{1}\in\mathcal{D}(\mathcal{H}_{S_{1}}) , \rho_{2}\in\mathcal{D}(\mathcal{H}_{S_{2}}) , select partial coupling \rho:\langle\rho_{1},\rho_{2}\rangle_{p} such that T_{P}(\rho_{1},\rho_{2})=\tr(P\rho) , by assumption there exists a partial coupling \sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle_{p} such that T_{Q}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))\leq\tr(Q\sigma)\leq\tr(P\rho)=T_{P}(\rho_{1},\rho_{2}), so (\llbracket S_{1}\rrbracket,\llbracket S_{2}\rrbracket) is monotone w.r.t. P and Q , then by Lemma VI.2 . (only if) part. For every z\in Z , by Lemma VI.2 , (\llbracket S_{1}\rrbracket,\llbracket S_{2}\rrbracket) is monotone w.r.t. P and Q . For \rho_{1}\in\mathcal{D}(\mathcal{H}_{S_{1}}) , \rho_{2}\in\mathcal{D}(\mathcal{H}_{S_{2}}) and partial coupling \rho:\langle\rho_{1},\rho_{2}\rangle_{p} , select partial coupling \sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle_{p} such that T_{Q}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))=\tr(Q\sigma) , then: \tr(Q\sigma)=T_{Q}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))\leq T_{P}(\rho_{1},\rho_{2})\leq\tr(P\rho). ∎ Lemma D.3 ( \mathsf{qOTL} Validity for AST Programs) . Suppose S_{1} and S_{2} are AST programs. Then \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} if and only if for every z\in Z , and \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , there exists a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle such that \tr(P_{z}\rho)\geq\tr(Q_{z}\sigma). Proof. Direct by Lemma VI.2 and Lemma C.4 . ∎ Theorem D.4 ( Theorem VI.3 ) . If \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} then \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} . Proof. By induction on the structural of the program, analogously to the soundness proof in [ 2 ] . (skip), (assign-L), (apply-L) : By employing Lemma VI.2 and Proposition IV.3 ( 1 ) and the denotational semantics. (seq) : By employing Lemma VI.2 and Proposition IV.3 ( 3 ) and the denotational semantics. (if-L) : By employing Lemma VI.2 and Lemma C.3 , it remains to be shown that for all \rho\in\mathcal{D}^{1} and \sigma\in\mathcal{D}^{1} , T_{Q}(\llbracket\mathbf{if}\rrbracket(\rho),\sigma)\leq T_{\sum_{m}(M_{m}\otimes I)^{\dagger}_{m}P_{m}(M_{m}\otimes I)}(\rho,\sigma). Set \rho_{m}=\mathcal{E}_{m}(\rho)=M_{m}\rho M_{m}^{\dagger} and p_{m}=\tr(\rho_{m}) , so \llbracket\mathbf{if}\rrbracket(\rho)=\sum_{m}p_{m}\llbracket S_{m}\rrbracket(\rho_{m}/p_{m}) . By assumption and Proposition C.2 , we have: \displaystyle T_{Q}(\llbracket\mathbf{if}\rrbracket(\rho),\sigma)=T_{Q}(\sum_{m}p_{m}\llbracket S_{m}\rrbracket(\rho_{m}/p_{m}),\sigma)\leq\sum_{m}p_{m}T_{Q}(\llbracket S_{m}\rrbracket(\rho_{m}/p_{m}),\sigma)\leq\sum_{m}p_{m}T_{P_{m}}(\rho_{m}/p_{m},\sigma) On the other hand, select \delta:\langle\rho,\sigma\rangle such that \displaystyle T_{\sum_{m}(M_{m}\otimes I)^{\dagger}_{m}P_{m}(M_{m}\otimes I)}(\rho,\sigma) \displaystyle=\tr((\sum_{m}(M_{m}\otimes I)^{\dagger}_{m}P_{m}(M_{m}\otimes I))\delta) \displaystyle=\sum_{m}p_{m}\tr(P_{m}((M_{m}\otimes I)\delta(M_{m}\otimes I)^{\dagger}_{m}/p_{m})). Notice that, (M_{m}\otimes I)\delta(M_{m}\otimes I)^{\dagger}_{m}/p_{m} is in fact a coupling of \langle\rho_{m}/p_{m},\sigma\rangle , so \tr(P_{m}((M_{m}\otimes I)\delta(M_{m}\otimes I)^{\dagger}_{m}/p_{m}))\geq T_{P_{m}}(\rho_{m}/p_{m},\sigma), and this complete the proof. (while-L) : Let z\in Z and \rho be the initial joint state. Set \sigma_{0}=\rho , and inductively define \sigma_{n+1}^{\prime}:\langle\llbracket S\rrbracket(\tr_{2}(\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n})))),\tr_{1}(\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n})))\rangle_{p} as the partial coupling obtained by applying (IH) on initial state \mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n})) , and \sigma_{n+1}=\tr(\mathcal{E}_{1}(\sigma_{n}))\sigma_{n+1} . For simplicity, we write R=((M_{0}\otimes I)^{\dagger}P(M_{0}\otimes I)+(M_{1}\otimes I)^{\dagger}Q(M_{1}\otimes I)). By (IH), we have \tr(Q\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n})))\geq\tr(R\sigma_{n+1}^{\prime}) , or equivalently, \tr(Q\mathcal{E}_{1}(\sigma_{n}))\geq\tr(R\sigma_{n+1}) . We first check \tr_{2}(\sigma_{n})=(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\tr_{2}(\rho)) by induction on n . The base case n=0 is trivial. For n+1 , observe that: \displaystyle\tr_{2}(\sigma_{n+1}) \displaystyle=\tr(\mathcal{E}_{1}(\sigma_{n}))\tr_{2}(\sigma_{n+1}^{\prime}) \displaystyle\sqsubseteq\tr(\mathcal{E}_{1}(\sigma_{n}))\llbracket S\rrbracket(\tr_{2}(\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n})))) \displaystyle=\llbracket S\rrbracket(\tr_{2}(\mathcal{E}_{1}(\sigma_{n}))) \displaystyle=(\llbracket S\rrbracket\circ\mathcal{E}_{1})(\tr_{2}(\sigma_{n})). On the other hand, \displaystyle 1+\tr(\sigma_{n+1}) \displaystyle=1+\tr(\mathcal{E}_{1}(\sigma_{n}))\tr(\sigma_{n+1}^{\prime}) \displaystyle\geq 1+\tr(\mathcal{E}_{1}(\sigma_{n}))(\tr(\llbracket S\rrbracket(\tr_{2}(\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n}))))) \displaystyle\quad\qquad\qquad+\tr(\tr_{1}(\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n}))))-1) \displaystyle=1+\tr(\llbracket S\rrbracket(\tr_{2}(\mathcal{E}_{1}(\sigma_{n})))) \displaystyle=1+\tr((\llbracket S\rrbracket\circ\mathcal{E}_{1})(\tr_{2}(\sigma_{n}))) These two together imply \tr_{2}(\sigma_{n+1})=(\llbracket S\rrbracket\circ\mathcal{E}_{1})(\tr_{2}(\sigma_{n}))=(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n+1}(\tr_{2}(\rho)) . Furthermore, \tr_{1}(\sigma_{n+1}^{\prime})\sqsubseteq\tr_{1}(\mathcal{E}_{1}(\sigma_{n})/\tr(\mathcal{E}_{1}(\sigma_{n}))) , or equivalently, \tr_{1}(\sigma_{n+1})\sqsubseteq\tr_{1}(\mathcal{E}_{1}(\sigma_{n})) . Set \sigma=\sum_{n}\mathcal{E}_{0}(\sigma_{n}) . Its convergence is ensured by realizing that \displaystyle\tr(\sigma) \displaystyle=\sum_{n}\tr(\mathcal{E}_{0}(\tr_{2}(\sigma_{n})))=\sum_{n}\tr(\mathcal{E}_{0}((\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\tr_{2}(\rho)))) \displaystyle=\tr(\llbracket\mathbf{while}\rrbracket(\tr_{2}(\rho)))\leq\tr(\rho). Next, we check the inequality : \displaystyle\tr(R\rho)=\ \displaystyle\tr(P\mathcal{E}_{0}(\sigma_{0})+Q\mathcal{E}_{1}(\sigma_{0})) \displaystyle\geq\ \displaystyle\tr(P\mathcal{E}_{0}(\sigma_{0}))+\tr(R\sigma_{1}) \displaystyle=\ \displaystyle\tr(P\mathcal{E}_{0}(\sigma_{0}))+\tr(P\mathcal{E}_{0}(\sigma_{1})+Q\mathcal{E}_{1}(\sigma_{1})) \displaystyle=\ \displaystyle\sum_{n=0}^{k}\tr(P\mathcal{E}_{0}(\sigma_{n}))+\tr(Q\mathcal{E}_{1}(\sigma_{k})) \displaystyle\geq\ \displaystyle\tr(P\sigma). Thus, it is sufficient to check \sigma:\langle\llbracket\mathbf{while}\rrbracket(\tr_{2}(\rho)),\tr_{1}(\rho)\rangle_{p} as follows: \displaystyle\tr_{2}(\sigma) \displaystyle=\sum_{n}\mathcal{E}_{0}(\tr_{2}(\sigma_{n}))=\sum_{n}\mathcal{E}_{0}(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\tr_{2}(\rho)) \displaystyle=\llbracket\mathbf{while}\rrbracket(\tr_{2}(\rho)), \displaystyle\tr_{1}(\rho) \displaystyle=\tr_{1}(\mathcal{E}_{0}(\sigma_{0})+\mathcal{E}_{1}(\sigma_{0})) \displaystyle\sqsupseteq\tr_{1}(\mathcal{E}_{0}(\sigma_{0}))+\tr_{1}(\sigma_{1}) \displaystyle=\tr_{1}(\mathcal{E}_{0}(\sigma_{0}))+\tr_{1}(\mathcal{E}_{0}(\sigma_{1})+\mathcal{E}_{1}(\sigma_{1})) \displaystyle\sqsupseteq\sum_{n=0}^{k}\tr_{1}(\mathcal{E}_{0}(\sigma_{n}))+\tr_{1}(\mathcal{E}_{1}(\sigma_{n})) \displaystyle\sqsupseteq\tr_{1}(\sigma) \displaystyle 1+\tr(\sigma) \displaystyle=\tr(\tr_{1}(\rho))+\tr(\llbracket\mathbf{while}\rrbracket(\tr_{2}(\rho))). (csq) : By employing Lemma VI.2 and Item 2 . (Strassen) : By employing Lemma VI.2 and Theorem IV.4 . Note that Q should be finite which is inherited from Theorem III.3 . ∎ Lemma D.5 ( Lemma VI.4 ) . For every AST program S , we have \vdash Z:\{(\llbracket S\rrbracket^{\dagger}\otimes I)(Q)\}\ S\sim\mathbf{skip}\ \{Q\}. Proof. By induction. Case \mathbf{skip} : direct from the definition and (skip). Case q:=|0\rangle : direct from the definition and (assign-L). Case \bar{q}:=U[\bar{q}] : direct from the definition and (apply-L). Case S_{1};S_{2} : Assume that for any Q we have \vdash Z:\{(\llbracket S_{i}\rrbracket^{\dagger}\otimes I)(Q)\}\ S_{i}\sim\mathbf{skip}\ \{Q\} for i=1,2 , we directly get from (seq) since ((\llbracket S_{1};S_{2}\rrbracket^{\dagger})\otimes I)(Q)=(\llbracket S_{1}\rrbracket^{\dagger}\otimes I)[(\llbracket S_{2}\rrbracket^{\dagger}\otimes I)(Q)] by Lemma A.8 : \begin{array}[]{c}\vdash Z:\{(\llbracket S_{1}\rrbracket^{\dagger}\otimes I)[(\llbracket S_{2}\rrbracket^{\dagger}\otimes I)(Q)]\}\ S_{1}\sim\mathbf{skip}\ \{(\llbracket S_{2}\rrbracket^{\dagger}\otimes I)(Q)\}\\ \vdash Z:\{(\llbracket S_{2}\rrbracket^{\dagger}\otimes I)(Q)\}\ S_{2}\sim\mathbf{skip}\ \{Q\}\end{array} \vdash Z:\{((\llbracket S_{1};S_{2}\rrbracket^{\dagger})\otimes I)(Q)\}\ S_{1};S_{2}\sim\mathbf{skip}\ \{Q\} Case \mathbf{if} : assume that for any Q and m we have \vdash Z:\{\llbracket S_{m}\rrbracket^{\dagger}\otimes I(Q)\}\ S_{m}\sim\mathbf{skip}\ \{Q\} . Then, it follows directly from (if-L) that \vdash Z:\{\sum_{m}(M_{m}\otimes I)^{\dagger}[(\llbracket S_{m}\rrbracket^{\dagger}\otimes I)(Q)](M_{m}\otimes I)\}\ \mathbf{if}\sim\mathbf{skip}\ \{Q\}. By Lemma A.8 , knowing that \displaystyle\sum_{m}(M_{m}\otimes I)^{\dagger}[(\llbracket S_{m}\rrbracket^{\dagger}\otimes I)(Q)](M_{m}\otimes I) \displaystyle=\ \displaystyle\sum_{m}(\mathcal{E}_{m}^{\dagger}\otimes I)[(\llbracket S_{m}\rrbracket^{\dagger}\otimes I)(Q)] \displaystyle=\ \displaystyle((\sum_{m}\mathcal{E}_{m}^{\dagger}\circ\llbracket S_{m}\rrbracket^{\dagger})\otimes I)(Q) \displaystyle=\ \displaystyle((\sum_{m}\llbracket S_{m}\rrbracket\circ\mathcal{E}_{m})^{\dagger}\otimes I)(Q) \displaystyle=\ \displaystyle(\llbracket\mathbf{if}\rrbracket^{\dagger}\otimes I)(Q) then allows us to conclude that \vdash Z:\{(\llbracket\mathbf{if}\rrbracket^{\dagger}\otimes I)(Q)\}\ \mathbf{if}\sim\mathbf{skip}\ \{Q\} as required. Case \mathbf{while} : assume that for any Q we have \vdash Z:\{(\llbracket S\rrbracket^{\dagger}\otimes I)(Q)\}\ S\sim\mathbf{skip}\ \{Q\} . Then, we get that \vdash Z:\{(\llbracket S\rrbracket^{\dagger}\otimes I)[(\llbracket\mathbf{while}\rrbracket^{\dagger}\otimes I)(Q)]\}\ S\sim\mathbf{skip}\ \{(\llbracket\mathbf{while}\rrbracket^{\dagger}\otimes I)(Q)\} Let P=(\llbracket S\rrbracket^{\dagger}\otimes I)[(\llbracket\mathbf{while}\rrbracket^{\dagger}\otimes I)(Q)] . Then, by the (least) fixed point property of \llbracket\mathbf{while}\rrbracket , i.e., \llbracket\mathbf{while}\rrbracket=\mathcal{E}_{0}+\llbracket\mathbf{while}\rrbracket\circ(\llbracket S\rrbracket\circ\mathcal{E}_{1}) , we obtain that \displaystyle(\llbracket\mathbf{while}\rrbracket^{\dagger}\otimes I)(Q) \displaystyle=[(\mathcal{E}_{0}^{\dagger}+(\mathcal{E}_{1}^{\dagger}\circ\llbracket S\rrbracket^{\dagger})\circ\llbracket\mathbf{while}\rrbracket^{\dagger})\otimes I](Q) \displaystyle=(\mathcal{E}_{0}^{\dagger}\otimes I)(Q)+(\mathcal{E}_{1}^{\dagger}\otimes I)(P) by Lemma A.8 . We thus obtain by (while-L) that \vdash Z:\{P\}\ S\sim\mathbf{skip}\ \{(\mathcal{E}_{0}^{\dagger}\otimes I)(Q)+(\mathcal{E}_{1}^{\dagger}\otimes I)(P)\} \vdash Z:\{(\mathcal{E}_{0}^{\dagger}\otimes I)(Q)+(\mathcal{E}_{1}^{\dagger}\otimes I)(P)\}\ \mathbf{while}\sim\mathbf{skip}\ \{Q\} which is the same as \vdash Z:\{(\llbracket\mathbf{while}\rrbracket^{\dagger}\otimes I)(Q)\}\ \mathbf{while}\sim\mathbf{skip}\ \{Q\} as required. ∎ Lemma D.6 ( Lemma VI.5 ) . For every AST programs S_{1},S_{2} , we have \vdash Z:\{(\llbracket S_{1}\rrbracket^{\dagger}\otimes\llbracket S_{2}\rrbracket^{\dagger})(Q)\}\ S_{1}\sim S_{2}\ \{Q\} Proof. By using Lemma VI.4 , its symmetric version and the rule (seq) we get: (seq) \begin{array}[]{c}\vdash Z:\{(\llbracket S_{1}\rrbracket^{\dagger}\otimes I)[(I\otimes\llbracket S_{2}\rrbracket^{\dagger})(Q)]\}\ S_{1}\sim\mathbf{skip}\ \{(I\otimes\llbracket S_{2}\rrbracket^{\dagger})(Q)\}\\ \vdash Z:\{(I\otimes\llbracket S_{2}\rrbracket^{\dagger})(Q)\}\ \mathbf{skip}\sim S_{2}\ \{Q\}\end{array} \vdash Z:\{(\llbracket S_{1}\rrbracket^{\dagger}\otimes\llbracket S_{2}\rrbracket^{\dagger})(Q)\}\ S_{1}\sim S_{2}\ \{Q\} as required by Lemma A.8 . ∎ Theorem D.7 ( Theorem VI.6 ) . For every AST programs S_{1},S_{2} , we have: \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q_{1}\otimes I+I\otimes Q_{2}\} implies \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q_{1}\otimes I+I\otimes Q_{2}\} Proof. According to Lemma VI.2 and Proposition C.6 , by assumption, it holds that \displaystyle P \displaystyle\sqsupseteq(\llbracket S_{1}\rrbracket^{\dagger}(Q_{1}))\otimes I+I\otimes(\llbracket S_{2}\rrbracket^{\dagger}(Q_{2})) \displaystyle=(\llbracket S_{1}\rrbracket\otimes\llbracket S_{2}\rrbracket)^{\dagger}(Q_{1}\otimes I+I\otimes Q_{2}) by employing Lemma A.8 , and since S_{1},S_{2} are AST, so \llbracket S_{1}\rrbracket^{\dagger} and \llbracket S_{2}\rrbracket^{\dagger} are unital maps, i.e., \llbracket S_{1}\rrbracket^{\dagger}(I)=I and \llbracket S_{2}\rrbracket^{\dagger}(I)=I . Then, by Lemma VI.5 and the (csq) rule, we can derive \begin{array}[]{c}P\sqsupseteq(\llbracket S_{1}\rrbracket\otimes\llbracket S_{2}\rrbracket)^{\dagger}(Q)\\ \vdash Z:\{(\llbracket S_{1}\rrbracket\otimes\llbracket S_{2}\rrbracket)^{\dagger}(Q)\}\ S_{1}\sim S_{2}\ \{Q\}\end{array} \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} where Q=Q_{1}\otimes I+I\otimes Q_{2} , as required. ∎ Theorem D.8 ( Theorem VI.7 ) . For every AST S_{1},S_{2} programs and bounded predicate Q\in\mathsf{Pos}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , we have \vDash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} implies \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\} Proof. By Lemma VI.2 and Theorem IV.4 , we know that \vDash Z,(Y_{1},Y_{2},n)\in\mathcal{Y}:\{P+nI\}\ \\ S_{1}\sim S_{2}\ \{Y_{1}\otimes I+I\otimes(nI-Y_{2})\} where \mathcal{Y} is defined as in Theorem IV.4 with C_{i}=P and C_{o}=Q . Follows from Theorem VI.6 the completeness for split post-conditions, we know that: \vdash Z,(Y_{1},Y_{2},n)\in\mathcal{Y}:\{P+nI\}\ \\ S_{1}\sim S_{2}\ \{Y_{1}\otimes I+I\otimes(nI-Y_{2})\}. Finally by applying rule (duality), we have \vdash Z:\{P\}\ S_{1}\sim S_{2}\ \{Q\}. ∎ Proposition D.9 ( Proposition X.1 ) . Let S_{1} , S_{2} be AST programs and 0\sqsubseteq P,Q\sqsubseteq I be predicates. Then \vDash_{\mathsf{rqPD}}\{P\}\ S_{1}\sim S_{2}\ \{Q\}\iff\ \vDash\{I-P\}\ S_{1}\sim S_{2}\ \{I-Q\}. Proof. From [ 2 ] , we know that \vDash_{\mathsf{rqPD}}\{P\}\ S_{1}\sim S_{2}\ \{Q\} iff for all \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , there exists a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle such that \tr(P\rho)\leq\tr(Q\sigma). Since S_{1},S_{2}\in\mathsf{AST} , \tr(\rho)=\tr(\sigma) , thus it is equivalent to \tr((I-Q)\sigma)\leq\tr((I-P)\rho), which, according to Lemma D.3 , it equivalent to \vDash\{I-P\}\ S_{1}\sim S_{2}\ \{I-Q\} in our logic. Since P,Q\sqsubseteq I , so it is guaranteed that I-P,I-Q\in\mathsf{Pos} . ∎ Proof of Proposition VII.2 . ( \Rightarrow ) part. For any \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) such that \supp(\rho)\subseteq X , by assumption and Lemma D.3 , we know that there exists a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle such that 0\leq\tr(Y^{\bot}\sigma)\leq\tr((X\mid 0)\rho)=0, the last equation is due to Lemma A.7 as \tr(X^{\bot}\rho)=0 . This asserts that \supp(\sigma)\subseteq Y , which conclude that \vDash_{\mathsf{pqRHL}}\{X\}\ S_{1}\sim S_{2}\ \{Y\} . ( \Leftarrow ) part. By Lemma D.3 , for any \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , if \tr(X^{\bot}\rho)\neq 0 , then \tr((X\mid 0)\rho)=+\infty , by convention then it holds. Otherwise, \tr(X^{\bot}\rho)=0 , so \tr((X\mid 0)\rho)=0 and \supp(\rho)\subseteq X , by assumption, there exists a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle such that \supp(\sigma)\subseteq Y , which leads to \tr(Y^{\bot}\sigma)=0\leq\tr((X\mid 0)\rho), and this completes the proof. ∎ Proposition D.10 . For programs S_{1} , S_{2} , any Z , and Z-parameterised predicate P and Z-parameterised projector X\in\mathcal{S}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , the following holds: \vDash Z:\{X\mid 0\}\ S_{1}\sim S_{2}\ \{P\}\iff\ \vDash Z:\{X\mid 0\}\ S_{1}\sim S_{2}\ \{\supp(P)\}. As a corollary, if X\in\mathcal{S}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , then \vDash Z:\{X\mid 0\}\ S_{1}\sim S_{2}\ \{Y\mid 0\}\iff\ \vDash Z:\{X\mid 0\}\ S_{1}\sim S_{2}\ \{Y^{\bot}\}. Proof. For any z\in Z , and \rho\in\mathcal{D}^{1}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , if \tr(X\rho)\neq 0 , then \tr((X\mid 0)\rho)=+\infty , thus both LHS and RHS holds, i.e., exists partial coupling \sigma of outputs such that \tr((X\mid 0)\rho)\geq\tr(P\sigma) and \tr((X\mid 0)\rho)\geq\tr(\supp(P)\sigma) . Otherwise, \tr(X\rho)=0 , then \tr((X\mid 0)\rho)=0 , then for any partial coupling \sigma of outputs, \tr(P\sigma)\leq\tr((X\mid 0)\rho)=0 if and only if \tr(\supp(P)\sigma)\leq\tr((X\mid 0)\rho)=0 , so LHS is equivalent to RHS. ∎ Appendix E Deferred Proofs in “Two-Sided Rules” Section Theorem E.1 ( Theorem VI.9 ) . For AST programs S_{1},S_{2} , and measurements M=\{M_{1},\cdots,M_{k}\} and N=\{N_{1},\cdots,N_{k}\} , the following are equivalent: 1. \emptyset\stackrel{{\scriptstyle(S_{1},S_{2})}}{{\vDash}}M\approx N ; 2. \vDash(Y_{1},\cdots,Y_{k},Z_{1},\cdots,Z_{k},n)\in\mathcal{Y}_{k}:\{nI\}S_{1}\sim S_{2}\big\{(\mbox{$\sum_{i}$}M_{i}^{\dagger}Y_{i}M_{i})\otimes I+I\otimes\big[nI-(\mbox{$\sum_{i}$}N_{i}^{\dagger}Z_{i}N_{i})\big]\big\} where \mathcal{Y}_{k}=\{(Y_{1},\cdots,Y_{k},Z_{1},\cdots,Z_{k},n)\mid\forall\,i,\ 0\sqsubseteq Y_{i},\ 0\sqsubseteq Z_{i}\sqsubseteq nI,Y_{i}\otimes I-I\otimes Z_{i}\sqsubseteq 0,\forall\,j\neq i,\ Y_{i}\otimes I-I\otimes Z_{j}\sqsubseteq I\}. Proof. ( 1\Rightarrow 2 ). By Lemma D.3 , for any \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , set \rho_{1}=\tr_{2}(\rho) and \rho_{2}=\tr_{1}(\rho) , \sigma_{1}=\llbracket S_{1}\rrbracket(\rho_{1}) and \sigma_{2}=\llbracket S_{2}\rrbracket(\rho_{2}) . By first assumption, we know that for all i , \tr(M_{i}\sigma_{1}M_{i}^{\dagger})=\tr(N_{i}\sigma_{2}N_{i}^{\dagger}) and denote it by p_{i} . Set the state \sigma_{1}^{\prime}=\begin{pmatrix}M_{1}\sigma_{1}M_{1}^{\dagger}&0&\cdots&0\\ 0&M_{2}\sigma_{1}M_{2}^{\dagger}&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&M_{k}\sigma_{1}M_{k}^{\dagger}\end{pmatrix}\qquad\sigma_{2}^{\prime}=\begin{pmatrix}N_{1}\sigma_{2}N_{1}^{\dagger}&0&\cdots&0\\ 0&N_{2}\sigma_{2}N_{2}^{\dagger}&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&N_{k}\sigma_{2}N_{k}^{\dagger}\end{pmatrix} and obviously, \sigma^{\prime}_{1}\in\mathcal{D}(\mathcal{H}_{k}\otimes\mathcal{H}_{S_{1}}) and \sigma^{\prime}_{2}\in\mathcal{D}(\mathcal{H}_{k}\otimes\mathcal{H}_{S_{2}}) where \mathcal{H}_{k} is the k -dimensional Hilbert space. In other words, \sigma_{1}^{\prime}=\sum_{i}|i\rangle\langle i|\otimes M_{i}\sigma_{1}M_{i}^{\dagger} and \sigma_{2}^{\prime}=\sum_{i}|i\rangle\langle i|\otimes N_{i}\sigma_{2}N_{i}^{\dagger} . Consider the PSD A=\sum_{i\neq j}(|i\rangle\langle i|\otimes I_{S_{1}})\otimes(|j\rangle\langle j|\otimes I_{S_{2}})\in\mathsf{Pos}((\mathcal{H}_{k}\otimes\mathcal{H}_{S_{1}})\otimes(\mathcal{H}_{k}\otimes\mathcal{H}_{S_{2}})) . We claim that \sigma^{\prime}_{1}A_{0}^{\#}\sigma^{\prime}_{2} , since we can construct coupling \sigma^{\prime}=\sum_{i}(|i\rangle\langle i|\otimes M_{i}\sigma_{1}M_{i}^{\dagger})\otimes(|i\rangle\langle i|\otimes N_{i}\sigma_{2}N_{i}^{\dagger})/p_{i}, which \sigma:\langle\sigma^{\prime}_{1},\sigma^{\prime}_{2}\rangle and \tr(A\sigma^{\prime})=0 . By Theorem III.3 , we know that for all Y\in\mathsf{Pos}(\mathcal{H}_{k}\otimes\mathcal{H}_{S_{1}}) and Z\in\mathsf{Pos}(\mathcal{H}_{k}\otimes\mathcal{H}_{S_{2}}) such that A\sqsupseteq Y\otimes(I_{k}\otimes I_{S_{2}})-(I_{k}\otimes I_{S_{1}})\otimes Z , it holds that: \tr(Y\sigma^{\prime}_{1})\leq\tr(Z\sigma^{\prime}_{2}) . Now, back to (2) which we aim to prove, for any (Y_{1},\cdots,Y_{k},Z_{1},\cdots,Z_{k},n)\in\mathcal{Y}_{k} , set Y=\sum_{i}|i\rangle\langle i|\otimes Y_{i} and Z=\sum_{i}|i\rangle\langle i|\otimes Z_{i} , we check that: \displaystyle Y\otimes(I_{k}\otimes I_{S_{1}})-(I_{k}\otimes I_{S_{2}})\otimes Z \displaystyle=\Big(\sum_{i}|i\rangle\langle i|\otimes Y_{i}\Big)\otimes\Big(\sum_{j}|j\rangle\langle j|\otimes I_{S_{2}}\Big)-\Big(\sum_{i}|i\rangle\langle i|\otimes I_{S_{1}}\Big)\otimes\Big(\sum_{j}|j\rangle\langle j|\otimes Z_{j}\Big) \displaystyle=\sum_{i}[(|i\rangle\langle i|\otimes Y_{i})\otimes(|i\rangle\langle i|\otimes I_{S_{2}})-(|i\rangle\langle i|\otimes I_{S_{1}})\otimes(|i\rangle\langle i|\otimes Z_{i})]- \displaystyle\quad\sum_{i\neq j}[(|i\rangle\langle i|\otimes Y_{i})\otimes(|j\rangle\langle j|\otimes I_{S_{2}})-(|i\rangle\langle i|\otimes I_{S_{1}})\otimes(|j\rangle\langle j|\otimes Z_{j})] \displaystyle=\sum_{i}(|i\rangle\langle i|\otimes|i\rangle\langle i|)\otimes(Y_{i}\otimes I_{S_{2}}-I_{S_{1}}\otimes Z_{i})+\sum_{i\neq j}(|i\rangle\langle i|\otimes|j\rangle\langle j|)\otimes(Y_{i}\otimes I_{S_{2}}-I_{S_{1}}\otimes Z_{j}) \displaystyle\sqsubseteq\sum_{i\neq j}(|i\rangle\langle i|\otimes|j\rangle\langle j|)\otimes(I_{S_{1}}\otimes I_{S_{2}}) \displaystyle=A where, in the fourth and fifth line, we change the order of Hilbert space (\mathcal{H}_{k}\otimes\mathcal{H}_{S_{1}})\otimes(\mathcal{H}_{k}\otimes\mathcal{H}_{S_{2}})\rightarrow(\mathcal{H}_{k}\otimes\mathcal{H}_{k})\otimes(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) as they are isomorphic. Thus, it holds that \tr(Y\sigma^{\prime}_{1})\leq\tr(Z\sigma^{\prime}_{2}) , or equivalently, \displaystyle 0\geq\tr(Y\sigma^{\prime}_{1})-\tr(Z\sigma^{\prime}_{2}) \displaystyle=\tr\Big(\Big(\sum_{i}|i\rangle\langle i|\otimes Y_{i}\Big)\Big(\sum_{i}|i\rangle\langle i|\otimes M_{i}\sigma_{1}M_{i}^{\dagger}\Big)\Big)-\tr\Big(\Big(\sum_{i}|i\rangle\langle i|\otimes Z_{i}\Big)\Big(\sum_{i}|i\rangle\langle i|\otimes N_{i}\sigma_{2}N_{i}^{\dagger}\Big)\Big) \displaystyle=\sum_{i}\tr(Y_{i}M_{i}\sigma_{1}M_{i}^{\dagger})-\sum_{i}\tr(Z_{i}N_{i}\sigma_{2}N_{i}^{\dagger}) \displaystyle=\tr\big((\mbox{$\sum_{i}$}M_{i}^{\dagger}Y_{i}M_{i})\sigma_{1}\big)-\tr\big((\mbox{$\sum_{i}$}N_{i}^{\dagger}Z_{i}N_{i})\sigma_{2}\big). Note that \tr(\rho)=\tr(\sigma_{1})=\tr(\sigma_{2}) and set it as p . Let \sigma\triangleq\sigma_{1}\otimes\sigma_{2}/p , realizing that \sigma:\langle\sigma_{1},\sigma_{2}\rangle , and observe that \displaystyle\tr((nI)\rho) \displaystyle\geq\tr((nI)\sigma)+\tr\big((\mbox{$\sum_{i}$}M_{i}^{\dagger}Y_{i}M_{i})\sigma_{1}\big)-\tr\big((\mbox{$\sum_{i}$}N_{i}^{\dagger}Y_{i}N_{i})\sigma_{2}\big) \displaystyle=\tr((nI)\sigma)+\tr\big(((\mbox{$\sum_{i}$}M_{i}^{\dagger}Y_{i}M_{i})\otimes I_{S_{2}})\sigma\big)-\tr\big((I_{S_{1}}\otimes(\mbox{$\sum_{i}$}N_{i}^{\dagger}Z_{i}N_{i}))\sigma\big) \displaystyle=\tr\big(\big((\mbox{$\sum_{i}$}M_{i}^{\dagger}Y_{i}M_{i})\otimes I+I\otimes\big[nI-(\mbox{$\sum_{i}$}N_{i}^{\dagger}Z_{i}N_{i})\big]\big)\sigma\big) As \rho is arbitrary, so we finish the proof. ( 2\Rightarrow 1 ). For any \rho_{1}\in\mathcal{D}^{1}(\mathcal{H}_{S_{1}}) and \rho_{2}\in\mathcal{D}^{1}(\mathcal{H}_{S_{2}}) , by Lemma D.3 and Lemma C.3 , choose \rho\triangleq\rho_{1}\otimes\rho_{2}\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) which is a coupling of \langle\rho_{1},\rho_{2}\rangle . For any i=1,\cdots k , select Y_{i}=I , Z_{i}=I , n=1 , Y_{j}=0 and Z_{j}=0 for all j\neq i . It is then obvious that (Y_{1},\cdots,Y_{k},Z_{1},\cdots,Z_{k},1)\in\mathcal{Y} , so by assumption, there exists a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle (or, equivalently, \sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle ) such that \displaystyle n\tr(\rho)\geq\ \displaystyle\tr\big(\big(\big(\mbox{$\sum_{j}$}M_{j}^{\dagger}Y_{j}M_{j}\big)\otimes I+I\otimes\big[nI-(\mbox{$\sum_{j}$}N_{j}^{\dagger}Z_{j}N_{j})\big]\big)\big)\sigma\big) \displaystyle=\ \displaystyle\tr(((M_{i}^{\dagger}M_{i})\otimes I+nI-I\otimes(N_{i}^{\dagger}N_{i}))\sigma) \displaystyle=\ \displaystyle\tr(M_{i}^{\dagger}M_{i}\tr_{2}(\sigma))-\tr(N_{i}^{\dagger}N_{i}\tr_{1}(\sigma))+n\tr(\sigma) \displaystyle=\ \displaystyle\tr(M_{i}(\llbracket S_{1}\rrbracket(\rho_{1}))M_{i}^{\dagger})-\tr(N_{i}(\llbracket S_{2}\rrbracket(\rho_{2}))N_{i}^{\dagger})+n\tr(\rho), since S_{1},S_{2}\in\mathsf{AST} . Thus, for all i , \tr(M_{i}(\llbracket S_{1}\rrbracket(\rho_{1}))M_{i}^{\dagger})\leq\tr(N_{i}(\llbracket S_{2}\rrbracket(\rho_{2}))N_{i}^{\dagger}) . Notice that \sum_{i}\tr(M_{i}(\llbracket S_{1}\rrbracket(\rho_{1}))M_{i}^{\dagger})=\tr(\llbracket S_{1}\rrbracket(\rho_{1}))=\tr(\rho_{1})=\tr(\rho_{2})=\tr(\llbracket S_{2}\rrbracket(\rho_{2}))=\sum_{i}\tr(N_{i}(\llbracket S_{2}\rrbracket(\rho_{2}))N_{i}^{\dagger}), so it must be the case that \tr(M_{i}(\llbracket S_{1}\rrbracket(\rho_{1}))M_{i}^{\dagger})=\tr(N_{i}(\llbracket S_{2}\rrbracket(\rho_{2}))N_{i}^{\dagger}) for all i , i.e., (\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))\vDash M\approx N , and this completes the proof. ∎ Definition E.2 (Measurement Property, c.f. [ 2 ] ) . Define \Gamma\vDash Z:\{P\}M\approx N\{Q_{k}\} if for all \rho,\sigma\in\mathcal{D}^{1} such that (\rho,\sigma)\vDash\Gamma and z\in Z , if T_{P}(\rho,\sigma)<+\infty , then there exists couplings \delta_{k}:\langle M_{k}\rho M_{k}^{\dagger},N_{k}\sigma N_{k}^{\dagger}\rangle such that: T_{P}(\rho,\sigma)\geq\sum_{k}\tr(Q_{k}\delta_{k}). Proposition E.3 . 1). M\approx N\vDash_{\mathsf{rqPD}}A\Rightarrow\{B_{m}\} if and only if M\approx N\vDash\{I-A\}M\approx N\{I-B_{m}\} , where 0\sqsubseteq A,B_{m}\sqsubseteq I . 2). \vDash_{\mathsf{pqRHL}}M\approx N:X\Rightarrow\{Y_{m}\} if and only if \vDash\{X\mid 0\}M\approx N\{Y_{m}^{\bot}\} where X,Y_{m}\in\mathcal{S} . Proof. We first prove clause (1). (if) part. By Def. 5.2 and 5.4 in [ 2 ] , for any \rho\in\mathcal{D}^{1}(\mathcal{H}_{1}\otimes\mathcal{H}_{2}) such that \rho\vDash_{\mathsf{rqPD}}M\approx N (if \rho is partial, then we just normalize it and everything still holds since coupling, trace etc are all scalable), i.e., \forall\,i,\ \tr(M_{i}\tr_{2}(\rho)M_{i}^{\dagger})=\tr(N_{i}\tr_{1}(\rho)N_{i}^{\dagger}) , in other words, (\tr_{2}(\rho),\tr_{1}(\rho))\vDash M\approx N . By assumption, since A\sqsubseteq I , so T_{I-A}(\tr_{2}(\rho),\tr_{1}(\rho))<+\infty , there exists couplings \delta_{i}:\langle M_{i}\tr_{2}(\rho)M_{i}^{\dagger},N_{i}\tr_{1}(\rho)N_{i}^{\dagger}\rangle such that \displaystyle 1-\tr(A\rho)=\tr((I-A)\rho)\geq T_{I-A}(\tr_{2}(\rho),\tr_{1}(\rho))\geq\sum_{i}\tr((I-B_{i})\delta_{i}=1-\sum_{i}\tr(B_{i}\delta_{i}), that is, \tr(A\rho)\leq\sum_{i}\tr(B_{i}\delta_{i}) , or equivalently, M\approx N\vDash_{\mathsf{rqPD}}A\Rightarrow\{B_{m}\} . (only if) part. For any \rho_{1},\rho_{2}\in\mathcal{D}^{1} , select coupling \rho:\langle\rho_{1},\rho_{2}\rangle such that \tr((I-A)\rho)=T_{I-A}(\rho_{1},\rho_{2}) . Since (\rho_{1},\rho_{2})\vDash M\approx N , so \forall\,i,\ \tr(M_{i}\tr_{2}(\rho)M_{i}^{\dagger})=\tr(N_{i}\tr_{1}(\rho)N_{i}^{\dagger}) as \tr_{2}(\rho)=\rho_{1} and \tr_{1}(\rho)=\rho_{2} , which implies \rho\vDash_{\mathsf{rqPD}}M\approx N , by assumption, there exists couplings \delta_{i}:\langle M_{i}\tr_{2}(\rho)M_{i}^{\dagger},N_{i}\tr_{1}(\rho)N_{i}^{\dagger}\rangle such that \tr(A\rho)\leq\sum_{i}\tr(B_{i}\delta_{i}) , or equivalently, \displaystyle T_{I-A}(\rho_{1},\rho_{2})=\tr((I-A)\rho)=1-\tr(A\rho)\geq 1-\sum_{i}\tr(B_{i}\delta_{i})=\sum_{i}\tr((I-B_{i})\delta_{i}) as desired. Now we prove clause (2). (if) part. For any \rho_{1},\rho_{2}\in\mathcal{D}^{1} (the case for partial state is similar just by normalize everything) such that \rho_{1}X^{\#}\rho_{2} . Let \rho be the witness, thus \supp(\rho)\subseteq X , in other words, \tr((X\mid 0)\rho)=\tr(0\rho)=0 by Definition A.6 , thus T_{X\mid 0}(\rho_{1},\rho_{2})=0 . By assumption, there exists couplings \delta_{i}:\langle M_{i}\rho_{1}M_{i}^{\dagger},N_{i}\rho_{2}N_{i}^{\dagger}\rangle such that 0=T_{X\mid 0}(\rho_{1},\rho_{2})\geq\sum_{i}\tr(Y_{i}^{\bot}\delta_{i}), so \tr(Y_{i}^{\bot}\delta_{i})=0 , or equivalently, \supp(\delta_{i})\subseteq Y_{i} . So (M_{i}\rho_{1}M_{i}^{\dagger})Y_{i}^{\#}(N_{i}\rho_{2}N_{i}^{\dagger}) for all i , i.e., \vDash_{\mathsf{pqRHL}}M\approx N:X\Rightarrow\{Y_{m}\} . (only if) part. For any \rho_{1},\rho_{2}\in\mathcal{D}^{1} , if T_{X\mid 0}(\rho_{1},\rho_{2})=+\infty , then it trivially holds. Otherwise, there exists a coupling \rho:\langle\rho_{1},\rho_{2}\rangle such that \tr((X\mid 0)\rho)<+\infty , so \supp(\rho)\subseteq X , thus \rho_{1}X^{\#}\rho_{2} , by assumption, (M_{i}\rho_{1}M_{i}^{\dagger})Y_{i}^{\#}(N_{i}\rho_{2}N_{i}^{\dagger}) , and set \delta_{i} as the witness. Thus, \supp(\delta_{i})\subseteq Y_{i} , or equivalently, \tr(Y_{i}\delta_{i})=0 . Thus, \sum_{i}\tr(Y_{i}^{\bot}\delta_{i})=0\leq T_{X\mid 0}(\rho_{1},\rho_{2}) , and this completes the proof. ∎ Theorem E.4 ( Theorem VI.11 ) . The extra rules for \mathsf{qOTL} in Fig. 2 are sound regarding the notion of validity. Proof. (assign) and (apply) are the same as applying the corresponding one-side rule twice on the left and right. (seq+) We employ Lemma VI.2 and Lemma C.3 to interpret judgements. For any z\in Z , \rho,\sigma\in\mathcal{D}^{1} such that (\rho,\sigma)\vDash\Gamma , by first assumption, T_{P}(\rho,\sigma)\geq T_{Q}(\llbracket S_{1}\rrbracket(\rho),\llbracket S_{1}^{\prime}\rrbracket(\sigma)) , by entailment we know that (\llbracket S_{1}\rrbracket(\rho),\llbracket S_{1}^{\prime}\rrbracket(\sigma))\vDash\Gamma^{\prime} , then by the second assumption, it holds that T_{P}(\rho,\sigma)\geq T_{Q}(\llbracket S_{1}\rrbracket(\rho),\llbracket S_{1}^{\prime}\rrbracket(\sigma))\geq T_{R}(\llbracket S_{2}\rrbracket(\llbracket S_{1}\rrbracket(\rho)),\llbracket S_{2}^{\prime}\rrbracket(\llbracket S_{1}^{\prime}\rrbracket(\sigma)))=T_{R}(\llbracket S_{1};S_{2}\rrbracket(\rho),\llbracket S_{1}^{\prime};S_{2}^{\prime}\rrbracket(\sigma)). (if) For any z\in Z and \rho,\sigma\in\mathcal{D}^{1} such that (\rho,\sigma)\vDash\Gamma , if T_{P}(\rho,\sigma)=+\infty , then obviously T_{P}(\rho,\sigma)\geq T_{A}(\llbracket\mathbf{if}\rrbracket(\rho),\llbracket\mathbf{if}^{\prime}\rrbracket(\sigma)) , and then follows by Lemma VI.2 . If T_{P}(\rho,\sigma) is finite, by the first assumption, \tr(M_{k}\rho M_{k}^{\dagger})=\tr(M^{\prime}_{k}\sigma M_{k}^{\prime\dagger}) (follows by the existence of coupling and let it by \delta_{k} ) and denote it by p_{k} . By the second assumption, \tr(R_{k}\delta_{k})\geq p_{k}T_{R_{k}}(M_{k}\rho M_{k}^{\dagger}/p_{k},M^{\prime}_{k}\sigma M_{k}^{\prime\dagger}/p_{k})\geq p_{k}T_{Q}(\llbracket S_{k}\rrbracket(M_{k}\rho M_{k}^{\dagger}/p_{k}),\llbracket S_{k}^{\prime}\rrbracket(M^{\prime}_{k}\sigma M_{k}^{\prime\dagger}/p_{k})). Sum it up over k , we have: \displaystyle T_{C}(\rho,\sigma) \displaystyle\geq\sum_{k}\tr(R_{k}\delta_{k}) \displaystyle\geq\sum_{k}p_{k}T_{Q}(\llbracket S_{k}\rrbracket(M_{k}\rho M_{k}^{\dagger}/p_{k}),\llbracket S_{k}^{\prime}\rrbracket(M^{\prime}_{k}\sigma M_{k}^{\prime\dagger}/p_{k})) \displaystyle\geq T_{Q}(\sum_{k}p_{k}\llbracket S_{k}\rrbracket(M_{k}\rho M_{k}^{\dagger}/p_{k}),\sum_{k}p_{k}\llbracket S_{k}^{\prime}\rrbracket(M^{\prime}_{k}\sigma M_{k}^{\prime\dagger}/p_{k}) \displaystyle=T_{Q}(\llbracket\mathbf{if}\rrbracket(\rho),\llbracket\mathbf{if}^{\prime}\rrbracket(\sigma)). Where the first inequality follows from the first assumption, the third inequality is due to Proposition C.2 since \{p_{k}\} is a (sub)distribution. This completes the proof. (while) Let \mathcal{E}_{0}(\cdot)=M_{0}(\cdot)M_{0}^{\dagger} , \mathcal{E}_{1}(\cdot)=M_{1}(\cdot)M_{1}^{\dagger} , \mathcal{E}^{\prime}_{0}(\cdot)=M^{\prime}_{0}(\cdot)M_{0}^{\prime\dagger} , \mathcal{E}^{\prime}_{1}(\cdot)=M^{\prime}_{1}(\cdot)M_{1}^{\prime\dagger} . Fix z\in Z . For any \sigma\in\mathcal{D}^{1}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , let \rho=\tr_{2}(\sigma) and \rho^{\prime}=\tr_{1}(\sigma) . It is trivial if \tr(P\sigma)=+\infty . Otherwise, \tr(P\sigma)<+\infty , so T_{P}(\rho,\rho^{\prime})<+\infty . Set \rho_{0}=\rho , \rho^{\prime}_{0}=\rho^{\prime} , p_{0}=1 , so \rho_{0},\rho^{\prime}_{0}\in\mathcal{D}^{1} , and T_{p}(\rho_{0},\rho^{\prime}_{0})<+\infty . We inductively construct \rho_{n},\rho^{\prime}_{n},\sigma_{n},p_{n},q_{n} as follows: • Since \rho_{n},\rho^{\prime}_{n}\in\mathcal{D}^{1} and T_{p}(\rho_{n},\rho^{\prime}_{n})<+\infty , by the first assumption, there exists \sigma_{n}:\langle\mathcal{E}_{0}(\rho_{n}),\mathcal{E}^{\prime}_{0}(\rho^{\prime}_{n})\rangle and \sigma^{\prime}_{n}:\langle\mathcal{E}_{1}(\rho_{n}),\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})\rangle such that T_{P}(\rho_{n},\rho^{\prime}_{n})\geq\tr(Q_{0}\sigma_{n})+\tr(Q_{1}\sigma^{\prime}_{n}). Let q_{n}=p_{n}\tr(\mathcal{E}_{0}(\rho_{n}))=p_{n}\tr(\mathcal{E}^{\prime}_{0}(\rho^{\prime}_{n})) and q=\tr(\mathcal{E}_{1}(\rho_{n}))=\tr(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})) . • By the second assumption, we know that T_{Q_{1}}(\mathcal{E}_{1}(\rho_{n})/q,\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q)\geq T_{P}(\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q),\llbracket S^{\prime}\rrbracket(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q). Select the partial coupling \delta_{n}:\langle\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q),\llbracket S^{\prime}\rrbracket(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q)\rangle_{p} such that T_{P}(\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q),\llbracket S^{\prime}\rrbracket(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q)=\tr(P\delta_{n}) . We set \rho_{n+1}=\tr_{2}(\delta_{n})/\tr(\delta_{n}) and \rho^{\prime}_{n+1}=\tr_{1}(\delta_{n})/\tr(\delta_{n}) , p_{n+1}=p_{n}q\tr(\delta_{n}) . Obviously, \displaystyle T_{P}(\rho_{n+1},\rho^{\prime}_{n+1}) \displaystyle\leq\tr(P\delta_{n}/\tr(\delta_{n}))=T_{P}(\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q),\llbracket S^{\prime}\rrbracket(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q)/\tr(\delta_{n}) \displaystyle\leq T_{Q_{1}}(\mathcal{E}_{1}(\rho_{n})/q,\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q)/\tr(\delta_{n}) \displaystyle\leq\tr(Q_{1}\sigma^{\prime}_{n}/q)/tr(\delta_{n})=(p_{n}/p_{n+1})\tr(Q_{1}\sigma^{\prime}_{n}) \displaystyle\leq(p_{n}/p_{n+1})T_{P}(\rho_{n},\rho_{n}^{\prime}) \displaystyle<+\infty. Set \sigma=\sum_{i}p_{i}\sigma_{i} , it is sufficient to show 1) T_{P}(\rho,\rho^{\prime})\geq\tr(Q_{0}\sigma) and 2) \sigma is a partial coupling of the outputs of two \mathbf{while} s. We first show (1) is true. First, by the construction above, we know that: \displaystyle p_{n}T_{p}(\rho_{n},\rho_{n}^{\prime}) \displaystyle\geq p_{n}(\tr(Q_{0}\sigma_{n})+\tr(Q_{1}\sigma^{\prime}_{n})) \displaystyle\geq\tr(Q_{0}(p_{n}\sigma_{n}))+p_{n}(p_{n+1}/p_{n})T_{P}(\rho_{n+1},\rho^{\prime}_{n+1}) \displaystyle=\tr(Q_{0}(p_{n}\sigma_{n}))+p_{n+1}T_{P}(\rho_{n+1},\rho^{\prime}_{n+1}). Thus, we have: \displaystyle T_{P}(\rho,\rho^{\prime}) \displaystyle=p_{0}T_{P}(\rho_{0},\rho_{0}^{\prime}) \displaystyle\geq\tr(Q_{0}(p_{0}\sigma_{0}))+p_{1}T_{P}(\rho_{1},\rho_{1}^{\prime}) \displaystyle\geq\tr(Q_{0}(p_{0}\sigma_{0}+p_{1}\sigma_{1}))+p_{2}T_{P}(\rho_{2},\rho_{2}^{\prime}) \displaystyle\cdots \displaystyle\geq\tr\Big(Q_{0}\Big(\sum_{i}p_{i}\sigma_{i}\Big)\Big) \displaystyle=\tr(Q_{0}\sigma) To show \sigma is a partial coupling, we first observe that p_{n}\rho_{n}\sqsubseteq(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\rho) since: \displaystyle p_{n+1}\rho_{n+1}=p_{n}q\tr(\delta_{n})\tr_{2}(\delta_{n})/\tr(\delta_{n})\sqsubseteq p_{n}q\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q)=(\llbracket S\rrbracket\circ\mathcal{E}_{1})(p_{n}\rho_{n})\sqsubseteq\cdots\sqsubseteq(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n+1}(p_{0}\rho_{0}). Similarly, p_{n}\rho^{\prime}_{n}\sqsubseteq(\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})^{n}(\rho^{\prime}) . Thus, we have: \displaystyle p_{n+1}\tr_{2}(\sigma_{n+1}) \displaystyle=p_{n+1}\mathcal{E}_{0}(\rho_{n+1})=p_{n+1}\mathcal{E}_{0}(\tr_{2}(\delta_{n})/\tr(\delta_{n})) \displaystyle\sqsubseteq p_{n+1}\mathcal{E}_{0}(\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q)/\tr(\delta_{n}))=\mathcal{E}_{0}((\llbracket S\rrbracket\circ\mathcal{E}_{1})(p_{n}\rho_{n}))) \displaystyle\sqsubseteq\mathcal{E}_{0}\circ(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n+1}(\rho)) which leads to \displaystyle\tr_{2}(\sigma)=\sum_{n}p_{n}\tr_{2}(\sigma_{n})\sqsubseteq\sum_{n}\mathcal{E}_{0}\circ(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\rho))=\llbracket\mathbf{while}[M,S]\rrbracket(\rho). and similarly, \tr_{1}(\sigma)\sqsubseteq\llbracket\mathbf{while}[M,S]\rrbracket(\rho^{\prime}) . We further observe that \displaystyle\tr(\rho)-\tr(\llbracket\mathbf{while}[M,S](\rho)\rrbracket) \displaystyle=\tr(\rho)-\sum_{n}\tr((\mathcal{E}_{0}\circ(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n})(\rho)) \displaystyle=\tr(\rho)-\tr(\mathcal{E}_{0}(\rho))-\sum_{n}\tr((\mathcal{E}_{0}\circ(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n+1})(\rho)) \displaystyle=\tr(\mathcal{E}_{1}(\rho))-\tr((\llbracket S\rrbracket\circ\mathcal{E}_{1})(\rho))+ \displaystyle\qquad\tr((\llbracket S\rrbracket\circ\mathcal{E}_{1})(\rho))-\sum_{n}\tr((\mathcal{E}_{0}\circ(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n})((\llbracket S\rrbracket\circ\mathcal{E}_{1})(\rho))) \displaystyle\geq\sum_{n}\tr((\mathcal{E}_{1}-\llbracket S\rrbracket\circ\mathcal{E}_{1})((\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\rho)))+\lim_{n}\tr((\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\rho)) \displaystyle\geq\sum_{n}((\mathcal{E}_{1}-\llbracket S\rrbracket\circ\mathcal{E}_{1})(p_{n}\rho_{n}))+\lim_{n}p_{n} where the last inequality comes from 1). \tr((\mathcal{I}-\llbracket S\rrbracket)\alpha)\leq\tr((\mathcal{I}-\llbracket S\rrbracket)\beta) where \mathcal{I} is the identity quantum channel, if \alpha,\beta\in\mathcal{D} such that \alpha\sqsubseteq\beta ; 2). p_{n}\rho_{n}\sqsubseteq(\llbracket S\rrbracket\circ\mathcal{E}_{1})^{n}(\rho) as we proved above; 3). \tr(p_{n}\rho_{n})=p_{n} . Similar result holds: \displaystyle\tr(\rho^{\prime})-\tr(\llbracket\mathbf{while}[M^{\prime},S^{\prime}](\rho^{\prime})\rrbracket)\geq\sum_{n}((\mathcal{E}^{\prime}_{1}-\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})(p_{n}\rho^{\prime}_{n}))+\lim_{n}p_{n} From the fact that \delta_{n} is a partial coupling, we have the following equivalent forms: \displaystyle\tr(\llbracket S\rrbracket(\mathcal{E}_{1}(\rho_{n})/q))+\tr(\llbracket S^{\prime}\rrbracket(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n})/q))\leq 1+\tr(\delta_{n}) \displaystyle\Longleftrightarrow\ \displaystyle\tr((\llbracket S\rrbracket\circ\mathcal{E}_{1})(\rho_{n}))+\tr((\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})(\rho^{\prime}_{n}))\leq\tr(\mathcal{E}_{1}(\rho_{n}))+\tr(\mathcal{E}^{\prime}_{1}(\rho^{\prime}_{n}))-\tr(\mathcal{E}_{1}(\rho_{n}))+\tr(\mathcal{E}_{1}(\rho_{n}))\tr(\delta_{n}) \displaystyle\Longleftrightarrow\ \displaystyle 0\leq\tr((\mathcal{E}_{1}-\llbracket S\rrbracket\circ\mathcal{E}_{1})(\rho_{n}))+\tr((\mathcal{E}^{\prime}_{1}-\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})(\rho^{\prime}_{n}))-\tr(\mathcal{E}_{1}(\rho_{n}))+\tr(\mathcal{E}_{1}(\rho_{n}))\tr(\delta_{n}) \displaystyle\Longleftrightarrow\ \displaystyle\tr(\mathcal{E}_{1}(p_{n}\rho_{n}))-p_{n+1}\leq\tr((\mathcal{E}_{1}-\llbracket S\rrbracket\circ\mathcal{E}_{1})(p_{n}\rho_{n}))+\tr((\mathcal{E}^{\prime}_{1}-\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})(p_{n}\rho^{\prime}_{n})) \displaystyle\Longleftrightarrow\ \displaystyle(p_{n}-p_{n+1})-\tr(p_{n}\sigma_{n})\leq\tr((\mathcal{E}_{1}-\llbracket S\rrbracket\circ\mathcal{E}_{1})(p_{n}\rho_{n}))+\tr((\mathcal{E}^{\prime}_{1}-\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})(p_{n}\rho^{\prime}_{n})) since \tr(p_{n}\sigma_{n})=p_{n}\tr(\mathcal{E}_{0}(\rho_{n}))=p_{n}(\tr(\rho_{n})-\tr(\mathcal{E}_{1}(\rho_{n}))=p_{n}-\tr(\mathcal{E}_{1}(p_{n}\rho_{n})) . Combine these fact and back to what we aim to prove: \displaystyle\tr(\llbracket\mathbf{while}[M,S](\rho)\rrbracket)+\tr(\llbracket\mathbf{while}[M^{\prime},S^{\prime}](\rho^{\prime})\rrbracket) \displaystyle\leq\ \displaystyle\tr(\rho)+\tr(\rho^{\prime})-\sum_{n}((\mathcal{E}_{1}-\llbracket S\rrbracket\circ\mathcal{E}_{1})(p_{n}\rho_{n}))-\sum_{n}((\mathcal{E}^{\prime}_{1}-\llbracket S^{\prime}\rrbracket\circ\mathcal{E}^{\prime}_{1})(p_{n}\rho^{\prime}_{n}))-2\lim_{n}p_{n} \displaystyle\leq\ \displaystyle 2-\sum_{n}((p_{n}-p_{n+1})-\tr(p_{n}\sigma_{n}))-2\lim_{n}p_{n} \displaystyle=\ \displaystyle 2+\tr(\sigma)-(p_{0}-\lim_{n}p_{n})-2\lim_{n}p_{n} \displaystyle=\ \displaystyle 1+\tr(\sigma)-\lim_{n}p_{n} \displaystyle\leq\ \displaystyle 1+\tr(\sigma). Take these all together, \sigma is a partial coupling of \langle\llbracket\mathbf{while}[M,S](\rho)\rrbracket,\llbracket\mathbf{while}[M^{\prime},S^{\prime}](\rho^{\prime})\rrbracket\rangle and this complete the proof. ∎ Appendix F Deferred Proofs in “Applications” Theorem F.1 ( Theorem VIII.1 ) . Let S_{1},S_{2} be AST programs acting on the same Hilbert spaces, \mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}}=\mathcal{H} . S_{1} and S_{2} are semantically equivalent, i.e., \llbracket S_{1}\rrbracket=\llbracket S_{2}\rrbracket , if and only if, \displaystyle\vdash(Y_{1},Y_{2},n)\in\mathcal{Y}:\{nI+P_{sym}^{\bot}\}S_{1}\sim S_{2}\{\tr_{2}(Y_{1})\otimes I+I\otimes(nI-\tr_{2}(Y_{2}))\}. where \mathcal{Y}=\{(Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}),n\in\mathbb{N})\mid 0\sqsubseteq Y_{1},0\sqsubseteq 2Y_{2}\sqsubseteq nI,P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq 2(Y_{1}\otimes I-I\otimes Y_{2})\} . Proof. The if part is relatively easy, while, the only if part requires Proposition IV.5 that conclude from stable QOP [ 11 ] . ( if part). Suppose Eqn. ( 4 ) holds. For any \rho\in\mathcal{D}(\mathcal{H}) , select the input coupling as the witness of \rho(=_{sym})^{\#}\rho whose existence is ensured by Prop 3.2 in [ 2 ] , i.e., the coupling \rho_{in}:\langle\rho,\rho\rangle such that \tr(P_{sym}^{\bot}\rho_{in})=0 . By Eqn. ( 4 ), we know for any (Y_{1},Y_{2},n)\in\mathcal{Y} , there exists coupling \sigma:\langle\llbracket S_{1}\rrbracket(\rho),\llbracket S_{2}\rrbracket(\rho)\rangle such that: \displaystyle\tr((\tr_{2}(Y_{1})\otimes I-I\otimes\tr_{2}(Y_{2}))\sigma) \displaystyle\leq\ \displaystyle\tr(P_{sym}^{\bot}[\mathcal{H}]\rho)=0, since \tr(\rho)=\tr(\sigma) , or equivalently, \displaystyle 0\geq \displaystyle\tr((\tr_{2}(Y_{1})\otimes I-I\otimes\tr_{2}(Y_{2}))\sigma) \displaystyle=\ \displaystyle\tr(2Y_{1}(\llbracket S_{1}\rrbracket(\rho)\otimes\frac{I}{2}))-\tr(2Y_{2}(\llbracket S_{2}\rrbracket(\rho)\otimes\frac{I}{2})) Since Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}) are arbitrary (since we can always select sufficient large n\in\mathbb{N} ) such that P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq 2(Y_{1}\otimes I-I\otimes Y_{2})\} , according to Theorem III.3 , we have: (\llbracket S_{1}\rrbracket(\rho)\otimes\frac{I}{2})(=_{sym})^{\#}(\llbracket S_{2}\rrbracket(\rho)\otimes\frac{I}{2}), which, again by Prop 3.2 in [ 2 ] , leads to \llbracket S_{1}\rrbracket(\rho)\otimes\frac{I}{2}=\llbracket S_{2}\rrbracket(\rho)\otimes\frac{I}{2} , or equivalently, \llbracket S_{1}\rrbracket(\rho)=\llbracket S_{2}\rrbracket(\rho) . Since \rho is arbitrary, we must have \llbracket S_{1}\rrbracket=\llbracket S_{2}\rrbracket . ( only if part). Since two programs are equivalent, by Proposition IV.5 , we know that for any \rho_{1},\rho_{2}\in\mathcal{D}^{1} , T_{s}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))\leq T_{s}(\rho_{1},\rho_{2})\leq T(\rho_{1},\rho_{2}) . Next, by Proposition IV.6 , we know that for all Y_{1},Y_{2}\in\mathsf{Pos}(\mathcal{H}\otimes\mathcal{H}_{2}) such that P_{sym}^{\bot}[\mathcal{H}\otimes\mathcal{H}_{2}]\geq 2(Y_{1}\otimes I-I\otimes Y_{2}) , it holds that: \tr(\tr_{2}(Y_{1})\llbracket S_{1}\rrbracket(\rho_{1}))\leq\tr(\tr_{2}(Y_{2}))\llbracket S_{2}\rrbracket(\rho_{2}))+T(\rho_{1},\rho_{2}). If n\in\mathbb{N} such that 0\sqsubseteq 2Y_{2}\sqsubseteq nI , then we have: \displaystyle T_{\tr_{2}(Y_{1})\otimes I+I\otimes(nI-\tr_{2}(Y_{2}))}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})) \displaystyle=n+\tr(\tr_{2}(Y_{1})\llbracket S_{1}\rrbracket(\rho_{1}))-\tr(\tr_{2}(Y_{2}))\llbracket S_{2}\rrbracket(\rho_{2})) \displaystyle\leq n+T(\rho_{1},\rho_{2})=T_{nI+P_{sym}^{\bot}}(\rho_{1},\rho_{2}) where we use the fact that S_{1},S_{2} are AST programs. The rest is straightforward Lemma C.3 and Lemma VI.2 . ∎ Proposition F.2 (Encoding of Trace Distance) . The following are equivalent for all AST programs S_{1},S_{2} such that 3 3 3 We could also just ask all programs to be interpreted over \mathcal{H}=\mathcal{H}_{\text{all variables}} , or over \mathcal{H}=\mathcal{H}_{\mathit{var}(S_{1})\cup\mathit{var}(S_{2})} . \mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}} : 1. \mathsf{TD}(\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2}))\leq\tr(\Phi_{1}\rho_{1})+\tr(\Phi_{2}\rho_{2}) for all z\in Z and \rho_{1}X^{\#}\rho_{2} ; 2. \vDash 0\sqsubseteq P\sqsubseteq I:\{X\mid(I+\Phi_{1}\otimes I+I\otimes\Phi_{2})\}\ S_{1}\sim S_{2}\ \{P\otimes I+I\otimes(I-P)\} . Proof. Firstly, (2) is equivalent to saying that for all \rho:\langle\rho_{1},\rho_{2}\rangle,P there exists a coupling \sigma such that \displaystyle\tr((X\mid(I+\Phi_{1}\otimes I+I\otimes\Phi_{2}))\rho) \displaystyle\geq\tr((P\otimes I)\sigma)+\tr((I\otimes(I-P))\sigma) \displaystyle=\tr(P\sigma_{1})+\tr(\sigma)-\tr(P\sigma_{2}) where \sigma_{1}=\llbracket S_{1}\rrbracket(\rho_{1}) and \sigma_{2}=\llbracket S_{2}\rrbracket(\rho_{2}) . Because S_{1},S_{2} are AST, this is in turn equivalent to saying that for all \rho,z and P , \tr((X\mid(I+\Phi_{1}\otimes I+I\otimes\Phi_{2}))\rho)-\tr(\rho)\geq\tr(P(\rho_{1}-\rho_{2})), which is equivalent to saying that \mathsf{TD}(\rho_{1},\rho_{2})=\max_{0\sqsubseteq P\sqsubseteq I}\tr(P(\rho_{1}-\rho_{2}))\leq\tr((X\mid(I+\Phi_{1}\otimes I+I\otimes\Phi_{2}))\rho)-\tr(\rho). Now, if \rho_{1}X^{\#}\rho_{2} does not hold, then \tr(X^{\bot}\rho)>0 for any \rho , In this case, \tr((X\mid(I+\Phi_{1}\otimes I+I\otimes\Phi_{2}))\rho)=+\infty and the inequality trivially holds. Thus, we only need to consider the case when \rho_{1}X^{\#}\rho_{2} . In this case, we only need to consider any coupling \rho with \tr(\rho X^{\bot})=0 (by our assumption, such \rho must exist). This gives \mathsf{TD}(\rho_{1},\rho_{2})=\max_{0\sqsubseteq P\sqsubseteq I}\tr(P(\rho_{1}-\rho_{2}))\leq\tr(\Phi_{1}\rho_{1})+\tr(\Phi_{2}\rho_{2}) as we desired. ∎ Proposition F.3 ( Proposition VIII.7 ) . Let \lambda>0 . The following are equivalent for all AST programs S_{1},S_{2} such that \mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}} : 1. W(\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho)))\leq\lambda\cdot W(\tr_{2}(\rho),\tr_{1}(\rho)) for all \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) ; 2. \vDash\{\lambda^{2}P_{sym}^{\bot}\}\ S_{1}\sim S_{2}\ \{P_{sym}^{\bot}\} . Proof. By definition, we know that the second condition is equivalent to: for every \rho\in\mathcal{D}(\mathcal{H}_{S_{1}}\otimes\mathcal{H}_{S_{2}}) , there is a coupling \sigma:\langle\llbracket S_{1}\rrbracket(\tr_{2}(\rho)),\llbracket S_{2}\rrbracket(\tr_{1}(\rho))\rangle such that \lambda^{2}\tr(\rho P_{sym}^{\bot})\geq\tr(\sigma P_{sym}^{\bot}). Note that \sigma only depends on \tr_{2}(\rho),\tr_{1}(\rho) . Thus, for fixed \rho_{1} and \rho_{2} we can write the second condition equivalently as \min_{\rho:\langle\rho_{1},\rho_{2}\rangle}\max_{\sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle}\lambda^{2}\tr(\rho P_{sym}^{\bot})-\tr(\sigma P_{sym}^{\bot})\geq 0. This can be simplified to \lambda^{2}\min_{\rho:\langle\rho_{1},\rho_{2}\rangle}\tr(\rho P_{sym}^{\bot})\geq\min_{\sigma:\langle\llbracket S_{1}\rrbracket(\rho_{1}),\llbracket S_{2}\rrbracket(\rho_{2})\rangle}\tr(\sigma P_{sym}^{\bot}), which is equivalent to the first condition by definition. ∎ Proposition F.4 ( Proposition VIII.12 ) . For a quantum system \mathbb{S}=\left\langle\mathcal{H},\rho_{0},A,C,do,measure\right\rangle with \rho_{0}=|0\rangle\langle 0| , let G_{1},G_{2}\subseteq A be two groups of agents, and D\subseteq C be a set of commands. The following are equivalent: • G_{1},D:|G_{2} . • \forall\alpha\in(A\times C)^{*} , \displaystyle\vDash a\in G_{2},E=\{E_{\lambda}|\lambda\in\Lambda_{E}\}\in\mathbb{M}_{a},T\subseteq\Lambda_{E}: \displaystyle\{I\}\ q:=|0\rangle;S_{\alpha}\sim q:=|0\rangle;S_{\mathsf{purge}_{G_{1},D}(\alpha)}\ \{M\}{}, where M=M_{T}\otimes I+I\otimes(I-M_{T}) with M_{T}=\sum_{\lambda\in T}E_{\lambda} . Proof. By the definition of validity, the second condition can be equivalently written as the following. \forall\alpha\in(A\times C)^{*},a\in G_{2},E=\{E_{\lambda}|\lambda\in\Lambda_{E}\}\in\mathbb{M}_{a} and T\subseteq\Lambda_{E} , we have \tr(\rho I)\geq\tr(\sigma(M_{T}\otimes I+I\otimes(I-M_{T}))), which could be simplified to \tr(M_{T}(\sigma_{1}-\sigma_{2}))\leq 0, with \sigma_{1}=\tr_{2}(\sigma)=\mathcal{E}_{\alpha}(|0\rangle\langle 0|) , and \sigma_{2}=\tr_{1}(\sigma)=\mathcal{E}_{\mathsf{purge}_{G_{1},D}(\alpha)}(|0\rangle\langle 0|) . Now, notice that \forall T\subseteq\Lambda_{E} \tr(M_{T}(\sigma_{1}-\sigma_{2}))\leq 0 is equivalent to \max_{T}\left(p_{E,\sigma_{1}}(T)-p_{E,\sigma_{2}}(T)\right)\leq 0, we can rewrite the second condition as \forall\alpha\in(A\times C)^{*},a\in G_{2} , d_{a}\left(\mathcal{E}_{\alpha}(|0\rangle\langle 0|),\mathcal{E}_{\mathsf{purge}_{G_{1},D}(\alpha)}(|0\rangle\langle 0|)\right)\leq 0. Thus, it is equivalent to G_{1},D:|G_{2} by definition. ∎ Proposition F.5 ( Proposition VIII.15 ) . The following are equivalent for all AST programs S_{1} on an n -qubit system with: 1. S_{1} is (\varepsilon,\delta) -differentially private; 2. \vDash i\in[n],0\sqsubseteq M\sqsubseteq I:\{P_{i,sym}|(\exp(\varepsilon)+\delta)I\}\ S_{1}\sim S_{1}\ \{M\otimes I+\exp(\varepsilon)I\otimes(I-M)\} . Here P_{i,sym}=P_{sym}[\mathcal{H}_{[n]-i}]\otimes(I_{i\langle 1\rangle}\otimes I_{i\langle 2\rangle}) for i\in[n] . Proof. We first notice that, 1) states that \forall M,S and \forall\rho,\sigma , if \exists i\in[n] such that \tr_{i}(\rho)=\tr_{i}(\sigma) , then \Pr[\mathcal{E}(\rho)\in_{M}S]\leq\exp(\varepsilon)\cdot\Pr(\mathcal{E}(\sigma)\in_{M}S)+\delta. This is equivalent to say \forall M,S,\rho,\sigma and \forall i\in[n] , if \tr_{i}(\rho)=\tr_{i}(\sigma) , then the above inequality holds. Now consider some arbitrary fixed i\in[n] , and any \rho and \sigma with a coupling \rho_{0}:\langle\rho,\sigma\rangle . If \tr_{i}(\rho)\neq\tr_{i}(\sigma) , then \tr(P_{i,sym}^{\bot}\rho_{0})>0 , and thus \tr(\rho_{0}(P_{i,sym}|(\exp(\varepsilon)+\delta)I))=+\infty , meaning that it is always valid in this case. Therefore, we only need to consider the case where \tr_{i}(\rho)=\tr_{i}(\sigma) . In this case, we consider the case \supp(\rho_{0})\sqsubseteq P_{i} without loss of generality (otherwise the validity condition holds directly). The condition is for any M satisfying 0\sqsubseteq M\sqsubseteq I , \exp(\varepsilon)+\delta\geq\tr(\llbracket S_{1}\rrbracket(\rho)M)+\exp(\varepsilon)(1-\tr(\llbracket S_{1}\rrbracket(\sigma)M)), which could be simplified to \tr(\llbracket S_{1}\rrbracket(\rho)M)\leq\exp(\varepsilon)\tr(\llbracket S_{1}\rrbracket(\sigma)M)+\delta. Note that when M goes over all 0\sqsubseteq M\sqsubseteq I , it exactly goes over all POVMs \sum_{m\in S}M_{m} , we know that the second condition is then equivalent to the first as we want. ∎ We need the following proposition about the projector onto the symmetric subspace. Proposition F.6 (Adapted from Proposition 3.2 in [ 54 ] ) . \rho_{1}=\rho_{2} if and only if \rho_{1}(=_{sym})^{\#}\rho_{2} , where =_{sym} stands for the space of \supp(P_{sym}) . Proposition F.7 ( Proposition VIII.5 ) . Let c\in\mathbb{R}^{+} . The following are equivalent for all AST programs S_{1},S_{2} such that \mathcal{H}=\mathcal{H}_{S_{1}}=\mathcal{H}_{S_{2}} : 1. \|\llbracket S_{1}\rrbracket-\llbracket S_{2}\rrbracket\|_{\diamond}\leq 2c ; 2. \vDash 0\sqsubseteq P\sqsubseteq I_{\mathcal{H}\otimes\mathcal{H}}:\{P_{sym}[\mathcal{H}\otimes\mathcal{H}]\mid(1+c)I\}\ S_{1}\sim S_{2}\ \{P\otimes I+I\otimes(I-P)\} . Proof. This is direct by applying Proposition VIII.3 with X=P_{sym}[\mathcal{H}\otimes\mathcal{H}] , \Phi_{1}=\Phi_{2}=cI/2 , and the definition of diamond distance for completely positive and trace non-increasing linear maps. ∎ Appendix G Stabilized Quantum Optimal Transport Cost In this section, we briefly review the proof of T_{s}(\rho,\sigma)=T(\rho\otimes\frac{I}{2},\sigma\otimes\frac{I}{2}) in [ 11 ] for completeness. We begin with a decomposition of the projector onto the asymmetric subspace. Lemma G.1 (Identity (1) in [ 11 ] ) . We have \mathrm{P}_{\mathrm{asym}}(d_{1}\otimes d_{2})=\mathrm{P}_{\mathrm{asym}}(d_{1})\otimes\mathrm{P}_{\mathrm{sym}}(d_{2})+\mathrm{P}_{\mathrm{sym}}(d_{1})\otimes\mathrm{P}_{\mathrm{asym}}(d_{2}). The following lemma is a special case of the Schur-Weyl duality. Suppose X\in\mathcal{D}(\mathbb{C}^{d}\otimes\mathbb{C}^{d}) , and let \Sigma_{d} be the following UU -twirling channel \Sigma_{d}(X)=\int_{\mathcal{U}_{d}}(U\otimes U)X(U^{\dagger}\otimes U^{\dagger})\text{d}U, where the integral is with respect to the Haar measure on group \mathcal{U}_{d} of d\times d unitary matrices. Then, we have: Lemma G.2 (Theorem 10 in [ 55 ] ) . \Sigma_{d}(X)=\mathrm{Tr}[XP_{\mathrm{sym}}(d)]\frac{P_{\mathrm{sym}}(d)}{\mathrm{Tr}[P_{\mathrm{sym}}(d)]}+\mathrm{Tr}[XP_{\mathrm{asym}}(d)]\frac{P_{\mathrm{asym}}(d)}{\mathrm{Tr}[P_{\mathrm{asym}}(d)]}, where P_{\mathrm{sym}}(d)=(I-F_{d})/2 is the projector onto the symmetric subspace, and P_{\mathrm{asym}}(d)=I-P_{\mathrm{sym}}(d) . Proposition G.3 . The channel \Sigma_{d} is self-dual with respect to the Hilbert-Schmidt inner product. Proof. For any A and B , we have \displaystyle\tr[A^{\dagger}\Sigma_{d}(B)] \displaystyle=\tr[A^{\dagger}\int_{\mathcal{U}_{d}}(U\otimes U)B(U^{\dagger}\otimes U^{\dagger})\text{d}U] \displaystyle=\int_{\mathcal{U}_{d}}\tr[A^{\dagger}(U\otimes U)B(U^{\dagger}\otimes U^{\dagger})]\text{d}U \displaystyle=\int_{\mathcal{U}_{d}}\tr[(U^{\dagger}\otimes U^{\dagger})A^{\dagger}(U\otimes U)B]\text{d}U \displaystyle=\int_{\mathcal{U}_{d}}\tr[(U\otimes U)A^{\dagger}(U^{\dagger}\otimes U^{\dagger})B]\text{d}U \displaystyle=\tr[\Sigma_{d}(A^{\dagger})B]. ∎ Proposition G.4 . Using the above notations, we have (id_{d_{1}}\otimes id_{d_{1}}\otimes\Sigma_{d_{2}})(\mathrm{P}_{\mathrm{asym}}(d_{1}\otimes d_{2}))=\mathrm{P}_{\mathrm{asym}}(d_{1}\otimes d_{2}). Proof. This can be verified directly by using lemma G.1 and lemma G.2 . ∎ Theorem G.5 (Theorem 3.3 in [ 11 ] ) . For d_{1} -dimensional quantum density matrices \rho_{1} and \sigma_{1} , and d_{2} -dimensional quantum matrices \rho_{2} and \sigma_{2} , we have T(\rho_{1}\otimes\rho_{2},\sigma_{1}\otimes\sigma_{2})\geq T\left(\rho_{1}\otimes\frac{I_{2}}{2},\sigma_{1}\otimes\frac{I_{2}}{2}\right). Proof. Let \tau_{A_{1}A_{2}B_{1}B_{2}} be an optimal coupling state that gives the value T(\rho_{1}\otimes\rho_{2},\sigma_{1}\otimes\sigma_{2}) . Equivalently speaking, we have T\left(\rho_{1}\otimes\rho_{2},\sigma_{1}\otimes\sigma_{2}\right)=\mathrm{Tr}\left[\tau_{A_{1}B_{1}A_{2}B_{2}}\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes d_{2})\right], with \tau_{A_{1}A_{2}}=\rho_{1}\otimes\rho_{2} , and \tau_{B_{1}B_{2}}=\sigma_{1}\otimes\sigma_{2} . By proposition G.4 and proposition G.3 , we have T\left(\rho_{1}\otimes\rho_{2},\sigma_{1}\otimes\sigma_{2}\right)=\mathrm{Tr}\left[\tau_{A_{1}B_{1}A_{2}B_{2}}\Phi(\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes d_{2}))\right]=\mathrm{Tr}\left[\Phi(\tau_{A_{1}B_{1}A_{2}B_{2}})\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes d_{2})\right] where \Phi is the id_{d_{1}}\otimes id_{d_{1}}\otimes\Sigma_{d_{2}} channel. Using lemma G.1 , we have \displaystyle\Phi(\tau_{A_{1}B_{1}A_{2}B_{2}}) \displaystyle=\tr_{A_{2}B_{2}}[\tau_{A_{1}B_{1}A_{2}B_{2}}(I\otimes\operatorname{P}_{\mathrm{sym}}(d_{2}))]\otimes\frac{P_{\mathrm{sym}}(d_{2})}{\mathrm{Tr}[P_{\mathrm{sym}}(d_{2})]} \displaystyle+\tr_{A_{2}B_{2}}[\tau_{A_{1}B_{1}A_{2}B_{2}}(I\otimes\operatorname{P}_{\mathrm{asym}}(d_{2}))]\otimes\frac{P_{\mathrm{asym}}(d_{2})}{\mathrm{Tr}[P_{\mathrm{asym}}(d_{2})]}. Therefore, we could write X_{A_{1}B_{1}}=\tr_{A_{2}B_{2}}[\tau_{A_{1}B_{1}A_{2}B_{2}}(I\otimes\operatorname{P}_{\mathrm{asym}}(d_{2}))] and Y_{A_{1}B_{1}}=\tr_{A_{2}B_{2}}[\tau_{A_{1}B_{1}A_{2}B_{2}}(I\otimes\operatorname{P}_{\mathrm{sym}}(d_{2}))], with X_{A_{1}B_{1}}+Y_{A_{1}B_{1}}=\tr_{A_{2}B_{2}}[\tau_{A_{1}B_{1}A_{2}B_{2}}]. Then, we have \displaystyle\mathrm{Tr}\left[\Phi(\tau_{A_{1}B_{1}A_{2}B_{2}})\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes d_{2})\right] \displaystyle=\mathrm{Tr}\left[\left\lparen X_{A_{1}B_{1}}\otimes\frac{P_{\mathrm{sym}}(d_{2})}{\mathrm{Tr}[P_{\mathrm{sym}}(d_{2})]}\right\rparen\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes d_{2})\right] \displaystyle+\mathrm{Tr}\left[\left\lparen Y_{A_{1}B_{1}}\otimes\frac{P_{\mathrm{asym}}(d_{2})}{\mathrm{Tr}[P_{\mathrm{asym}}(d_{2})]}\right\rparen\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes d_{2})\right] \displaystyle=\mathrm{Tr}\left[X_{A_{1}B_{1}}\operatorname{P}_{\mathrm{asym}}(d_{1})\right]+\mathrm{Tr}\left[Y_{A_{1}B_{1}}\operatorname{P}_{\mathrm{sym}}(d_{1})\right]. The last step is by using lemma G.1 and the orthogonality of \operatorname{P}_{\mathrm{asym}} and \operatorname{P}_{\mathrm{sym}} . Now, define the state \widetilde{\tau}_{A_{1}B_{1}A_{2}B_{2}}=X_{A_{1}B_{1}}\otimes\frac{P_{\mathrm{sym}}(2)}{\mathrm{Tr}[P_{\mathrm{sym}}(d_{2})]}+Y_{A_{1}B_{1}}\otimes\frac{P_{\mathrm{asym}}(2)}{\mathrm{Tr}[P_{\mathrm{asym}}(2)]}. Note that \widetilde{\tau}_{A_{1}B_{1}A_{2}B_{2}} is a density operator of dimension d_{1}\times d_{2}\times 2\times 2 . We claim it is a coupling state of \rho_{1}\otimes I/2 and \sigma_{1}\otimes I/2 , this is because \tau_{A_{1}A_{2}}=X_{A_{1}}\otimes I/2+Y_{A_{1}}\otimes I/2=\rho_{1}\otimes I/2, and \tau_{B_{1}B_{2}}=X_{B_{1}}\otimes I/2+Y_{B_{1}}\otimes I/2=\sigma_{1}\otimes I/2. From a similar argument as above, we know \mathrm{Tr}\left[\widetilde{\tau}_{A_{1}B_{1}A_{2}B_{2}}\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes 2)\right]=\mathrm{Tr}\left[X_{A_{1}B_{1}}\operatorname{P}_{\mathrm{asym}}(d_{1})\right]+\mathrm{Tr}\left[Y_{A_{1}B_{1}}\operatorname{P}_{\mathrm{sym}}(d_{1})\right] Therefore, we know T\left(\rho_{1}\otimes\rho_{2},\sigma_{1}\otimes\sigma_{2}\right)=\mathrm{Tr}\left[\widetilde{\tau}_{A_{1}B_{1}A_{2}B_{2}}\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes 2)\right]\geq T\left(\rho_{1}\otimes I/2,\sigma_{1}\otimes I/2\right), as T\left(\rho_{1}\otimes I/2,\sigma_{1}\otimes I/2\right) is the minimum value of \mathrm{Tr}\left[\tau^{\prime}_{A_{1}B_{1}A_{2}B_{2}}\operatorname{P}_{\mathrm{asym}}(d_{1}\otimes 2)\right] over all coupling states \tau^{\prime}_{A_{1}B_{1}A_{2}B_{2}} . ∎ From theorem G.5 , we could immediately get T_{s}(\rho,\sigma)=T(\rho\otimes\frac{I_{2}}{2},\sigma\otimes\frac{I_{2}}{2}) . This is because T(\rho\otimes\frac{I_{2}}{2},\sigma\otimes\frac{I_{2}}{2})\geq\inf_{\gamma}T(\rho\otimes\gamma,\sigma\otimes\gamma)\geq T(\rho\otimes\frac{I_{2}}{2},\sigma\otimes\frac{I_{2}}{2}). The first inequality is by the definition of \inf , and the second is by applying theorem G.5 . Appendix H Kantorovich-Rubinstein Duality We first review the Kantorovich duality theorem in the theory of optimal transport. Theorem H.1 (Kantorovich Duality, Theorem 5.10 in [ 56 ] ) . Suppose (\mathcal{X},\mu) and (\mathcal{Y},\nu) are two Polish spaces. Let c:\mathcal{X}\times\mathcal{Y}\to\mathbb{R}^{+\infty} be a lower semi-continuous function such that there exists some real-valued upper semi-continuous functions a\in L^{1}(\mu) and b\in L^{1}(\nu) , with c(x,y)\geq a(x)+b(y),\forall(x,y)\in\mathcal{X}\times\mathcal{Y}. Then, we have \min_{\pi\in\Gamma(\mu,\nu)}\int_{\mathcal{X}\times\mathcal{Y}}c(x,y)\textup{d}\pi(x,y)=\sup_{\begin{subarray}{c}\psi\in\mathcal{C}_{b}(\mathcal{X}),\\ \phi\in\mathcal{C}_{b}(\mathcal{X});\\ \psi-\phi\leq c\end{subarray}}\lparen\int_{\mathcal{Y}}\phi(y)\textup{d}\nu(y)-\int_{\mathcal{X}}\psi(x)\textup{d}\mu(x)\rparen, where \mathcal{C}_{b} denotes the set of continuous bounded functions, and L^{1} is the Lesbegue space of exponent 1 . Here, a Polish space refers to a topological space that is separable and completely metrizable. With the above theorem, we have: Theorem H.2 (Kantorovich-Rubinstein Duality) . Let \mu,\nu be discrete probability distributions over X and Y respectively, and let c:X\times Y\rightarrow[0,+\infty) be a bounded function. Then \inf_{\theta\in\Gamma(\mu,\nu)}\mathbb{E}_{\theta}[c]=\sup_{(n,c_{1},c_{2})\in\mathcal{W}}(\mathbb{E}_{\mu}[c_{1}]+\mathbb{E}_{\nu}[c_{2}]-n) where \Gamma(\mu,\nu) denotes the set of probabilistic couplings of \mu and \nu and (n,c_{1},c_{2})\in\mathcal{W} iff for every x\in X and y\in Y , we have 0\leq c_{1}(x),c_{2}(y) and c_{1}(x)+c_{2}(y)\leq c(x,y)+n . Proof. We first note that a countable set with the discrete topology is always a Polish space, and bounded functions on the discrete space is always continuous. Now, by applying theorem H.1 with \psi=-b_{1} and \phi=b_{2} , we have \inf_{\theta\in\Gamma(\mu,\nu)}\mathbb{E}_{\theta}[c]=\sup_{(b_{1},b_{2})\in\mathcal{B}}(\mathbb{E}_{\mu}[b_{1}]+\mathbb{E}_{\nu}[b_{2}]), where (b_{1},b_{2})\in\mathcal{B} iff b_{1} and b_{2} are bounded functions, and for every x\in X and y\in Y , we have b_{1}(x)+b_{2}(y)\leq c(x,y) . We now show \sup_{(b_{1},b_{2})\in\mathcal{B}}(\mathbb{E}_{\mu}[b_{1}]+\mathbb{E}_{\nu}[b_{2}])=\sup_{(n,c_{1},c_{2})\in\mathcal{W}}(\mathbb{E}_{\mu}[c_{1}]+\mathbb{E}_{\nu}[c_{2}]-n). Since b_{1} and b_{2} are bounded, there exists some integer m satisfying |b_{1}(x)|\leq m and |b_{2}(y)|\leq m . We can then write c_{1}(x)=b_{1}(x)+m and c_{2}(y)=b_{2}(y)+m with n=2m , getting 0\leq c_{1}(x) and 0\leq c_{2}(y) . This gives \sup_{(b_{1},b_{2})\in\mathcal{B}}(\mathbb{E}_{\mu}[b_{1}]+\mathbb{E}_{\nu}[b_{2}])\leq\sup_{(n,c_{1},c_{2})\in\mathcal{W}}(\mathbb{E}_{\mu}[c_{1}]+\mathbb{E}_{\nu}[c_{2}]-n). For the other direction, observe that for fixed n , c is bounded and c_{1}(x)+c_{2}(y)\leq c(x,y)+n , we can know c_{1} and c_{2} is bounded. Therefore, write b_{1}=c_{1} and b_{2}=c_{2}-n gives the desired result. ∎ Appendix I Postponed Technical Proofs In this section, we give proofs of the lemmas that are omitted in the previous part of the appendix. Lemma I.1 ( Lemma A.7 ) . We have the following properties for A,A_{1},A_{2}\in\mathsf{Pos}^{\infty}(\mathcal{H}) : • Scalar product cA for c\in\mathbb{R}^{+\infty} is defined such that for all |\psi\rangle , \langle\psi|cA|\psi\rangle=c\langle\psi|A|\psi\rangle . • Addition A_{1}+A_{2} such that for all |\psi\rangle\in\mathcal{H} , \langle\psi|(A_{1}+A_{2})|\psi\rangle=\langle\psi|A_{1}|\psi\rangle+\langle\psi|A_{2}|\psi\rangle . • Tensor product A_{1}\otimes A_{2} such that for all |\psi_{1}\rangle,|\psi_{2}\rangle , (\langle\psi_{1}|\otimes\langle\psi_{2}|)(A_{1}\otimes A_{2})(|\psi_{1}\rangle\otimes|\psi_{2}\rangle)=(\langle\psi_{1}|A_{1}|\psi_{1}\rangle)\cdot(\langle\psi_{2}|A_{2}|\psi_{2}\rangle) . • Let M be a linear operator with \mathcal{H} as its domain, M^{\dagger}AM can be defined such that for all |\psi\rangle , \langle\psi|(M^{\dagger}AM)|\psi\rangle=\langle\phi|A|\phi\rangle where |\phi\rangle=M|\psi\rangle . • For P\in\mathsf{Pos} with decomposition P=\sum_{i}a_{i}|\psi_{i}\rangle\langle\psi_{i}| ( 0\leq a_{i} ), the trace is \tr(AP)=\sum_{i}a_{i}\langle\psi_{i}|A|\psi_{i}\rangle . Note that the value is unique for any decomposition. • For \mathcal{E}\in\mathcal{QO} (more generally, CP maps) with Kraus operators \{E_{i}\} , \mathcal{E}^{\dagger}(A)=\sum_{i}E_{i}^{\dagger}AE_{i} . Note that it is unique for arbitrary Kraus operators. • A_{1}=A_{2} if for all |\psi\rangle , \langle\psi|A_{1}|\psi\rangle=\langle\psi|A_{2}|\psi\rangle . • A_{1}\sqsubseteq A_{2} if for all |\psi\rangle , \langle\psi|A_{1}|\psi\rangle\leq\langle\psi|A_{2}|\psi\rangle . Proof. In the following, let A=\sum_{i}\lambda_{i}X_{i} , where X_{i} is the projection onto the corresponding eigenspace. We will also write A as A=P_{A}+\infty X_{A} , where P_{A}=\sum_{\lambda_{i}<+\infty}\lambda_{i}X_{i} is the “finite” component of A , and X_{A}=\sum_{\lambda_{i}=+\infty}X_{i} is the “infinite” space of A . Similarly, we write A_{1}=\sum_{i}\lambda^{(1)}_{i}X_{i}^{(1)}=P_{A_{1}}+\infty\cdot X_{A_{1}} and A_{2}=\sum_{i}\lambda_{i}^{(2)}X_{i}^{(2)}=P_{A_{2}}+\infty\cdot X_{A_{2}} . • For the scalar product cA , we define it as cA=\sum_{i}c\lambda_{i}X_{i} . By the definition of inner product, it is direct that \langle\psi|cA|\psi\rangle=c\langle\psi|A|\psi\rangle . • For the addition operation, we define it as A_{1}+A_{2}=X^{\bot}(P_{A_{1}}+P_{A_{2}})X^{\bot}+\infty\cdot X , where X=X_{A_{1}}\vee X_{A_{2}} . We now verify that \langle\psi|A_{1}+A_{2}|\psi\rangle=\langle\psi|A_{1}|\psi\rangle+\langle\psi|A_{2}|\psi\rangle . If \langle\psi|A_{1}+A_{2}|\psi\rangle<+\infty , then we know |\psi\rangle\in X^{\bot} , meaning that X^{\bot}|\psi\rangle=|\psi\rangle . Then, by the definition of X , we know \langle\psi|A_{1}|\psi\rangle<+\infty and \langle\psi|A_{2}|\psi\rangle<+\infty . Thus, in this case the condition holds. Now, consider the case when \langle\psi|A_{1}+A_{2}|\psi\rangle=+\infty . Then, we know \langle\psi|X|\psi\rangle>0 . We claim either \langle\psi|X_{1}|\psi\rangle>0 or \langle\psi|X_{2}|\psi\rangle>0 , because otherwise |\psi\rangle\in X_{1}^{\bot}\cap X_{2}^{\bot} , contradicting \langle\psi|X|\psi\rangle>0 . • For the tensor product, we define it as P_{A_{1}}\otimes P_{A_{2}}+\infty\cdot X , where X=\left(\supp\left(P_{A_{1}}\right)\otimes X_{A_{2}}\right)\vee\left(X_{A_{1}}\otimes\supp\left(P_{A_{2}}\right)\right)\vee\left(X_{A_{1}}\otimes X_{A_{2}}\right) . We now verify that it satisfies the property. For any |\psi_{1}\rangle and |\psi_{2}\rangle , first suppose that \langle\psi_{1}|\langle\psi_{2}|A_{1}\otimes A_{2}|\psi_{1}\rangle|\psi_{2}\rangle=0 . We know that X|\psi_{1}\rangle|\psi_{2}\rangle=0 and \langle\psi_{1}|\langle\psi_{2}|P_{A_{1}}\otimes P_{A_{2}}|\psi_{1}\rangle|\psi_{2}\rangle=0 . Therefore, without loss of generality we can assume \langle\psi_{1}|P_{A_{1}}|\psi_{1}\rangle=0 . From X|\psi_{1}\rangle|\psi_{2}\rangle=0 , we know X_{A_{1}}|\psi_{1}\rangle=0 , meaning that \langle\psi_{1}|A_{1}|\psi_{1}\rangle=0 as we want. Now, consider the case 0<\langle\psi_{1}|\langle\psi_{2}|A_{1}\otimes A_{2}|\psi_{1}\rangle|\psi_{2}\rangle<+\infty . By definition, we know X|\psi_{1}\rangle|\psi_{2}\rangle=0 , \langle\psi_{1}|P_{A_{1}}|\psi_{1}\rangle\neq 0 , \langle\psi_{2}|P_{A_{2}}|\psi_{2}\rangle\neq 0 , We first claim \langle\psi_{1}|A_{1}|\psi_{1}\rangle\neq 0 , and \langle\psi_{2}|A_{2}|\psi_{2}\rangle\neq 0 . If not, without loss of generality, we assume \langle\psi_{1}|A_{1}|\psi_{1}\rangle=0 . It gives |\psi_{1}\rangle\in\left(\supp(P_{A_{1}})\vee X_{A_{1}}\right) , meaning that X|\psi_{1}\rangle|\psi_{2}\rangle=0 . We then know \langle\psi_{1}|\langle\psi_{2}|A_{1}\otimes A_{2}|\psi_{1}\rangle|\psi_{2}\rangle=0 , a contradiction. We then claim \langle\psi_{1}|A_{1}|\psi_{1}\rangle<+\infty , and \langle\psi_{2}|A_{2}|\psi_{2}\rangle<+\infty . Suppose for simplicity that \langle\psi_{1}|A_{1}|\psi_{1}\rangle=+\infty , we know X_{A_{1}}|\psi_{1}\rangle\neq 0 . Combined with \langle\psi_{2}|A_{2}|\psi_{2}\rangle\neq 0 . we conclude that projecting |\psi_{1}\rangle|\psi_{2}\rangle onto the space X_{A_{1}}\otimes\supp\left(P_{A_{2}}\right)\vee X_{A_{1}}\otimes X_{A_{2}} is non-zero, meaning \langle\psi_{1}|\langle\psi_{2}|A_{1}\otimes A_{2}|\psi_{1}\rangle|\psi_{2}\rangle=+\infty , a contradiction. Since both \langle\psi_{1}|A_{1}|\psi_{1}\rangle and \langle\psi_{2}|A_{2}|\psi_{2}\rangle are non-zero and finite, a direct computation will give the equation we want. For the case when \langle\psi_{1}|\langle\psi_{2}|A_{1}\otimes A_{2}|\psi_{1}\rangle|\psi_{2}\rangle=+\infty , we know X|\psi_{1}\rangle|\psi_{2}\rangle\neq 0 . Suppose \langle\psi_{1}|A_{1}|\psi_{1}\rangle<+\infty , and \langle\psi_{2}|A_{2}|\psi_{2}\rangle<+\infty . we could conclude X_{A_{1}}|\psi_{1}\rangle=X_{A_{2}}|\psi_{2}\rangle=0 , giving X|\psi_{1}\rangle|\psi_{2}\rangle=0 , a contradiction. Thus, without loss of generality, we can assume \langle\psi_{1}|A_{1}|\psi_{1}\rangle=+\infty . We then claim \langle\psi_{2}|A_{2}|\psi_{2}\rangle\neq 0 . Otherwise we will get X|\psi_{1}\rangle|\psi_{2}\rangle=0 . We then conclude \langle\psi_{1}|A_{1}|\psi_{1}\rangle\langle\psi_{2}|A_{2}|\psi_{2}\rangle=+\infty as we want. • MAM^{\dagger} can be defined as MP_{A}M^{\dagger}+\infty\cdot\supp(MXM^{\dagger}) . For any |\phi\rangle=M|\psi\rangle , if \langle\phi|A|\phi\rangle<+\infty , we know that X|\phi\rangle=0 , meaning that \langle\psi|MXM^{\dagger}|\psi\rangle=0 Thus, \langle\psi|MAM^{\dagger}|\psi\rangle=\langle\psi|MP_{A}M^{\dagger}|\psi\rangle<+\infty , and by definition \langle\psi|MAM^{\dagger}|\psi\rangle=\langle\psi|MP_{A}M^{\dagger}|\psi\rangle=\langle\phi|A|\phi\rangle as we want. If \langle\phi|A|\phi\rangle=+\infty , we know that X|\phi\rangle\neq 0 , or equivalently, XM^{\dagger}|\psi\rangle\neq 0 , meaning \langle\psi|MAM^{\dagger}|\psi\rangle=+\infty as we want. • For P\in\mathsf{Pos} , define \tr(AP)=\tr(P_{A}P) if X_{A}P=0 , and +\infty otherwise. If P=\sum_{i}a_{i}|\psi_{i}\rangle\langle\psi_{i}| with a_{i}\geq 0 . We first notice that it suffices to consider the set of j with a_{j}>0 as 0\cdot+\infty=0 . We then notice that \supp(P)=\text{span}_{i}\left\{|\psi_{i}\rangle\right\} . Thus, if \tr(AP)<+\infty , then X_{A}|\psi_{i}\rangle=0 for any i , with \tr(AP)=\tr(P_{A}P)=\sum_{i}a_{i}\langle\psi_{i}|P_{A}|\psi_{i}\rangle as we want. If \tr(AP)=+\infty , then X_{A}\cap\spanv_{i}\left\{|\psi_{i}\rangle\right\}\neq 0 , meaning that there must be some i with \langle\psi_{i}|A|\psi_{i}\rangle=+\infty . Then, we know \sum_{i}a_{i}\langle\psi_{i}|A|\psi_{i}\rangle=+\infty as we want. • For a CP map \mathcal{E}^{\dagger} and A=P_{A}+\infty X_{A} , define \mathcal{E}^{\dagger}(A)=X^{\bot}\mathcal{E}(P_{A})X^{\bot}+\infty X , where X=\supp(\mathcal{E}(X_{A})) . For \mathcal{E} with Kraus operators E_{i} , we know X can be written as X=\supp(\sum_{i}E_{i}^{\dagger}X_{A}E_{i})=\vee_{i}\supp(E_{i}^{\dagger}X_{A}E_{i}) . By definition, we know in this case \mathcal{E}^{\dagger}(A) can be written as \sum_{i}E_{i}^{\dagger}AE_{i} as we desired. • We first prove that X_{A_{1}}=X_{A_{2}} . If not, let |\psi\rangle be a normalized state in X_{A_{1}}\cap X_{A_{2}}^{\bot} . We know X_{A_{2}}|\psi\rangle=0 but X_{A_{1}}|\psi\rangle=|\psi\rangle . This means \langle\psi|A_{1}|\psi\rangle=+\infty but \langle\psi|A_{2}|\psi\rangle<+\infty , a contradiction. Now, given that X_{A_{1}}=X_{A_{2}} , we know that for any |\psi\rangle\in X_{A_{1}}^{\bot}\supseteq(\supp(P_{A_{1}})\vee\supp(P_{A_{2}})) , \langle\psi|P_{A_{1}}|\psi\rangle=\langle\psi|P_{A_{2}}|\psi\rangle , meaning that P_{A_{1}}=P_{A_{2}} as we desired. • We extend the Löwner order of positive semi-definite operators to infinite-valued positive semi-definite operators as follows: for A,B\in\mathsf{Pos}^{\infty}(\mathcal{H}) , we say A\sqsubseteq B if for any |\psi\rangle , \langle\psi|A|\psi\rangle\leq\langle\psi|B|\psi\rangle . By the definition of trace, it is clear that A\sqsubseteq B if for any \rho , \tr(A\rho)\leq\tr(B\rho) . It is clear that it satisfies reflexivity and transitivity. For antisymmetry, it follows from the previous property. Thus it is a partial order. ∎ Lemma I.2 ( Lemma A.8 ) . In the following, let a,b,c\in\mathbb{R}^{+\infty} , A,A_{1},A_{2}\in\mathsf{Pos}^{\infty} , M,M_{1},M_{2},\cdots\in\mathcal{L} , and P,P_{1},P_{2}\cdots\in\mathsf{Pos} . We have the following properties: • 0A=0 , 1A=A , a(bA)=(ab)A ; • 0+A=A+0=A , A_{1}+A_{2}=A_{2}+A_{1} , A_{1}+(A_{2}+A_{3})=(A_{1}+A_{2})+A_{3} ; • 0\otimes A=A\otimes 0=0 , A_{1}\otimes(A_{2}\otimes A_{3})=(A_{1}\otimes A_{2})\otimes A_{3} ; • A\otimes(cA_{1}+A_{2})=c(A\otimes A_{1})+(A\otimes A_{2}) ; (cA_{1}+A_{2})\otimes A=c(A_{1}\otimes A)+(A_{2}\otimes A) ; • 0^{\dagger}A0=0 , M_{2}^{\dagger}(M_{1}^{\dagger}AM_{1})M_{2}=(M_{1}M_{2})^{\dagger}A(M_{1}M_{2}) ; M^{\dagger}(cA_{1}+A_{2})M=c(M^{\dagger}A_{1}M)+M^{\dagger}A_{2}M ; • (M_{1}\otimes M_{2})^{\dagger}(A_{1}\otimes A_{2})(M_{1}\otimes M_{2})=(M_{1}^{\dagger}A_{1}M_{1})\otimes(M_{2}^{\dagger}A_{2}M_{2}) ; • \tr(A(cP_{1}+P_{2}))=c\tr(AP_{1})+\tr(AP_{2}) ; \tr((cA_{1}+A_{2})P)=c\tr(A_{1}P)+\tr(A_{2}P) ; • \tr((A_{1}\otimes A_{2})(P_{1}\otimes P_{2}))=\tr(A_{1}P_{1})\tr(A_{2}P_{2}) ; \tr((M^{\dagger}AM)P)=\tr(A(MPM^{\dagger})) . • \tr((A\otimes I)P)=\tr(A\tr_{2}(P)) ; \tr((I\otimes A)P)=\tr(A\tr_{1}(P)) ; • \tr(A|\phi\rangle\langle\phi|)=\langle\phi|A|\phi\rangle . • A_{1}=A_{2} iff for all P\in\mathsf{Pos} (or P\in\mathcal{D} ) such that \tr(A_{1}P)=\tr(A_{2}P) ; • A_{1}\sqsubseteq A_{2} iff for all P\in\mathsf{Pos} (or P\in\mathcal{D} ) such that \tr(A_{1}P)\leq\tr(A_{2}P) ; • A_{1}\sqsubseteq A_{2} implies M^{\dagger}A_{1}M\sqsubseteq M^{\dagger}A_{2}M ; A_{1}\sqsubseteq A_{2} and A_{3}\sqsubseteq A_{4} implies cA_{1}+A_{3}\sqsubseteq cA_{2}+A_{4} . As direct corollaries, for CP map \mathcal{E},\mathcal{E}_{1},\mathcal{E}_{2} , • \tr(A\mathcal{E}(P))=\tr(\mathcal{E}^{\dagger}(A)P) ; A_{1}\sqsubseteq A_{2} implies \mathcal{E}(A_{1})\sqsubseteq\mathcal{E}(A_{2}) ; • (c\mathcal{E}_{1}+\mathcal{E}_{2})(A)=c\mathcal{E}_{1}(A)+\mathcal{E}_{2}(A) ; \mathcal{E}(cA_{1}+A_{2})=c\mathcal{E}(A_{1})+\mathcal{E}(A_{2}) ; • \mathcal{E}_{2}(\mathcal{E}_{1}(A))=(\mathcal{E}_{2}\circ\mathcal{E}_{1})(A) ; (\mathcal{E}_{1}\otimes\mathcal{E}_{2})(A_{1}\otimes A_{2})=\mathcal{E}_{1}(A_{1})\otimes\mathcal{E}_{2}(A_{2}) . Proof. We prove the above properties as follows: • For 0A=0 , 1A=A , a(bA)=(ab)A , it follows directly from the definition. • For 0+A=A+0=A , A_{1}+A_{2}=A_{2}+A_{1} , A_{1}+(A_{2}+A_{3})=(A_{1}+A_{2})+A_{3} , it follows from the definition of addition of infinite-valued predicates. For instance, to prove A+0=A , we have, for any |\psi\rangle , \langle\psi|A+0|\psi\rangle=\langle\psi|A|\psi\rangle+\langle\psi|0|\psi\rangle=\langle\psi|A|\psi\rangle . Then the claim follows directly by noting that A_{1}=A_{2} if for any |\psi\rangle , \langle\psi|A_{1}|\psi\rangle=\langle\psi|A_{2}|\psi\rangle . • For 0\otimes A=A\otimes 0=0 , A_{1}\otimes(A_{2}\otimes A_{3})=(A_{1}\otimes A_{2})\otimes A_{3} , it follows from the definition. • For A\otimes(cA_{1}+A_{2})=c(A\otimes A_{1})+(A\otimes A_{2}) ; (cA_{1}+A_{2})\otimes A=c(A_{1}\otimes A)+(A_{2}\otimes A) , it follows from the definition. • To prove 0^{\dagger}A0=0 , we notice that for any |\psi\rangle , \langle\psi|0^{\dagger}A0|\psi\rangle=\langle\phi|A|\phi\rangle=0=\langle\psi|0|\psi\rangle for |\phi\rangle=0|\psi\rangle=0 . Then we know 0^{\dagger}A0=0 as we want. The propositions M_{2}^{\dagger}(M_{1}^{\dagger}AM_{1})M_{2}=(M_{1}M_{2})^{\dagger}A(M_{1}M_{2}) and M^{\dagger}(cA_{1}+A_{2})M=c(M^{\dagger}A_{1}M)+M^{\dagger}A_{2}M can be proved similarly. • To prove (M_{1}\otimes M_{2})^{\dagger}(A_{1}\otimes A_{2})(M_{1}\otimes M_{2})=(M_{1}^{\dagger}A_{1}M_{1})\otimes(M_{2}^{\dagger}A_{2}M_{2}) , it follows from the definition and the fact that X_{M_{1}^{\dagger}A_{1}M_{1}}=\supp(M_{1}^{\dagger}X_{A_{1}}M_{1}) . Actually, (M_{1}\otimes M_{2})^{\dagger}(A_{1}\otimes A_{2})(M_{1}\otimes M_{2})=(M_{1}^{\dagger}P_{A_{1}}M_{1})\otimes(M_{2}^{\dagger}P_{A_{2}}M_{2})+\supp((M_{1}\otimes M_{2})^{\dagger})X(M_{1}\otimes M_{2})) , where X=\left(\supp\left(P_{A_{1}}\right)\otimes X_{A_{2}}\right)\vee\left(X_{A_{1}}\otimes\supp\left(P_{A_{2}}\right)\right)\vee\left(X_{A_{1}}\otimes X_{A_{2}}\right) . (M_{1}^{\dagger}A_{1}M_{1})\otimes(M_{2}^{\dagger}A_{2}M_{2})=(M_{1}^{\dagger}P_{A_{1}}M_{1})\otimes(M_{2}^{\dagger}P_{A_{2}}M_{2})+\infty Y , where Y=\left(\supp\left(M_{1}^{\dagger}P_{A_{1}}M_{1}\right)\otimes\supp(M_{2}^{\dagger}X_{A_{2}}M_{2})\right)\vee\left(\supp(M_{1}^{\dagger}X_{A_{1}}M_{1})\otimes\supp\left(M_{2}^{\dagger}P_{A_{2}}M_{2}\right)\right)\vee\left(\supp(M_{1}^{\dagger}X_{A_{1}}M_{1})\otimes\supp(M_{2}^{\dagger}X_{A_{2}}M_{2})\right) . It can be shown that X=Y by using the properties \mathcal{E}(X_{1}\vee X_{2})=\mathcal{E}(X_{1})\vee\mathcal{E}(X_{2}) and \mathcal{E}(\supp(\rho))=\supp(\mathcal{E}(\rho)) . • For \tr(A(cP_{1}+P_{2}))=c\tr(AP_{1})+\tr(AP_{2}) , if c=0 then it is direct. In the following, we assume c>0 . if X_{A}P_{1}=X_{A}P_{2}=0 , then the equation is direct by definition. Suppose X_{A}P_{1}\neq 0 , which means \tr(AP_{1})=+\infty . In this case, we have X_{A}(cP_{1}+P_{2})\neq 0 , meaning the left hand side is also +\infty . The case X_{A}P_{2}\neq 0 and \tr((cA_{1}+A_{2})P)=c\tr(A_{1}P)+\tr(A_{2}P) can be proved similarly. • For \tr((A_{1}\otimes A_{2})(P_{1}\otimes P_{2}))=\tr(A_{1}P_{1})\tr(A_{2}P_{2}) , if X_{A_{1}}P_{1}=X_{A_{2}}P_{2}=0 , then it is direct by computation. Now, by symmetry consider the case X_{A_{1}}P_{1}\neq 0 , which means \tr(A_{1}P_{1})=+\infty (the case X_{A_{2}}P_{2}\neq 0 can be proved similarly). If \tr(A_{2}P_{2})=0 , then P_{2}\in(\supp(P_{A_{2}})\vee X_{A_{2}})^{\bot} . In this case, X_{A_{1}\otimes A_{2}}P_{1}\otimes P_{2}=0 , and \tr((A_{1}\otimes A_{2})(P_{1}\otimes P_{2}))=\tr((P_{A_{1}}\otimes P_{A_{2}})(P_{1}\otimes P_{2}))=0 . If \tr(A_{2}P_{2})\neq 0 , then X_{A_{1}\otimes A_{2}}P_{1}\otimes P_{2}\neq 0 , and both left and right hand sides takes +\infty as we desired. For \tr((M^{\dagger}AM)P)=\tr(A(MPM^{\dagger})) , we note that \supp(M^{\dagger}X_{A}M)P=0 is equivalent to M^{\dagger}\supp(X_{A})MP=0 , and the latter can be written as \supp(X_{A})MPM^{\dagger}=0 . Then, the property follows directly from definition. • For \tr((A\otimes I)P)=\tr(A\tr_{2}(P)) , we note that A\otimes I=P_{A}\otimes I+X_{A}\otimes I . Thus, X_{A}\tr_{2}(P)=0 if and only if X_{A\otimes I}P=0 . Then, the equation follows directly from the definition. \tr((I\otimes A)P)=\tr(A\tr_{1}(P)) can be proved in a similar way. • For \tr(A|\phi\rangle\langle\phi|)=\langle\phi|A|\phi\rangle , it is direct by definition. • For A_{1}=A_{2} iff for all P\in\mathsf{Pos} (or P\in\mathcal{D} ) such that \tr(A_{1}P)=\tr(A_{2}P) , the “if” part can be proved using the previous property and the proposition that A_{1}=A_{2} if for all |\psi\rangle , \langle\psi|A_{1}|\psi\rangle=\langle\psi|A_{2}|\psi\rangle . The “only if” part is direct by definition. • For A_{1}\sqsubseteq A_{2} iff for all P\in\mathsf{Pos} (or P\in\mathcal{D} ) such that \tr(A_{1}P)\leq\tr(A_{2}P) , the “if” part can be proved by limiting P to be rank- 1 projectors |\psi\rangle\langle\psi| . For the “only if” part, consider the spectral decomposition of P=\sum_{i}a_{i}|\psi_{i}\rangle\langle\psi_{i}| . We have \tr(A_{1}P)=\tr(A_{1}\sum_{i}a_{i}|\psi_{i}\rangle\langle\psi_{i}|)=\sum_{i}a_{i}\langle\psi_{i}|A_{1}|\psi_{i}\rangle , and \tr(A_{2}P)=\tr(A_{2}\sum_{i}a_{i}|\psi_{i}\rangle\langle\psi_{i}|)=\sum_{i}a_{i}\langle\psi_{i}|A_{2}|\psi_{i}\rangle . Since A_{1}\sqsubseteq A_{2} , we have \langle\psi_{i}|A_{1}|\psi_{i}\rangle\leq\langle\psi_{i}|A_{2}|\psi_{i}\rangle for every i . The result then follows directly. • For A_{1}\sqsubseteq A_{2} implies M^{\dagger}A_{1}M\sqsubseteq M^{\dagger}A_{2}M , let |\psi\rangle be any state. Then, a direct computation gives \langle\psi|M^{\dagger}A_{1}M|\psi\rangle=\langle\phi|A_{1}|\phi\rangle\leq\langle\phi|A_{2}|\phi\rangle=\langle\psi|M^{\dagger}A_{2}M|\psi\rangle , where |\phi\rangle=M|\psi\rangle . Thus, M^{\dagger}A_{1}M\sqsubseteq M^{\dagger}A_{2}M follows by definition. For A_{1}\sqsubseteq A_{2} and A_{3}\sqsubseteq A_{4} implies cA_{1}+A_{3}\sqsubseteq cA_{2}+A_{4} , consider any |\psi\rangle , A_{1}\sqsubseteq A_{2} implies \langle\psi|A_{1}|\psi\rangle\leq\langle\psi|A_{2}|\psi\rangle . Similarly we have \langle\psi|A_{3}|\psi\rangle\leq\langle\psi|A_{4}|\psi\rangle . Therefore we know \langle\psi|cA_{1}+A_{3}|\psi\rangle=c\langle\psi|A_{1}|\psi\rangle+\langle\psi|A_{3}|\psi\rangle\leq c\langle\psi|A_{2}|\psi\rangle+\langle\psi|A_{4}|\psi\rangle=\langle\psi|cA_{2}+A_{4}|\psi\rangle , and the result follows by definition. • For \tr(A\mathcal{E}(P))=\tr(\mathcal{E}^{\dagger}(A)P) , we write \mathcal{E}(P)=\sum_{j}E_{j}PE_{j}^{\dagger} . Then, we have \tr(A\mathcal{E}(P))=\tr(A\sum_{j}E_{j}PE_{j}^{\dagger})=\sum_{j}\tr(AE_{j}PE_{j}^{\dagger})=\sum_{j}\tr(E_{j}^{\dagger}AE_{j}P)=\tr(\mathcal{E}^{\dagger}(A)P) . For A_{1}\sqsubseteq A_{2} implies \mathcal{E}(A_{1})\sqsubseteq\mathcal{E}(A_{2}) , write \mathcal{E}(A)=\sum_{j}E_{j}^{\dagger}AE_{j} . We now for any j , E_{j}^{\dagger}A_{1}E_{j}\sqsubseteq E_{j}^{\dagger}A_{2}E_{j} , thus \sum_{j}E_{j}^{\dagger}A_{1}E_{j}\sqsubseteq\sum_{j}E_{j}^{\dagger}A_{2}E_{j} as we want. • For (c\mathcal{E}_{1}+\mathcal{E}_{2})(A)=c\mathcal{E}_{1}(A)+\mathcal{E}_{2}(A) take any P\in\mathsf{Pos} , we have \tr(P(c\mathcal{E}_{1}+\mathcal{E}_{2})(A))=\tr((c\mathcal{E}_{1}+\mathcal{E}_{2})^{\dagger}(P)(A))c\tr(\mathcal{E}_{1}^{\dagger}(P)A)+\tr(\mathcal{E}_{2}^{\dagger}(P)A)=\tr(Pc\mathcal{E}_{1}(A))+\tr(P\mathcal{E}_{2}(A))=\tr(P(c\mathcal{E}_{1}+\mathcal{E}_{2})(A)) . Then the result follows. For \mathcal{E}(cA_{1}+A_{2})=c\mathcal{E}(A_{1})+\mathcal{E}(A_{2}) , write \mathcal{E}(A)=\sum_{j}E_{j}AE_{j}^{\dagger} . We then have \mathcal{E}(cA_{1}+A_{2})=\sum_{j}E_{j}(cA_{1}+A_{2})E_{j}^{\dagger}=c\sum_{j}E_{j}A_{1}E_{j}^{\dagger}+\sum_{j}E_{j}A_{2}E_{j}^{\dagger}=c\mathcal{E}(A_{1})+\mathcal{E}(A_{2}) as we want. • \mathcal{E}_{2}(\mathcal{E}_{1}(A))=(\mathcal{E}_{2}\circ\mathcal{E}_{1})(A) is by definition. For (\mathcal{E}_{1}\otimes\mathcal{E}_{2})(A_{1}\otimes A_{2})=\mathcal{E}_{1}(A_{1})\otimes\mathcal{E}_{2}(A_{2}) , let A_{1}=P_{A_{1}}+\infty X_{A_{1}} , A_{2}=P_{A_{2}}+\infty X_{A_{2}} , and A_{1}\otimes A_{2}=P_{A_{1}}\otimes P_{A_{2}}+\infty X , where X=\left(\supp\left(P_{A_{1}}\right)\otimes X_{A_{2}}\right)\vee\left(X_{A_{1}}\otimes\supp\left(P_{A_{2}}\right)\right)\vee\left(X_{A_{1}}\otimes X_{A_{2}}\right) . Then, (\mathcal{E}_{1}\otimes\mathcal{E}_{2})(A_{1}\otimes A_{2})=(\mathcal{E}_{1}\otimes\mathcal{E}_{2})(P_{A_{1}}\otimes P_{A_{2}})+\infty Y , where Y=\supp((\mathcal{E}_{1}\otimes\mathcal{E}_{2})(X)) and \mathcal{E}_{1}(A_{1})\otimes\mathcal{E}_{2}(A_{2})=(\mathcal{E}_{1}\otimes\mathcal{E}_{2})(P_{A_{1}}\otimes P_{A_{2}})+\infty Z , where Z=\left(\supp\left(\mathcal{E}_{1}(P_{A_{1}})\right)\otimes\mathcal{E}_{2}(X_{A_{2}})\right)\vee\left(\mathcal{E}_{1}(X_{A_{1}})\otimes\supp\left(\mathcal{E}_{2}(P_{A_{2}})\right)\right)\vee\left(\mathcal{E}_{1}(X_{A_{1}})\otimes\mathcal{E}_{2}(X_{A_{2}})\right) . It is clear that Y=Z by using the properties \mathcal{E}(X_{1}\vee X_{2})=\mathcal{E}(X_{1})\vee\mathcal{E}(X_{2}) and \mathcal{E}(\supp(\rho))=\supp(\mathcal{E}(\rho)) . ∎