An Algebraic Method to Fidelity-based Model Checking over Quantum Markov Chains
aa r X i v : . [ c s . L O ] J a n An Algebraic Method to Fidelity-based Model Checking overQuantum Markov Chains
Ming Xu, Jianling Fu, Jingyi Mei, Yuxin Deng
Shanghai Key Lab of Trustworthy Computing, East China Normal University, Shanghai, China
Abstract
Fidelity is one of the most widely used quantities in quantum information that measure the dis-tance of quantum states through a noisy channel. In this paper, we introduce a quantum analogyof computation tree logic (CTL) called QCTL, which concerns fidelity instead of probabilityin probabilistic CTL, over quantum Markov chains (QMCs). Noisy channels are modelled bysuper-operators, which are specified by QCTL formulas; the initial quantum states are modelledby density operators, which are left parametric in the given QMC. The problem is to compute theminimum fidelity over all initial states for conservation. We achieve it by a reduction to quantifierelimination in the existential theory of the reals. The method is absolutely exact, so that QCTLformulas are proven to be decidable in exponential time. Finally, we implement the proposedmethod and demonstrate its e ff ectiveness via a quantum IPv4 protocol. Keywords:
Model Checking, Formal Logic, Quantum Computation, Computer Algebra
1. Introduction
Markov chains (MCs) have attracted a lot of attention in the field of formal verification [7, 4].In 1989, Hansson and Jonsson introduced probabilistic computation tree logic (PCTL) to specifyquantitative properties over MCs, and presented an algorithm to check whether a property φ holds over a MC M [20]. The complexity is polynomial time w.r.t. the size of both φ and M . Later, more e ffi cient approximation algorithms were presented and implemented in variousmodel checkers, such as PRISM [23], iscas MC [18] and S torm [9], to solve numerous practicalproblems. Such model checkers provide a Boolean answer to the decision problem: either M satisfies φ or not. In case of a negative answer, a counter-example can further be provided [19]to locate the potential bug. Thereby, the model checking technology has achieved great successin both academic and industrial communities.Quantum hardware has been rapidly developed in the last decades, particularly in very recentyears. For example, in October 2019 Google o ffi cially announced that its 53-qubit Sycamore pro-cessor took about 200 seconds to sample one instance of a quantum circuit that would have takenthe world’s most powerful supercomputer 10,000 years [3]. People tend to believe that special-purpose quantum computers with more than 100 qubits will be available in nearly 5 years. In Email addresses: [email protected] (Ming Xu), (Jianling Fu), (Jingyi Mei), [email protected] (Yuxin Deng)
Preprint submitted to Elsevier January 14, 2021 he meantime, quantum software will be crucial in harnessing the power of quantum computers,such as the BB84 protocol for quantum key distribution [6], Shor’s algorithm for integer factor-ization [26], Grover’s algorithm for unstructured search [16], and the HHL algorithm for solvinglinear equations [21]. To ensure the reliability of quantum software, verification technologiesare urgent to be developed for quantum systems and protocols. Due to the features in quantummechanics, three major challenges in verification are:1. the state space is a continuum,2. quantum information cannot be cloned [28], and3. measurement destroys quantum information.To tackle them e ff ectively, researchers had to impose restrictions on the quantum model.Gay et al. [14, 15] restricted the quantum operations to the Cli ff ord group gates (includingHadamard, CNOT and phase gates), restricted the state space to a set of finitely describable statescalled stabilizers that is closed under those Cli ff ord group gates, and applied PRISM to check thequantum protocols—superdense coding, quantum teleportation, and quantum error correction.Whereas, Feng et al. proposed the model of super-operator weighted Markov chain [12], whichgave rise to an alternative way to finitely describable states. The model was shown to be ableto describe some hybrid systems [24]. Under the model, the authors considered the reachabil-ity probability [31], the repeated reachability probability [11], and the model checking of lineartime properties [24] and a quantum analogy of computation tree logic (QCTL) [12]. A key stepin their work is decomposing the state space (known as a Hilbert space) into a direct-sum ofsome bottom strongly connected component (BSCC) subspaces plus a maximal transient sub-space w.r.t. a given super-operator. After decomposition, all the aforementioned problems wereshown to be computable / decidable in polynomial time.The above works studied only the probability measure of some properties, which is charac-terized by the trace of the final partial density operator. Specifically, suppose a quantum systemis in the state ρ and some quantum channel E occurs, changing the quantum system to the state E ( ρ ). The probability measure concerns merely tr( ρ ) and tr( E ( ρ )), which are abstractions on thewhole ρ and E ( ρ ). For instance, the quantum states ρ = | ih | and E ( ρ ) = | ih | (where E is thebit flip) have the same probability / trace 1, but they are entirely di ff erent. In other words, we failto detect the e ff ect of the bit flip channel. The reason is that, in the abstraction from ρ to tr( ρ ),a lot of information concerning the quantum state is lost. In the occasions of reasoning aboutnoisy channels, this is far from being satisfactory. The current work proposes to use fidelity inplace of probability measure to specify the properties of quantum Markov chains. Fidelity is abasic concept in quantum information that prescribes the quantification of the similarity degreeof two quantum states. As a measure for the distance between the quantum states ρ and E ( ρ ), thefidelity, ranging in [0 , E could preservethe information of the quantum system. Qualitatively, the fidelity is nonnegative, vanishes ifand only if ρ and E ( ρ ) have support on mutually orthogonal subspaces, and attains its maximumvalue 1 if and only if the two states are identical. It decreases as two states become more dis-tinguishable, where the distinguishability reflects the e ff ect of a quantum channel. For instance,the fidelity between | ih | and | ih | reaches the minimum 0 as expected. Hence the probabilitymeasure does not su ffi ce to recognize general quantum states, but the fidelity does!In this paper, we consider the fidelity-based property over (super-operator weighted) quantumMarkov chains (QMCs). This property is specified by another quantum analogy of computationtree logic (QCTL), including a novel kind of fidelity-quantifier formula instead of the trace-quantifier formula in [12]. Since the state formulas and the path formulas in QCTL are mutually2nductive, we perform the model checking in three steps: i) decide the basic state formulas,ii) synthesize the super-operators of path formulas, and iii) decide the fidelity-quantifier formulas.The last step plays a central role in the model checking, and depends on the second step. Tosolve it, we first remove the BSCC subspaces that cover all fixed-points of a super-operator inconsideration. By Brouwer’s fixed-point theorem, the direct-sum of all these BSCC subspacesare easily obtained. Then we explicitly express the super-operators using matrix representation.Finally the fidelity-quantifier formula is decided by a reduction to quantifier elimination in theexistential theory of the reals. The complexity is shown to i) be exponential time for the QMCwith a parametric initial quantum state; and ii), as an immediate corollary, be polynomial timefor the QMC with a concrete initial quantum state. As a running example, the quantum IPv4protocol is checked to demonstrate the e ff ectiveness of the proposed method.Finally, we summarize the contributions of the paper as follows:1. a useful fidelity-based QCTL is presented;2. all BSCC subspaces are removed by their direct-sum, not individual ones, which makesour process more e ffi cient than the existing work [11];3. the complexity is compatible / competitive when the QMC is provided with an initial quan-tum state, e.g. in [30]. Organization of the paper.
Section 2 gives the basic notions and notations from quantum com-putation. Sections 3 and 4 introduce the model of QMC and the logic of QCTL, respectively.Section 5 presents the model checking algorithm, incorporating with an algebraic approach tothe fidelity computation. Section 6 is the conclusion.
2. Preliminaries
Here we recall some basic notions and notations in quantum computation. Interested readerscan refer to [25, 12] for more details.In this paper, we adopt the Dirac notations: • | ψ i stands for a unit column vector labelled with ψ ; • h ψ | : = | ψ i † is the Hermitian adjoint (i.e. complex conjugate and transpose) of | ψ i ; • h ψ | ψ i : = h ψ | | ψ i is the inner product of | ψ i and | ψ i ; and • | ψ ih ψ | : = | ψ i ⊗ h ψ | is the outer product, where ⊗ denotes tensor product.Specifically, | i i with i ∈ Z + denotes the vector, in which the i th entry is 1 and others are 0. Thus, h i | j i = j , i by orthonormality.Let [ n ] ( n ∈ Z + ) denote the finite set { , , . . . , n } . Let H be a Hilbert space with dimension d : = dim( H ) throughout this paper. Unit elements | ψ i of H are usually interpreted as states of aquantum system. Since {| i i : i ∈ [ d ] } forms an orthonormal basis of H , any element | ψ i of H canbe expressed as | ψ i = P i ∈ [ d ] c i | i i , where c i ∈ C ( i ∈ [ d ]) satisfy P i ∈ [ d ] | c i | =
1, i.e. the quantumstate | ψ i is entirely determined by those coe ffi cients c i . In a product Hilbert space H ⊗ H ′ , let | ψ, ψ ′ i be a shorthand of the product state | ψ i | ψ ′ i : = | ψ i ⊗ | ψ ′ i with | ψ i ∈ H and | ψ ′ i ∈ H ′ . Forany | ψ i , | ψ i in H and (cid:12)(cid:12)(cid:12) ψ ′ E , (cid:12)(cid:12)(cid:12) ψ ′ E in H ′ , the inner product of two product states (cid:12)(cid:12)(cid:12) ψ , ψ ′ E and (cid:12)(cid:12)(cid:12) ψ , ψ ′ E is defined by D ψ , ψ ′ (cid:12)(cid:12)(cid:12) ψ , ψ ′ E = h ψ | ψ i D ψ ′ (cid:12)(cid:12)(cid:12) ψ ′ E .3et L H be the set of linear operators on H , ranged over by letters in bold font, e.g. E , F , I , P .For conciseness, we will omit such a subscript H afterwards if it is clear from the context. Alinear operator γ is Hermitian if γ = γ † ; and it is positive if h ψ | γ | ψ i ≥ | ψ i ∈ H .Given a Hermitian operator γ , we have the spectral decomposition [25, Box 2.2] that γ = X i ∈ [ d ] λ i | ψ i ih ψ i | , (1)where λ i ∈ R ( i ∈ [ d ]) are all eigenvalues of γ and | ψ i i are the corresponding eigenvectors.The support of γ is the subspace of H spanned by all eigenvectors associated with nonzeroeigenvalues, i.e. supp( γ ) : = span( {| ψ i i : i ∈ [ d ] ∧ λ i , } ) = { P i ∈ [ d ] c i | ψ i i : c i ∈ C ∧ λ i , } .A projector P is a positive operator of the form P i ∈ [ m ] | ψ i ih ψ i | with m ≤ d , where | ψ i i ( i ∈ [ m ])are orthonormal. Obviously, there is a bijective map between projectors P = P i ∈ [ m ] | ψ i ih ψ i | andsubspaces of H that are spanned by {| ψ i i : i ∈ [ m ] } . In sum, positive operators are Hermitianones whose eigenvalues are nonnegative; and projectors are positive operators whose eigenvaluesare 0 or 1.The trace of a linear operator γ is defined as tr( γ ) : = P i ∈ [ d ] h ψ i | γ | ψ i i for any orthonormalbasis {| ψ i i : i ∈ [ d ] } of H . A density operator (resp. partial density operator ) ρ on H is a positiveoperator with trace 1 (resp. ≤ ρ is | ψ ih ψ | for some | ψ i ∈ H , ρ is said to be a pure state; otherwise it is a mixed one, i.e. ρ = P i ∈ [ d ] p i | ψ i ih ψ i | under the spectral decomposition, where p i ( i ∈ [ d ]) are postiveeigenvalues (interpreted as the probabilities of taking the pure states | ψ i i ) and together are 1.Sometimes, the quantum states are described by the probabilistic ensemble form { ( p i , | ψ i i ) : i ∈ [ d ] } with | ψ i i ∈ H and p i ∈ R + satisfying P i ∈ [ d ] p i =
1. Note that the probabilistic ensembleform does not require that | ψ i i ( i ∈ [ d ]) are orthogonal, so it is more general. Let D be the set ofpartial density operators on H , and D the set of density operators. In a product Hilbert space H ⊗ H ′ , γ ⊗ γ ′ with γ ∈ L H and γ ′ ∈ L H ′ has the partial traces tr H ′ ( γ ⊗ γ ′ ) : = tr( γ ′ ) γ andtr H ( γ ⊗ γ ′ ) : = tr( γ ) γ ′ , which result in linear operators in H and H ′ , respectively. The (partial)trace is defined to be linear in its input.A super-operator E on H is a linear operator on L H , ranged over by letters in calligraphicfont, e.g. E , F , I , P . A super-operator is completely positive if for any Hilbert space H ′ , thetrivially extended operator E ⊗ I H ′ maps the set of positive operators on L H⊗H ′ to itself, where I H ′ is the identity super-operator on H ′ . Let S be the set of completely positive super-operatorson H . By Kraus representation [25, Thm. 8.3], a super-operator E is completely positive on H ifand only if there are m linear operators E , E , . . . , E m ∈ L with m ≤ d (called Kraus operators),such that for any γ ∈ L , we have E ( γ ) = X ℓ ∈ [ m ] E ℓ γ E † ℓ . (2)The description of E is given by those Kraus operators { E ℓ : ℓ ∈ [ m ] } . Thus, the sum E + E of super-operators E = { E ,ℓ : ℓ ∈ [ m ] } and E = { E ,ℓ : ℓ ∈ [ m ] } is given by the union { E ,ℓ : ℓ ∈ [ m ] } ∪ { E ,ℓ : ℓ ∈ [ m ] } ; and the composition E ◦ E is given by { E ,ℓ E ,ℓ : ℓ ∈ [ m ] ∧ ℓ ∈ [ m ] } . In a product Hilbert space H ⊗ H ′ , for super-operators E = { E ℓ : ℓ ∈ [ m ] } ∈ S H and E ′ = { E ′ ℓ : ℓ ∈ [ m ′ ] } ∈ S H ′ , the product super-operator E ⊗ E ′ is given by { E ℓ : ℓ ∈ [ m ] } ⊗ { E ′ ℓ : ℓ ∈ [ m ′ ] } = { E ℓ ⊗ E ′ ℓ ′ : ℓ ∈ [ m ] ∧ ℓ ′ ∈ [ m ′ ] } . It is easy to validate that E ⊗ E ′ ( γ ⊗ γ ′ ) = E ( γ ) ⊗ E ′ ( γ ′ ) holds for any γ ∈ L H and γ ′ ∈ L H ′ .For a super-operator E ∈ S and a density operator ρ ∈ D , the fidelity is defined asFid( E , ρ ) : = tr q ρ / E ( ρ ) ρ / ; (3a)4nd when ρ is a pure state | ψ ih ψ | , it is simplyFid( E , | ψ ih ψ | ) : = p h ψ | E ( | ψ ih ψ | ) | ψ i . (3b)The fidelity reflects how well the quantum operation E has preserved the quantum state ρ . Thebetter quantum state is preserved, the larger fidelity would be. We can see 0 ≤ Fid( E , ρ ) ≤ ρ and E ( ρ ) are orthog-onal, and the equality in the second inequality holds if and only if E = I . More technically, thefidelity measures the average angle between the vectors in supp( ρ ) and those in supp( E ( ρ )), whichreveals that arccos Fid( E , ρ ) would be a standard metric between ρ and E ( ρ ). For conservation,we would like to study the (minimum) fidelity of E , which is defined asFid( E ) : = min ρ ∈D Fid( E , ρ ) = min | ψ i∈H Fid( E , | ψ ih ψ | ) , (3c)where the last equation comes from the joint concavity [25, Ex. 9.19].A trace pre-order . can be defined on S as: E . E if and only if tr( E ( ρ )) ≤ tr( E ( ρ ))holds for any ρ ∈ D . The equivalence E h E means E . E and E & E . For a super-operator E = { E ℓ : ℓ ∈ [ m ] } , the completeness E h I holds if and only if P ℓ ∈ [ m ] E † ℓ E ℓ = I where I is the identity operator. Let S . I be the set of trace-nonincreasing super-operators E ,i.e. S . I = {E ∈ S : E . I} . We would characterize quantum state evolution by these super-operators E ∈ S . I in the coming section.
3. Quantum Markov Chain
Let AP be a set of atomic propositions throughout this paper. Definition 3.1 ([12, Def. 3.1]).
A labelled quantum Markov chain (QMC for short) C over H isa triple ( S , Q , L ) , in which • S is a finite set of states, • Q : S × S → S . I is a transition super-operator matrix, satisfying P t ∈ S Q ( s , t ) h I foreach s ∈ S , and • L : S → AP is a labelling function. Let | s i ( s ∈ S ) be the quantisation of classical state s , and {| s i : s ∈ S } a set of orthonormalstates serving as the quantisation of classical system S . Once all classical states in S are ordered, | s i denotes the | S | -dimensional vector, in which the entry corresponding to s is 1 and others are 0.Further, H cq : = C ⊗ H where C = span( {| s i : s ∈ S } ) is the enlarged Hilbert space correspondingto the whole classical–quantum system. The dimension of H cq is N : = nd where n = | S | . In theQMC C , a state ρ is given by a density operator on H cq with the mixed structure P s ∈ S | s ih s | ⊗ ρ s where ρ s ∈ D ( s ∈ S ) satisfy P s ∈ S tr( ρ s ) =
1. The initial state is left parametric in the model.The transition super-operator matrix Q is functionally analogous to the transition probabilitymatrix in an ordinary Markov chain (MC). Actually, the former is more expressive than the latter,and a QMC degenerates into an MC when H is one-dimensional. Sometimes, it is convenientto combine the super-operators in Q together to form a large single super-operator, denoted F : = P s , t ∈ S {| t ih s |} ⊗ Q ( s , t ), on H cq . 5 path ω in the QMC C is an infinite state sequence in the form s s s · · · , where s i ∈ S and Q ( s i , s i + ) , i ≥
0. Let ω ( i ) be the ( i + ω for i ≥
0, e.g. ω (0) = s and ω (1) = s for ω = s s s · · · . We denote by Path ( s ) the set of all paths starting in s , and by Path fin ( s ) theset of all finite paths starting in s , i.e. Path fin ( s ) : = { ˆ ω : ˆ ω is a finite prefix of some ω ∈ Path ( s ) } . Example 3.2 (IPv4 protocol).
The IPv4 protocol [1] aims at configuring IP addresses in a LANof hosts. A quantum analogy goes as follows. When a new host joins in a LAN, it gets an IPaddress at random, encapsulated with its MAC address in the data message. Data messages aresent in quantum information, i.e. using density operators. The protocol determines whether thenewly selected IP address is already in use by boardcasting a probe loading the message. If ahost responds to the probe, which means that the IP address is occupied, the protocol updates themessage with a new IP address. If no host responds within a unit of time, which may be causedby the noisy channel, the protocol repeats the probe by re-broadcasting the message. The currentmessage is possibly corrupted by the noisy channel, but it is the only message we have, due tothe no-cloning feature of quantum information [28]. If we do not get any response within a giventime bound, the host would use the IP address chosen by the protocol. An error may be causedby missing probes. Finally, a server on the LAN records the new host’s IP and MAC addresses inthe message after transferring through the noisy channel. Hence the fidelity between the initialMAC address and the final one is worth evaluating for the reliability of the channel.The QMC C = ( S , Q , L ) in Figure 1 describes the quantum IPv4 protocol. The state set Sis { s , s , s , s , s , s } , where L ( s ) = { ok } , L ( s ) = { error } , and other states are labelled with ∅ . The state s indicates that a new host joins in a LAN. The states s i (i = , , , ) indicatealthough the address is occupied, no host responds the probe within i units of time. If the totaltime i = does not run out, re-boardcasting a probe would take place, which leads to returningto the state s ; otherwise the state s indicates a wrong IP address configuration. The state s indicates a proper IP address configuration. The transition super-operator matrix Q is given bythe following nonzero entries in Kraus representation :Q ( s , s ) = {| , + ih , | , | , −ih , |} , Q ( s , s ) = { | , ih , | , | ih | ⊗ I } , Q ( s , s ) = {| , ih , + | , | , ih , −|} , Q ( s , s ) = { | , ih , −| , | ih | ⊗ I } , Q ( s , s ) = { X ⊗ I , X ⊗ X } , Q ( s , s ) = { I ⊗ I , I ⊗ X } , Q ( s , s ) = { I ⊗ Z , Z ⊗ I } , Q ( s , s ) = { I ⊗ I , Z ⊗ Z } , Q ( s , s ) = { I ⊗ I } , Q ( s , s ) = { I ⊗ I } , where |±i = ( | i ± | i ) / √ , I = | ih | + | ih | is the identity operator, X = | ih | + | ih | is the bitflip and Z = | ih | − | ih | is the phase flip. It is easy to validate that P t ∈ S Q ( s , t ) h I holds foreach s ∈ S .We can combine all these super-operators on H as a single super-operator on H cq : F = {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ Q ( s , s ) + {| s ih s |} ⊗ I + {| s ih s |} ⊗ I , These super-operator entries are modelling noisy channels. In practice, each of them has a large proportion of beingthe indentity operator I with a small proportion of being noise operators, e.g. the bit flip X and the phase flip Z , whichwould change density operators. However, to present our method concisely, we focus more on the situation where severenoises appear. Thus we set super-operator entries simply by those noise operators. n which the left operand of the tensor product in a term is a super-operator on C and the rightoperand is a super-operator on H .s s s s s error s ok Q ( s , s ) Q ( s , s ) Q ( s , s ) Q ( s , s ) Q ( s , s ) Q ( s , s ) Q ( s , s ) Q ( s , s ) II Figure 1: QMC for IPv4 protocol
In the QMC C , ω = s s s s s s · · · is a path starting in s , where ω (0) = s , ω (1) = ω (3) = s , ω (2) = s , and ω ( i ) = s for i ≥ ; while ˆ ω = s s s s s is a finite prefix of ω .Therefore, we have ω ∈ Path ( s ) and ˆ ω ∈ Path fin ( s ) . To reason about quantitative properties of QMC, a super-operator valued measure (SOVM)space over paths could be established as follows. Recall that:
Definition 3.3. A measurable space is a pair ( Ω , Σ ) , where Ω is a nonempty set and Σ is a σ -algebra on Ω ; in addition an SOVM space is a triple ( Ω , Σ , ∆ ) , where ( Ω , Σ ) is a measurablespace and ∆ : Σ → S . I is an SOVM, satisfying: • ∆ ( Ω ) h I , and • ∆ ( U i A i ) h P i ∆ ( A i ) for any pairwise disjoint A i ∈ Σ . For a given finite path ˆ ω ∈ Path fin ( s ), we define the cylinder set as Cyl ( ˆ ω ) : = { ω ∈ Path ( s ) : ω has the prefix ˆ ω } ; (4)and for B ⊆ Path fin ( s ), we extend (4) by Cyl ( B ) : = S ˆ ω ∈ B Cyl ( ˆ ω ). Particularly, we have Cyl ( s ) = Path ( s ). Let Ω =
Path ( s ) for an appointed s ∈ S , and Π ⊆ Ω be the countable set of all cylindersets { Cyl ( ˆ ω ) : ˆ ω ∈ Path fin ( s ) } plus the emptyset ∅ . By [4, Chapt. 10], there is a smallest σ -algebra Σ of Π that contains Π and is closed under countable union and complement. It is clear that thepair ( Ω , Σ ) forms a measurable space.Next, for a given finite path ˆ ω = s s · · · s n , we define the accumulated super-operator alongwith ˆ ω as ∆ ( Cyl ( ˆ ω )) : = ( I if n = , Q ( s n − , s n ) ◦ · · · ◦ Q ( s , s ) otherwise . (5)By [12, Thm. 3.2], the domain of ∆ can be extended to Σ , i.e. ∆ : Σ → S . I , which is uniqueunder the countable union S i A i for any A i ∈ Π and is an equivalence class of super-operators interms of h under the complement A c for some A ∈ Π . Hence the triple ( Ω , Σ , ∆ ) forms an SOVMspace. 7 . Quantum Computation Tree Logic We now introduce a quantum extension of computation tree logic (QCTL). The basic ideais to replace the probability measure in the logic of [12] with fidelity. As we mentioned in theintroduction, fidelity is useful in comparing quantum states. In practice, the preparation of anyquantum state is limited by imperfections and noises, and one often needs to find out how closethe produced state is to the intended one. In many occasions, fidelity can detect the e ff ect of anoisy channel but probability measure cannot.In the following, we present the syntax and semantics of the new logic, then compare it withprobabilistic CTL (PCTL) [20] and with the QCTL presented in [12]. Definition 4.1.
The syntax of QCTL consists of the state formulas Φ and path formulas φ : Φ : = a | ¬ Φ | Φ ∧ Φ | F ∼ τ [ φ ] φ : = X Φ | Φ U ≤ k Φ | Φ U Φ where a ∈ AP is an atomic proposition, ∼ ∈ { <, ≤ , = , ≥ , >, , } is a comparison operator, τ ∈ Q ∩ [0 , is a threshold, and k ≥ is a step bound. The state formula F ∼ τ [ φ ] in QCTL is called the fidelity-quantifier formula, and other state for-mulas are basic ones. The three kinds of path formulas X Φ , Φ U ≤ k Φ and Φ U Φ are the next ,the bounded-until and the unbounded-until formulas, respectively. Definition 4.2.
The semantics of QCTL interpreted over a QMC C = ( S , Q , L ) is given by thesatisfaction relation | = :s | = a if a ∈ L ( s ) , s | = ¬ Φ if s = Φ , s | = Φ ∧ Φ if s | = Φ ∧ s | = Φ , s | = F ∼ τ [ φ ] if Fid( ∆ ( { ω ∈ Path ( s ) : ω | = φ } )) ∼ τ,ω | = X Φ if ω (1) | = Φ ,ω | = Φ U ≤ k Φ if ∃ i ≤ k : ( ω ( i ) | = Φ ∧ ∀ j < i : ω ( j ) | = Φ ) ,ω | = Φ U Φ if ∃ i : ( ω ( i ) | = Φ ∧ ∀ j < i : ω ( j ) | = Φ ) . Other logic connectives ∨ , → and ↔ can be easily derived by ¬ and ∧ as usual. For any path formula φ , the path set A = { ω ∈ Path ( s ) : ω | = φ } is measurable, since • if φ = X Φ , A is the finite union of those cylinder sets Cyl ( s t ) that satisfy t | = Φ ; • if φ = Φ U ≤ k Φ , A is the finite union of Cyl ( s · · · s i ) for some i ≤ k , that satisfy s = s , s i | = Φ , and s j | = Φ for each j < i ; and • if φ = Φ U Φ , A is the countable union of Cyl ( s · · · s i ) for some i ≥
0, that satisfy s = s , s i | = Φ , and s j | = Φ for each j < i .Thereby, the set A belongs to the σ -algebra Σ and in particular is a countable union of cylindersets, which entails that the SOVM ∆ ( A ) is uniquely defined. For conciseness, we will write ∆ ( ˆ ω )for ∆ ( Cyl ( ˆ ω )) and ∆ ( φ ) for ∆ ( { ω ∈ Path ( s ) : ω | = φ } ) afterwards.8 xample 4.3. From the QMC C together with the path ω = s s s s s s · · · shown in Ex-ample 3.2, we can see • s | = ok and s = ok for each s ∈ S \ { s } ; • ω | = true U ok , as ω (4) | = ok and ω ( j ) | = true for each j < .For each s ∈ S , we can establish an SOVM space ( Ω , Σ , ∆ ) over the path set Path ( s ) of C . Todemonstrate the generality of the method developed in this paper, we choose Ω =
Path ( s ) . TheSOVM ∆ ( ˆ ω ) is calculated as ∆ ( ˆ ω ) = ∆ ( Cyl ( ˆ ω )) = Q ( s , s ) ◦ Q ( s , s ) ◦ Q ( s , s ) ◦ Q ( s , s ) = Q ( s , s ) ◦ Q ( s , s ) ◦ Q ( s , s ) ◦ { I ⊗ Z , Z ⊗ I } = Q ( s , s ) ◦ Q ( s , s ) ◦ { √ | , + ih , | , √ | , −ih , |} = Q ( s , s ) ◦ { √ | , ih , | , √ | , ih , |} = { √ | , ih , |} . In details, we calculate the composition of super-operators using right associativity law, e.g.Q ( s , s ) ◦ Q ( s , s ) = {| , + ih , | , | , −ih , |} ◦ { I ⊗ Z , Z ⊗ I } = { | , + ih , | ( I ⊗ Z ) , | , + ih , | ( Z ⊗ I ) , | , −ih , | ( I ⊗ Z ) , | , −ih , | ( Z ⊗ I ) } = { | , + i ( h | ⊗ h | )( I ⊗ Z ) , | , + i ( h | ⊗ h | )( Z ⊗ I ) , | , −i ( h | ⊗ h | )( I ⊗ Z ) , | , −i ( h | ⊗ h | )( Z ⊗ I ) } = { | , + i [( h | I ) ⊗ ( h | Z )] , | , + i [( h | Z ) ⊗ ( h | I )] , | , −i [( h | I ) ⊗ ( h | Z )] , | , −i [( h | Z ) ⊗ ( h | I )] } = { | , + i ( h | ⊗ h | ) , | , + i ( h | ⊗ h | ) , | , −i ( − h | ⊗ h | ) , | , −i ( h | ⊗ h | ) } = { | , + ih , | , | , + ih , | , − | , −ih , | , | , −ih , |} = { √ | , + ih , | , √ | , −ih , |} , where the last equation follows from the fact that they are two Kraus representations of a super-operator. Since ω ∈ Ω and ω | = true U ok , we have the lower bound ∆ ( true U ok ) & { √ | , ih , |} . Finally, we point out the di ff erence between the PCTL in [20], the QCTL in [12] and ourQCTL. The PCTL extends CTL by introducing a probability-quantifier P ≤ τ ( φ ) that compares theprobability of the measurable event specified by φ with the threshold τ ; and decides it over a MCwith a specific initial state (probability distribution). The QCTL in [12] introduces an SOVM-quantifier Q . E ( φ ) that compares the SOVM on φ with the super-operator threshold E under thetrace pre-order . ; and decides it over a QMC with a specific initial state (density operator).Whereas, ours introduces a fidelity-quantifier F ≤ τ ( φ ) that compares the fidelity of the SOVM on φ with the threshold τ ; and aims to decide it over a QMC with a parametric initial state. Theparametric model is more expressive, and thus our method would be potentially more appliable.How to consider the SOVM-quantifier on a parametric QMC would be one of our future work.9 . Model Checking Algorithm In this section, we present the model checking algorithm for a given QMC C = ( S , Q , L ) anda QCTL state formula Φ . The algorithm would decide s | = Φ for an appointed state s ∈ S , orequivalently compute the set of all states satisfying Φ , i.e. S at ( Φ ) : = { s ∈ S : s | = Φ } . Since thedefinition of QCTL is mutually inductive, this goal will be reached in three steps:1. deciding basic state formulas (except for the fidelity-quantifier one),2. synthesizing the super-operators of path formulas, and3. deciding the fidelity-quantifier formula. For basic state formulas, the satisfying sets are calculated by their definitions: • S at (a) = { s ∈ S : a ∈ L ( s ) } ; • S at ( ¬ Φ ) = S \ S at ( Φ ), provided that S at ( Φ ) is known; and • S at ( Φ ∧ Φ ) = S at ( Φ ) ∩ S at ( Φ ), provided that S at ( Φ ) and S at ( Φ ) are known.Obviously, the top-level logic connective of those formulas requires merely a scan over the la-belling function L on S , which is in O ( n ). Hence, deciding basic state formulas is linear timew.r.t. the size of C . Example 5.1.
From the QMC C shown in Example 3.2, it is easy to calculate • S at ( ok ) = { s } , S at ( error ) = { s } ; • S at ( ¬ ok ) = S \ S at ( ok ) = { s , s , s , s , s } ; • S at ( ¬ error ) = S \ S at ( error ) = { s , s , s , s , s } ; and • S at ( ¬ ( ok ∨ error )) = S at ( ¬ ok ∧ ¬ error ) = S at ( ¬ ok ) ∩ S at ( ¬ error ) = { s , s , s , s } .5.2. Synthesizing the super-operators of path formulas Let P s denote the projection super-operator {| s ih s |} ⊗ I = {| s ih s | ⊗ I } on the enlarged Hilbertspace H cq , and P Φ : = { P s | =Φ | s ih s |} ⊗ I = { P s | =Φ | s ih s | ⊗ I } . Utilizing the mixed structure of theclassical–quantum state ρ = P s ∈ S | s ih s | ⊗ ρ s , we have the nice property ρ = X s | =Φ | s ih s | ⊗ ρ s + X s | = ¬ Φ | s ih s | ⊗ ρ s = P Φ ( ρ ) + P ¬ Φ ( ρ ) (6)So, fixing an initial classical state s , we can obtain the SOVMs of path formulas as follows. • Supposing that
S at ( Φ ) is known, we have ∆ (X Φ ) = ∆ ] t | =Φ Cyl ( s t ) = X t | =Φ ∆ ( s t ) = X t | =Φ Q ( s , t ) , (7a)where ⊎ denotes disjoint union. 10 Supposing that
S at ( Φ ) and S at ( Φ ) are known, we have ∆ ( Φ U ≤ k Φ ) = ∆ k ] i = ω ∈ Path ( s ) : ω ( i ) | = Φ ∧ i − ^ j = ω ( j ) | = Φ ∧ ¬ Φ = k X i = ∆ ω ∈ Path ( s ) : ω ( i ) | = Φ ∧ i − ^ j = ω ( j ) | = Φ ∧ ¬ Φ = k X i = tr C ( P Φ ◦ ( F ◦ P Φ ∧¬ Φ ) i ◦ P s ) , (7b)where tr C = {h s | ⊗ I : s ∈ S } is the partial trace that traces out the classical system C and F = P s , t ∈ S {| t ih s |} ⊗ Q ( s , t ) is defined in Section 3. • Supposing that
S at ( Φ ) and S at ( Φ ) are known, we have ∆ ( Φ U Φ ) = ∆ ∞ ] i = ω ∈ Path ( s ) : ω ( i ) | = Φ ∧ i − ^ j = ω ( j ) | = Φ ∧ ¬ Φ = ∞ X i = ∆ ω ∈ Path ( s ) : ω ( i ) | = Φ ∧ i − ^ j = ω ( j ) | = Φ ∧ ¬ Φ = ∞ X i = tr C ( P Φ ◦ ( F ◦ P Φ ∧¬ Φ ) i ◦ P s ) . (7c)For the latter two cases, we classify all satisfying paths ω upon the first timestamp i that satisfies ω ( i ) | = Φ and ω ( j ) | = Φ for each j < i (or equivalently the unique timestamp i that satisfies ω ( i ) | = Φ and ω ( j ) | = Φ ∧ ¬ Φ for each j < i ). Thereby, the resulting sets A i = { ω ∈ Path ( s ) : ω ( i ) | = Φ ∧ V i − j = ω ( j ) | = Φ ∧ ¬ Φ } are pairwise disjont, and their SOVMs are obtained astr C ( P Φ ◦ ( F ◦ P Φ ∧¬ Φ ) i ◦ P s ).We notice that all super-operators, say F ◦ P Φ ∧¬ Φ , in the SOVMs (7) has the property F ◦ P Φ ∧¬ Φ = F ◦ P Φ ∧¬ Φ ◦ P s ∈ S P s , which implies all density operators ρ ∈ D H cq occurringin our analysis keep the mixed structure P s ∈ S | s ih s | ⊗ ρ s with ρ s ∈ D . Example 5.2.
Under the SOVM space ( Ω , Σ , ∆ ) established in Example 4.3, we consider thepath formula φ = true U ok . The satisfying path sets are disjoint A i = { ω ∈ Ω : ω ( i ) | = ok ∧ V i − j = ω ( j ) | = ¬ ok } (i ≥ ); and their SOVMs are: ∆ ( A ) = tr C ( P ok ◦ P s ) = , ∆ ( A ) = tr C ( P ok ◦ ( F ◦ P ¬ ok ) ◦ P s ) = , ∆ ( A ) = tr C ( P ok ◦ ( F ◦ P ¬ ok ) ◦ P s ) = { √ | , ih , | , | ih | ⊗ Z , | ih | ⊗ I } , ∆ ( A ) = tr C ( P ok ◦ ( F ◦ P ¬ ok ) ◦ P s ) = , ∆ ( A ) = tr C ( P ok ◦ ( F ◦ P ¬ ok ) ◦ P s ) = { √ | , ih , |} , ∆ ( A ) = tr C ( P ok ◦ ( F ◦ P ¬ ok ) ◦ P s ) = { √ | , ih , | , √ | , ih , |} , and so on. ∆ ( φ ). In particular, ∆ ( Φ U Φ ) in (7c) is even not expressed in a closed form. In thefollowing, we will construct explicit matrix representations for these super-operators, particularlyfor ∆ ( Φ U Φ ). A natural idea is:1. using the matrix representation of ∆ ( Φ U Φ ), which is analogous to a geometric serieswith common ratio—the matrix representation of F Φ ∧¬ Φ : = F ◦ P Φ ∧¬ Φ ; and2. reformulating it as a matrix fraction.However, F Φ ∧¬ Φ may have some fixed-point γ (or equivalently the matrix representationof F Φ ∧¬ Φ may have eigenvalue 1), which makes the matrix fraction divergent. To overcomethe trouble, inspired by [11], we will remove the bottom strongly connected component (BSCC)subspaces Γ that cover all fixed-points γ of F Φ ∧¬ Φ , i.e. supp( γ ) ⊆ Γ . Recall that: Definition 5.3.
For a super-operator
E ∈ S , a subspace Γ of H is bottom if for any pure state | ψ i ∈ Γ , the support of E ( | ψ ih ψ | ) is contained in Γ ; it is SCC if for any pure states | ψ i , | ψ i ∈ Γ , | ψ i is in span( S ∞ i = supp( E i ( | ψ ih ψ | ))) ; and it is BSCC if it is bottom and SCC.
We characterize the fixed-point of F Φ ∧¬ Φ by the stationary equation F Φ ∧¬ Φ ( γ ) = γ ( γ = γ † ∈ L H cq ) , (8)where γ are unknown variables and F Φ ∧¬ Φ gives rise to coe ffi cients. It is a system of homoge-neous linear equations. Let γ i ( i ∈ [ m ]) be all linearly independent solutions of (8). Thanks to theproperty F Φ ∧¬ Φ = F Φ ∧¬ Φ ◦ P s ∈ S P s , the number of real variables in the Hermitian operator γ can be bounded by nd . So the number m of these solutions is also bounded by nd . We proceedto find out the BSCC subspaces by the following lemma. Lemma 5.4.
The direct-sum of all BSCC subspaces w.r.t. F Φ ∧¬ Φ is span( S i ∈ [ m ] supp( γ i )) . P roof . We first prove Γ : = span( S i ∈ [ m ] supp( γ i )) is the direct-sum of some BSCC subspaces thatcovers all fixed-point of F Φ ∧¬ Φ ; then show it is the direct-sum of all BSCC subspaces.Let γ i = P j ∈ [ N ] λ i , j (cid:12)(cid:12)(cid:12) Ψ i , j ED Ψ i , j (cid:12)(cid:12)(cid:12) be the spectral decomposition of γ i , where λ i , j ∈ R ( j ∈ [ N ])are all eigenvalues of γ i and (cid:12)(cid:12)(cid:12) Ψ i , j E are the corresponding eigenvectors. Define γ + i : = X {| λ i , j (cid:12)(cid:12)(cid:12) Ψ i , j ED Ψ i , j (cid:12)(cid:12)(cid:12) : j ∈ [ N ] ∧ λ i , j > |} γ − i : = X {| λ i , j (cid:12)(cid:12)(cid:12) Ψ i , j ED Ψ i , j (cid:12)(cid:12)(cid:12) : j ∈ [ N ] ∧ λ i , j < |} , where {| · |} denotes a multiset, as the positive and the negative parts of γ i , respectively. Uti-lizing the fact that F Φ ∧¬ Φ is completely positive, the positive part of F Φ ∧¬ Φ ( γ i ) is exactly F Φ ∧¬ Φ ( γ + i ) while the negative part of F Φ ∧¬ Φ ( γ i ) is F Φ ∧¬ Φ ( γ − i ). Since F Φ ∧¬ Φ ( γ i ) = γ i , wehave F Φ ∧¬ Φ ( γ + i ) = γ + i and F Φ ∧¬ Φ ( γ − i ) = γ − i . So we can see that γ + i and − γ − i ( i ∈ [ m ]) arepositive solutions of (8) that together can linearly express any solution of (8).Fixed a postive solution γ = P j λ j (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) in the solution set { γ + i : i ∈ [ m ] } ∪ {− γ − i : i ∈ [ m ] } \ { } , we have γ − λ j F Φ ∧¬ Φ ( (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) ) = F Φ ∧¬ Φ ( γ ) − λ j F Φ ∧¬ Φ ( (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) ) = F Φ ∧¬ Φ ( γ − λ j (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) )12s positive for each (cid:12)(cid:12)(cid:12) Ψ j E ( j ∈ [ m ]), which implies supp( F Φ ∧¬ Φ ( (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) )) is contained insupp( γ ). In other words, for any Kraus operator F ℓ of F Φ ∧¬ Φ , F ℓ (cid:12)(cid:12)(cid:12) Ψ j E is in supp( γ ), i.e.( P l | Ψ l ih Ψ l | ) F ℓ (cid:12)(cid:12)(cid:12) Ψ j E = F ℓ (cid:12)(cid:12)(cid:12) Ψ j E . Furthermore, for any | Ψ i ∈ supp( γ ), after expressing it as P j c j (cid:12)(cid:12)(cid:12) Ψ j E with P i ∈ [ d ] | c i | =
1, we have X j (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) F Φ ∧¬ Φ ( | Ψ ih Ψ | ) X j (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) = X j (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) X ℓ F ℓ X j X l c j c ∗ l (cid:12)(cid:12)(cid:12) Ψ j ED Ψ l (cid:12)(cid:12)(cid:12) F † ℓ X j (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) = X ℓ F ℓ X j X l c j c ∗ l (cid:12)(cid:12)(cid:12) Ψ j ED Ψ l (cid:12)(cid:12)(cid:12) F † ℓ = F Φ ∧¬ Φ ( | Ψ ih Ψ | ) , which implies supp( F Φ ∧¬ Φ ( | Ψ ih Ψ | )) is contained in supp( γ ). Thus supp( γ ) is bottom w.r.t. F Φ ∧¬ Φ . Additionally, span( S ∞ k = supp( F k ( (cid:12)(cid:12)(cid:12) Ψ j ED Ψ j (cid:12)(cid:12)(cid:12) ))) forms a BSCC subspace w.r.t. F Φ ∧¬ Φ .Hence, supp( γ i ) is the direct-sum of some BSCC subspaces of H cq , as well as Γ . The lattercovers all fixed-points of F Φ ∧¬ Φ , since any fixed-point of F Φ ∧¬ Φ can be linearly expressed by { γ + i : i ∈ [ m ] } ∪ {− γ − i : i ∈ [ m ] } , whose supports are contained in Γ .We proceed to prove that Γ is the direct-sum of all BSCC subspaces. By the decomposi-tion [31, Thm. 5] and [17, Thm. 1], we have H cq = T ⊕ M i Γ i , where T is the maximal transient subspace w.r.t. F Φ ∧¬ Φ and each Γ i is a BSCC subspace; andalthough the decomposition is not unique, the maximal transient subspace T is unique as well asthe direct-sum of all BSCC subspaces Γ i . We assume by contradiction that Γ does not contain allBSCC subspaces. Then there is a BSCC subspace Γ orthogonal to Γ . It is easy to see that • the set D Γ of density operators ρ on Γ with trace 1 is a convex and compact set in theviewpoint of probabilistic ensemble form { ( p i , | ψ i i ) : i ∈ [ d ] } that is obained from thespectral decomposition ρ = P i ∈ [ d ] p i | ψ i ih ψ i | ; and • F Φ ∧¬ Φ is a continuous function mapping D Γ to itself.By Brouwer’s fixed-point theorem [22, Chap. 4] that for a continuous function f mapping aconvex and compact set χ to itself, there is a point x ∈ χ such that f ( x ) = x , we know there is afixed-point ρ of F Φ ∧¬ Φ in D Γ . From the construction of Γ , however, we have supp( ρ ) ⊆ Γ ,which implies Γ is not orthogonal to Γ and thus contradicts the assumption. Hence we obtainthat Γ is exactly the direct-sum of all BSCC subspaces w.r.t. F Φ ∧¬ Φ . (cid:3) We formally describe the procedure to compute the direct-sum Γ of all BSCC subspaces w.r.t. F Φ ∧¬ Φ as Algorithm 1. By invoking it on the super-operator F Φ ∧¬ Φ and the Hilbert space H cq ,13e would obtain the direct-sum Γ in O ( N ) arithmetic operations , which is more e ffi cient thanthe existing method [11, Procedure GetBSCC] in O ( N ) field operations. Algorithm 1
Computing the direct-sum of all BSCC subspaces. Γ ← BSCC ( E , H ) Input:
E ∈ S is a super-operator on the Hilbert space H of dimension d . Output: Γ is the direct-sum of all BSCC subspaces w.r.t. E . Γ ← { } ; ⊲ initializing Γ as the zero space compute all linearly independent solutions γ i ( i ∈ [ m ]) of E ( γ ) = γ ( γ = γ † ∈ L H ); for each i ∈ [ m ] do Γ ← span( Γ ∪ supp( γ i )); return Γ . Complexity: O ( d ). Complexity.
In Algorithm 1, the stationary equation γ = E ( γ ) can be solved in O ( d ) by Guassianelimination, whose complexity is cubic in the number d of real variables in γ . The supportsupp( γ i ) of an individual solution γ i and the extended space span( Γ ∪ supp( γ i )) can be computedin O ( d ) by the Gram–Schmidt procedure, whose complexity is cubic in the dimension d . Intotal, they are in O ( md ) ⊆ O ( d ), as the number m of linearly independent solutions is boundedby d .Let P Γ = { P Γ } where P Γ is the projector onto Γ , i.e. P Γ ( H cq ) = Γ ; and P Γ ⊥ = { P Γ ⊥ } where Γ ⊥ is the orthogonal complement of Γ , i.e. Γ ⊕ Γ ⊥ = H cq . Again, thanks to the fact the states in theQMC are of the mixed structure ρ = P s ∈ S | s ih s |⊗ ρ s , we have that P Γ is of the form P s ∈ S | s ih s |⊗ P s where P s ( s ∈ S ) are positive operators, as well as P Γ ⊥ = I H cq − P Γ . Example 5.5.
Consider the path formula φ = true U ≤ ( ok ∨ error ) on the QMC C inExample 3.2. The repeated super-operator in the SOVM ∆ ( φ ) is F ¬ ok ∧¬ error : = F ◦ P ¬ ok ∧¬ error = F ◦ P true ∧¬ ( ok ∨ error ) = | s ih s | ⊗ | , + ih , | , | s ih s | ⊗ | , −ih , | , | s ih s | ⊗ | , ih , | , | s ih s | ⊗ | ih | ⊗ I , | s ih s | ⊗ | , ih , + | , | s ih s | ⊗ | , ih , −| , | s ih s | ⊗ | , ih , −| , | s ih s | ⊗ | ih | ⊗ I , | s ih s | ⊗ X ⊗ I , | s ih s | ⊗ X ⊗ X , | s ih s | ⊗ I ⊗ I , | s ih s | ⊗ I ⊗ X , | s ih s | ⊗ I ⊗ Z , | s ih s | ⊗ Z ⊗ I , | s ih s | ⊗ I ⊗ I , | s ih s | ⊗ Z ⊗ Z . Solving the stationary equation F ¬ ok ∧¬ error ( γ ) = γ ( γ = γ † = P s ∈ S | s ih s | ⊗ γ s ∈ L H cq ), we obtainonly one solution γ = | s ih s | ⊗ | , ih , | + | s ih s | ⊗ | , + ih , + | . In [11], the authors need to determine all individual BSCC subspaces, collect those individual BSCC subspacesof the desired parity, and thus check the ω -regular properties. To this end, [11, Procedure GetBSCC] first computethe direct-sum of BSCC subspaces corresponding to positive eigenvalues and the direct-sum of BSCC subspaces corre-sponding to negative eigenvalues. If those direct-sums consist of more than one BSCC subspace, the procedure wouldbe respectively applied to the two direct-sums in a recursive manner. The overall complexity is O ( N ). In our setting,it su ffi ces to compute the direct-sum of all BSCC subspaces, which saves the recursion to complexity O ( N ). Addi-tionally, determining positive / negative eigenvalues is a typical kind of field operations beyond arithmetic ones (addition,subtraction, multiplication, and division). Obviously, the latters are of lower computational cost. he BSCC subspaces Γ covering all the fixed-points of F ¬ ok ∧¬ error is actually span( {| s i ⊗| , i , | s i ⊗ | , + i} ) . The projection super-operator P Γ = { P Γ } onto Γ is given by the projector P Γ = | s ih s | ⊗ | , ih , | + | s ih s | ⊗ | , + ih , + | ; and the projection super-operator P Γ ⊥ = { P Γ ⊥ } onto Γ ⊥ is given by P Γ ⊥ = I H cq − P Γ . Thereby, the composite super-operator F ¬ ok ∧¬ error ◦ P Γ ⊥ would have no fixed-point. Lemma 5.6.
The identity P Φ ◦ ( F Φ ∧¬ Φ ) i = P Φ ◦ ( F Φ ∧¬ Φ ◦ P Γ ⊥ ) i holds for each i ≥ . P roof . We will prove it by induction on i . When i =
0, the identity follows trivially. Assumethe identity holds for i < k . We proceed to show that it holds for i = k . Let P Γ = { P Γ } and P Γ ⊥ = { P Γ ⊥ } . For any | Ψ i ∈ H cq , we have P Φ ◦ ( F Φ ∧¬ Φ ) k ( | Ψ ih Ψ | ) = P Φ ◦ ( F Φ ∧¬ Φ ) k [( P Γ + P Γ ⊥ ) | Ψ ih Ψ | ( P Γ + P Γ ⊥ )] = P Φ ◦ ( F Φ ∧¬ Φ ) k [ P Γ ( | Ψ ih Ψ | ) + P Γ | Ψ ih Ψ | P Γ ⊥ + P Γ ⊥ | Ψ ih Ψ | P Γ + P Γ ⊥ ( | Ψ ih Ψ | )] = P Φ ◦ ( F Φ ∧¬ Φ ) k − [ F Φ ∧¬ Φ ◦ P Γ ( | Ψ ih Ψ | ) + F Φ ∧¬ Φ ( P Γ | Ψ ih Ψ | P Γ ⊥ ) + F Φ ∧¬ Φ ( P Γ ⊥ | Ψ ih Ψ | P Γ ) + F Φ ∧¬ Φ ◦ P Γ ⊥ ( | Ψ ih Ψ | )] = P Φ ◦ ( F Φ ∧¬ Φ ) k − [ P Γ ◦ F Φ ∧¬ Φ ◦ P Γ ( | Ψ ih Ψ | ) + P Γ F Φ ∧¬ Φ ( P Γ | Ψ ih Ψ | P Γ ⊥ ) + F Φ ∧¬ Φ ( P Γ ⊥ | Ψ ih Ψ | P Γ ) P Γ + F Φ ∧¬ Φ ◦ P Γ ⊥ ( | Ψ ih Ψ | )] = P Φ ◦ ( F Φ ∧¬ Φ ◦ P Γ ⊥ ) k − ( P Γ ◦ F Φ ∧¬ Φ ◦ P Γ ( | Ψ ih Ψ | ) + P Γ F Φ ∧¬ Φ ( P Γ | Ψ ih Ψ | P Γ ⊥ ) + F Φ ∧¬ Φ ( P Γ ⊥ | Ψ ih Ψ | P Γ ) P Γ + F Φ ∧¬ Φ ◦ P Γ ⊥ ( | Ψ ih Ψ | )) = P Φ ◦ ( F Φ ∧¬ Φ ◦ P Γ ⊥ ) k − ◦ F Φ ∧¬ Φ ◦ P Γ ⊥ ( | Ψ ih Ψ | ) = P Φ ◦ ( F Φ ∧¬ Φ ◦ P Γ ⊥ ) k ( | Ψ ih Ψ | ) , where the fourth equation follows from the facts: • P Γ | Ψ i is in Γ , and • letting F be a Kraus operator of F Φ ∧¬ Φ , then FP Γ | Ψ i is still in Γ ;and the sixth equation follows from the facts: • for k > Γ is orthogonal to Γ ⊥ , and • for k =
1, letting P Φ ∧¬ Φ = { P Φ ∧¬ Φ } and P ¬ Φ = { P ¬ Φ } , then Γ ⊆ P Φ ∧¬ Φ ( H cq ) ⊆ P ¬ Φ ( H cq ) is orthogonal to P Φ ( H cq ). (cid:3) We are going to represent ∆ ( Φ U Φ ) using explicit matrices. Recall from [30, Def. 2.2] that,given a super-operator E = { E ℓ : ℓ ∈ [ m ] } , it has the matrix representationS2M( E ) : = X ℓ ∈ [ m ] E ℓ ⊗ E ∗ ℓ , (9)where ∗ denotes complex conjugate. Let • L2V( γ ) : = P i , j ∈ [ n ] h i | γ | j i | i , j i be the function that rearranges entries of the linear operator γ as a column vector; and 15 V2L( v ) : = P i , j ∈ [ n ] h i , j | v | i ih j | be the function that rearranges entries of the column vector v as a linear operator.Here, S2M, L2V and V2L are read as “super-operator to matrix”, “linear operator to vector”and “vector to linear operator”, respectively. Then, we have the identities V2L(L2V( γ )) = γ ,L2V( E ( γ )) = S2M( E )L2V( γ ), and S2M( E ◦ E ) = S2M( E )S2M( E ). Therefore, all involvedsuper-operator manipulations can be converted to matrix manipulations.Suppose that all classical states in S are ordered as s ≺ · · · ≺ s n where s is the initial one,i.e. Ω =
Path ( s ). We notice that for any classical-quantum state ρ = P i ∈ [ n ] | s i ih s i | ⊗ ρ i in D H cq , F Φ ∧¬ Φ ◦ P Γ ⊥ ( ρ ) and P Φ ( ρ ) keep the mixed form P i ∈ [ n ] | s i ih s i | ⊗ ρ ′ i for some ρ ′ i ∈ D . So, we cancompressively define the matrix representation of ρ as a column vector, consisting of n blocks asentries, in which the i th entry is the column vector L2V( ρ i ) for ρ i , i.e. M = P i ∈ [ n ] | i i ⊗ L2V( ρ i ).Let F Φ ∧¬ Φ = P i , j ∈ [ n ] { (cid:12)(cid:12)(cid:12) s j ED s i (cid:12)(cid:12)(cid:12) } ⊗ Q ( s i , s j ) = S i , j ∈ [ n ] S ℓ { (cid:12)(cid:12)(cid:12) s j ED s i (cid:12)(cid:12)(cid:12) ⊗ Q i , j ,ℓ } where Q i , j ,ℓ are Krausoperators of Q ( s i , s j ) and P Γ ⊥ = { P k ∈ [ n ] | s k ih s k | ⊗ P k } . Then, F Φ ∧¬ Φ ◦ P Γ ⊥ is [ i , j ∈ [ n ] [ ℓ X k ∈ [ n ] (cid:12)(cid:12)(cid:12) s j ED s i (cid:12)(cid:12)(cid:12) | s k ih s k | ⊗ Q i , j ,ℓ P k = [ i , j ∈ [ n ] [ ℓ n(cid:12)(cid:12)(cid:12) s j ED s i (cid:12)(cid:12)(cid:12) ⊗ Q i , j ,ℓ P i o . (10)Using it, we further define: • the matrix representation of F Φ ∧¬ Φ ◦ P Γ ⊥ as a square matrix, consisting of n blocks asentries, in which the ( j , i )-th entry is P ℓ Q i , j ,ℓ P i ⊗ Q ∗ i , j ,ℓ P ∗ i , i.e. M = X i , j ∈ [ n ] X ℓ | j ih i | ⊗ Q i , j ,ℓ P i ⊗ Q ∗ i , j ,ℓ P ∗ i ; (11a) • the matrix representation of the projection super-operator P Φ as a diagonal matrix, con-sisting of n blocks as diagonal entries, in which the i th entry is I H⊗H if the predicate s i | = Φ is true, and 0 otherwise, i.e. M = X {| | i ih i | ⊗ I H⊗H : i ∈ [ n ] ∧ s i | = Φ |} , (11b)where {| · |} denotes a multiset.All these matrix representations are obtained by extending (9) on H to the enlarged space H cq . Lemma 5.7.
The matrix I H cq ⊗H − M is invertible. P roof . It su ffi ces to show M has no eigenvalue 1. We assume by contradiction that there is aneigenvector v of M associated with eigenvalue 1. That is, M v = v ,
0. Then, γ = X i ∈ [ n ] | s i ih s i | ⊗ V2L(( h i | ⊗ I H⊗H ) v )is a linear operator on H cq , satisfying F Φ ∧¬ Φ ◦ P Γ ⊥ ( γ ) = γ ,
0, while γ = γ + γ † also alinear operator on H cq , satisfying F Φ ∧¬ Φ ◦ P Γ ⊥ ( γ ) = γ ,
0. By the definition of Γ , wehave supp( γ ) ⊆ Γ , and thus F Φ ∧¬ Φ ◦ P Γ ⊥ ( γ ) = F Φ ∧¬ Φ (0) = , γ , which contradicts theassumption. (cid:3) heorem 5.8 (Matrix representation). Let M and M be the matrices as defined in (11) . Thenit is in polynomial time to obtain: the explicit matrix representation of the super-operator ∆ (X Φ ) as P s | =Φ S2M( Q ( s , s )) , the explicit matrix representation of ∆ ( Φ U ≤ k Φ ) as X i ∈ [ n ] ( h i | ⊗ I H⊗H ) M ( I H cq ⊗H − M k + )( I H cq ⊗H − M ) − ( | i ⊗ I H⊗H ) , the explicit matrix representation of ∆ ( Φ U Φ ) as X i ∈ [ n ] ( h i | ⊗ I H⊗H ) M ( I H cq ⊗H − M ) − ( | i ⊗ I H⊗H ) . P roof . The matrix representations directly follow from the semantics of the next formula X Φ ,the bounded-until formula ∆ ( Φ U ≤ k Φ ), and the unbounded-until formula ∆ ( Φ U Φ ). For com-plexity, we will analyze them in turn.1. It is a sum of at most nd matrix tensor products, each costs O ( d ). In total, it is in O ( nd ) ⊆ O ( N ).2. The matrix I H cq ⊗H − M is of dimension nd . Computing its inverse costs O ( n d ). Thematrix power M k + amounts to M b · M b · · · · M b l · l , where ( b l , . . . , b , b ) is the binary code of the positive integer k + l = ⌈ log ( k + ⌉− k + = b · + b · · · · b l · l with b j ∈ { , } . Computing M k + requires sequentiallycomputing all the factors M j ( j ∈ [ l ]), each of which costs O ( n d ); and then computingthe product of those factors corresponding to b j =
1, which costs O ( n d log ( k )). Otheroperations are merely a few matrix-vector multiplications over an nd -dimensional vectorspace, which costs O ( n d ). Totally, it is in O ( n d log ( k )) ⊆ O ( N log ( k )).3. It is clearly in O ( N ) by the previous analysis.As a result, the complexity is polynomial time w.r.t. N = nd (reflected in the size of C ) andlinear time w.r.t. log ( k ) (reflected in the size of φ ). (cid:3) Example 5.9.
Consider the path formulas φ = true U ok , φ = true U ≤ ok ,φ = true U ( ok ∨ error ) , φ = true U ≤ ( ok ∨ error ) on the QMC C shown in Example 3.2. For φ , the repeated super-operator F ¬ ok ∧¬ error andthe projector P Γ whose support covers all its fixed-points have been computed in Example 5.5.Under the order s ≺ · · · ≺ s , the matrix representations are calculated as M = | ih | ⊗ | , −ih , | ⊗ | , −ih , | + | ih | ⊗ | , ih , | ⊗ | , ih , | + | ih | ⊗ | ih | ⊗ I ⊗ | ih | ⊗ I + | ih | ⊗ | , ih , −| ⊗ | , ih , −| + | ih | ⊗ | , ih , −| ⊗ | , ih , −| + | ih | ⊗ | ih | ⊗ I ⊗ | ih | ⊗ I + | ih | ⊗ X ⊗ I ⊗ X ⊗ I + | ih | ⊗ X ⊗ X ⊗ X ⊗ X + | ih | ⊗ I ⊗ I ⊗ I ⊗ I + | ih | ⊗ I ⊗ X ⊗ I ⊗ X + | ih | ⊗ I ⊗ Z ⊗ I ⊗ Z + | ih | ⊗ Z ⊗ I ⊗ Z ⊗ I + | ih | ⊗ I ⊗ I ⊗ I ⊗ I + | ih | ⊗ Z ⊗ Z ⊗ Z ⊗ Z , M = | ih | ⊗ I ⊗ I + | ih | ⊗ I ⊗ I , in which all eigenvalues of M are ± q + √ , ± q + √ and of multi-plicity . Since M has no eigenvalue , the matrix inverse ( I H cq ⊗H − M ) − is well-defined asexpected. Finally, the explicit matrix representation S2M( ∆ ( φ )) of ∆ ( φ ) is obtained as X i ∈ [6] ( h i | ⊗ I H⊗H ) M ( I H cq ⊗H − M )( I H cq ⊗H − M ) − ( | i ⊗ I H⊗H ) = I ⊗ I ⊗ I ⊗ I + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + ( | , ih , | + | , ih , | ) ⊗ ( | , ih , | + | , ih , | ) + ( | , ih , | + | , ih , | ) ⊗ ( | , ih , | + | , ih , | ) + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | . Similarly, we get other matrix representations
S2M( ∆ ( φ )) = | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | ;S2M( ∆ ( φ )) = | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | ;S2M( ∆ ( φ )) = I ⊗ I ⊗ I ⊗ I + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + ( | , ih , | + | , ih , | ) ⊗ ( | , ih , | + | , ih , | ) + ( | , ih , | + | , ih , | ) ⊗ ( | , ih , | + | , ih , | ) + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | + | , ih , | ⊗ | , ih , | . In the previous subsection, we have constructed an explicit matrix representation M : = S2M( E ) for E = ∆ ( φ ) where φ is the path formula in the fidelity-quantifier formula F ∼ τ ( φ ). Nowwe present an algebraic approach to compare the (minimum) fidelity Fid( E ) with the threshold τ , so that s | = F ∼ τ ( φ ) can be decided.We first notice that: 18 s | = F ≤ τ ( φ ) amounts to the quantified constraint ζ ≡ ∃ | ψ i ∈ H : [Fid( E , | ψ ih ψ | ) ≤ τ ∧ ∀ | ϕ i ∈ H : Fid( E , | ψ ih ψ | ) ≤ Fid( E , | ϕ ih ϕ | )] ≡ ∃ | ψ i ∈ H : Fid( E , | ψ ih ψ | ) ≤ τ ; (12a) • s | = F ≥ τ ( φ ) amounts to the quantified constraint ζ ≡ ∃ | ψ i ∈ H : [Fid( E , | ψ ih ψ | ) ≥ τ ∧ ∀ | ϕ i ∈ H : Fid( E , | ψ ih ψ | ) ≤ Fid( E , | ϕ ih ϕ | )] ≡ ∀ | ψ i ∈ H : Fid( E , | ψ ih ψ | ) ≥ τ ; (12b) • other comparison operators = , < , > and , can be easily derived by logic connectives.Suppose all entries in the Kraus operators E of E are algebraic numbers for the considerationof computability. Recall that: Definition 5.10.
A number λ is algebraic , denoted by λ ∈ A , if there is a nonzero Q -polynomialf ( z ) of least degree, satisfying f ( λ ) = . Such a polynomial f ( z ) is called the minimal polynomial f λ of λ . Clearly, algebraic numbers widely occur in quantum information, such as the definition ofthe most common quantum state |±i = ( | i ± | i ) / √
2. We will formulate the constraints (12)as Q -polynomial (polynomial with rational coe ffi cients) formulas in the decidable theory—realclosed fields [27]: Definition 5.11.
The theory of real closed fields is a first-order theory T h ( R ; + , · ; = , > ; 0 , , inwhich • the domain is R , • the functions are addition ‘ + ’ and multiplication ‘ · ’, • the predicates are equality ‘ = ’ and order ‘ > ’, and • the constants are and . Roughly speaking, the elements in
T h ( R ; + , · ; = , > ; 0 ,
1) are Q -polynomial formulas that arecomposed from polynomial equations and inequalities (as atomic formulas) using logic connec-tives “ ¬ , ∧ , ∨ , → , ↔ ” and quantifiers “ ∀ , ∃ ”.The constraints (12) are the sentences —the formulas whose variables | ψ i are all existen-tially / universally quantified, i.e. no free variable. We will encode them as A -polynomial formu-las, and further encode them as Q -polynomial formulas.Since | ψ ih ψ | is pure, we predefine | ψ i = P i ∈ [ d ] x i | i i where x i ( i ∈ [ d ]) are complex parameters,subject to P i ∈ [ d ] x i x ∗ i =
1. Under the purity, we haveFid( E , | ψ ih ψ | ) ≤ τ ≡ h ψ | E ( | ψ ih ψ | ) | ψ i ≤ τ ≡ X i ∈ [ d ] x ∗ i h i | E X i , j ∈ [ d ] x i x ∗ j | i ih j | X j ∈ [ d ] x j | j i ≤ τ ≡ X i , j ∈ [ d ] x ∗ i x j h i , j | M X i , j ∈ [ d ] x i x ∗ j | i , j i ≤ τ , (13)19hich results in an A -polynomial formula. Denote all parameters introduced here by x = ( x i ) i ∈ [ d ] .Further, we encode the constraint (12a) as ζ ≡ ∃ x : X i ∈ [ d ] x i x ∗ i = ∧ X i , j ∈ [ d ] x ∗ i x j h i , j | M X i , j ∈ [ d ] x i x ∗ j | i , j i ≤ τ , (14a)which is the desired A -polynomial formula, involving at most • d real variables (converted from d complex variables x ) for expressing | ψ i , • one quadratic equation for the purity, and • one quartic inequality for the comparison.Similarly, the A -polynomial formula for encoding the constraint (12b) is ζ ≡ ∀ x : X i ∈ [ d ] x i x ∗ i = → X i , j ∈ [ d ] x ∗ i x j h i , j | M X i , j ∈ [ d ] x i x ∗ j | i , j i ≥ τ . (14b)Suppose the input E involves real algebraic numbers Λ = { λ j : j ∈ [ e ] } . Then the A -polynomial formulas (14) are named by ζ ( Λ ) and ζ ( Λ ), respectively. To e ff ectively tackle them,we resort to the standard encoding of real algebraic number λ that uses minimal polynomial f λ plus isolation interval I λ , which is given by linear inequalities, like z ∈ I λ ≡ L < z < U for somerational endpoints L and U of I λ , to distinguish λ from other real roots of f λ . In such a way, toencode each real algebraic number λ , we introduce at most • one real variable z , • one equation f λ = f λ ), and • two linear inequalities z > L and z < U from the isolation interval I λ of λ .For instance, the aforementioned algebraic number 1 / √ |±i can be encoded as theunique solution to z = ∧ < z < A -polynomial formulas ζ ( Λ ) and ζ ( Λ ) can be rewritten as the Q -polynomial ones: ζ ( Λ ) ≡ ∃ z : ^ j ∈ [ e ] ( f λ j ( z j ) = ∧ z j ∈ I λ j ) ∧ ζ ( z ) (15a) ζ ( Λ ) ≡ ∀ z : ^ j ∈ [ e ] ( f λ j ( z j ) = ∧ z j ∈ I λ j ) → ζ ( z ) , (15b)where z = ( z j ) j ∈ [ e ] are real variables introduced to symbolize Λ . Note that the existential quan-tifier ∃ z and the universal quantifier ∀ z can be mutually converted here, since for each j ∈ [ e ],there is a unique solution (i.e. λ j ) to the subformula f λ j ( z j ) = ∧ z j ∈ I λ j by the standard encodingof λ j .Finally, applying the existential theory of the reals [5, Thm. 13.13], we obtain: Theorem 5.12 (Decidability).
It is in exponential time to decide the fidelity-quantifier formula F ∼ τ ( φ ) . roof . It su ffi ces to show that the formulating subprocedure is in polynomial time, and that thedeciding subprocedure is in exponential time.The encoding on the purity is plainly in O ( d ). Encoding the left hand side of the comparison(e.g. the formula (13)) involves a few matrix-vector multiplications over a d -dimensional vectorspace, which costs O ( d ). Thus encoding the polynomial formulas (15) is in O ( d ), which meansthat the formulating subprocedure is in polynomial time.Then we tackle the deciding subprocedure, which invokes the following Algorithm 2 on theformulas (15). Technically, the formulas (15) have • a block of 2 d + e real variables x and z quantified all by ‘ ∃ ’ for (15a) or all by ‘ ∀ ’ for (15b),and • at most C = + e distinct polynomials of degree at most D = max(4 , max j ∈ [ e ] deg( f λ j )).Thereby, the complexity is in C d + e + D O (2 d + e ) , an exponential hierarchy. (cid:3) Algorithm 2
Existential Theory of the Reals [5, Thm. 13.13]. true / false ← QE (Q x : F ( x )) Input: Q x : F ( x ) is a quantified polynomial formula, in which • x is a block of k real variables, which is quantified by Q ∈ {∀ , ∃} , • each atomic formula in F is in the form p ∼ ∼ ∈ { <, ≤ , = , ≥ , >, , } , • all distinct polynomials p , regardless of a constant factor, extracted from those atomicformulas p ∼ P , • C is the cardinality of P , and • D is the maximum degree of the polynomials in P . Output: true / false is the truth of Q x : F ( x ). Complexity: C k + D O ( k ) .There are many packages that have implemented Algorithm 2, such as R educe (a.k.a. R ed - log [10]) and Z3 [8]. Example 5.13.
Consider the events that “the IP address is properly configured”, “the IP address is properly configured within 15 steps”, “the IP address is properly or wrongly configured”, and “the IP address is properly or wrongly configured within 15 steps”on the QMC C shown in Example 3.2, which are specified by the path formulas φ through φ inExample 5.9, respectively. For φ = true U ≤ ( ok ∨ error ) , the explicit matrix representation M of ∆ ( φ ) has been obtained. Now we are to decide the fidelity-quantifier formula F ≤ τ ( φ ) .After introducing the real variables µ = ℜ ( x ) and ν = ℑ ( x ) where x = ( x i ) i ∈ [4] encodes thepure state | ψ ih ψ | , we have the desired polynomial formula { µ , ν } : [ µ + ν + µ + ν + µ + ν + µ + ν = ∧ ν + ν ν + ν + ν ν + ν ν + ν + ν ν + ν ν + ν ν + ν + ν µ + ν µ + ν µ + ν µ + µ + ν µ + ν µ + ν µ + ν µ + µ µ + µ + ν µ + ν µ + ν µ + ν µ + µ µ + µ µ + µ + ν µ + ν µ + ν µ + ν µ + µ µ + µ µ + µ µ + µ ≤ τ ] . By R educe [10], the fidelity-quantifier formula F ≤ / ( φ ) is decided to be true while F ≤ / ( φ ) is false. In other words, Fid( ∆ ( φ )) is in ( , ] , which entails that at least of the original MAC and proper IP addresses at s would be delivered at the terminal s ors within 15 steps through the noisy channel C . Besides, by [12], we can compute that it hasprobability at least to reach s or s within 15 steps, whose square-root can be proven to bean upper bound of the fidelity, i.e. ( ) / > , no lower bound. So it is less precise than oursin characterizing the similarity degree of the two MAC addresses.For the formulas φ and φ , we have that both F = ( φ ) and F = ( φ ) hold, since there aresome pure states, whose support falls into the BSCC subspaces w.r.t. F ¬ ok . For instance, | s ih s | ⊗ | , ih , | is tansformed to | s ih s | ⊗ Q ( s , s )( | , ih , | ) = | s ih s | ⊗ | , ih , | ,whose support itself forms a BSCC subspace; and to | s ih s |⊗ Q ( s , s )( | , ih , | ) = | s ih s |⊗| , ih , | , whose support falls into the BSCC subspace span( | s i ⊗ | , i , | s i ⊗ | , + i ) . Besides,we have that both F > / ( φ ) and F ≤ / ( φ ) hold, as the bounded-until formula ap-proaches the unbounded-until one. Remark 5.14.
When the initial density operator ρ is given and all the entries in the Kraus oper-ators of Q ( s , t ) with s , t ∈ S are rational, it would be in polynomial time to decide ( s , ρ ) | = F ∼ τ ( φ ) ,since the time-consuming quantifier elimination is saved then. It is consistent with the existingwork [30].Implementation. We have implemented the presented method on the platform M athematica , in-corported with the package R educe [10]. Using caching mechanism, we divide the whole com-putation procedure into two subprocedures:1. the synthesizing subprocedure to prepare information about the given QMC and QCTLformula, including quantum state information, matrix representations of transition super-operators, and removal of the direct-sum of all BSCC subspaces; and2. the deciding subprocedure for fidelity-quantifier formulas.Thus we can for instance ensure good interactivity in specific situation. Under a PC with IntelCore i7-6700 CPU and 8 GB RAM, the overall performance of our running examples is ac-ceptable: the total time consumption is within a few seconds; the synthesizing subprocedure22onsumes nearly 30 MB memory, and besides that, the deciding subprocedure consumes at most50 MB. Finally, we have to address that the fidelity computation for the QMC with a concrete ini-tial classical–quantum state is always much e ffi cient (usually within 1 second); while the fidelitycomputation for the QMC with a parametric initial classical–quantum state may be ine ffi cient,since in the worst case the quantifier elimination is exponential time. Detailed calculation proce-dure is available at https://github.com/melonysuga/PaperFidelityExamples-.git .
6. Conclusion
In this paper, we introduced a quantum analogy of computation tree logic (QCTL), whichconsists of state formulas and path formulas. A model checking algorithm was presented overthe quantum Markov chains (QMCs). We gave a simple polynomial time procedure that couldremove all fixed-points w.r.t. a super-operator. We then synthesized the super-operators of pathformulas using explicit matrix representations, and decided the fidelity-quantifier formulas bya reduction to quantifier elimination in the existential theory of the reals. Finally, the QCTLformulas were shown to be decidable in exponential time.We believe that the proposed method could be extended to: • synthesize the SOVM for the general multiphase until formula Φ U I Φ U I · · · U I k − Φ k with proper time intervals I i as in [29]; • synthesize the SOVM for the conjunction φ ∧ φ , so that the conditional fidelity, similarto conditional probability [2, 13], could be established; • synthesize the SOVM for the negation ¬ φ , so that the safety property (cid:3) Φ = ¬ ( true U ¬ Φ )could be analyzed; and • decide the analogy of SOVM-quantifier formula over parametric QMCs. The positive-operator valued measure (POVM) would be a key tool to attack it. References [1] Andova, S., Hermanns, H., Katoen, J.-P., 2004. Discrete-time rewards model-checked. In: Larsen, K. G., Niebert,P. (Eds.), Formal Modeling and Analysis of Timed Systems: First International Workshop, FORMATS 2003. Vol.2791 of LNCS. Springer, pp. 88–104.[2] Andr´es, M. E., van Rossum, P., 2008. Conditional probabilities over probabilistic and nondeterministic systems. In:Ramakrishnan, C. R., Rehof, J. (Eds.), Tools and Algorithms for the Construction and Analysis of Systems: 14thInternational Conference, TACAS 2008. Vol. 4963 of LNCS. Springer, pp. 157–172.[3] Arute, F., Arya, K., Babbush, R., Bacon, D., Bardin, J. C., Barends, R., Biswas, R., Boixo, S., Brandao, F. G.S. L., Buell, D. A., Burkett, B., Chen, Y., Chen, Z., Chiaro, B., Collins, R., Courtney, W., Dunsworth, A., Farhi, E.,Foxen, B., Fowler, A., Gidney, C., Giustina, M., Gra ff , R., Guerin, K., Habegger, S., Harrigan, M. P., Hartmann,M. J., Ho, A., Ho ff mann, M., Huang, T., Humble, T. S., Isakov, S. V., Je ff rey, E., Jiang, Z., Kafri, D., Kechedzhi, K.,Kelly, J., Klimov, P. V., Knysh, S., Korotkov, A., Kostritsa, F., Landhuis, D., Lindmark, M., Lucero, E., Lyakh, D.,Mandr´a, S., McClean, J. R., McEwen, M., Megrant, A., Mi, X., Michielsen, K., Mohseni, M., Mutus, J., Naaman,O., Neeley, M., Neill, C., Niu, M. Y., Ostby, E., Petukhov, A., Platt, J. C., Quintana, C., Rie ff el, E. G., Roushan,P., Rubin, N. C., Sank, D., Satzinger, K. J., Smelyanskiy, V., Sung, K. J., Trevithick, M. D., Vainsencher, A.,Villalonga, B., White, T., Yao, Z. J., Yeh, P., Zalcman, A., Neven, H., Martinis, J. M., 2019. Quantum supremacyusing a programmable superconducting processor. Nature 574, 505–510.[4] Baier, C., Katoen, J.-P., 2008. Principles of Model Checking. MIT Press.[5] Basu, S., Pollack, R., Roy, M.-F., 2006. Algorithms in Real Algebraic Geometry, 2nd Edition. Springer.[6] Bennett, C. H., Brassard, G., 1984. Quantum cryptography: Public key distribution and coin tossing. In: Proc. ofIEEE International Conference on Computers, Systems and Signal Processing, 1984. IEEE Computer Society, pp.175–179.
7] Clarke, E. M., Grumberg, O., Peled, D. A., 1999. Model Checking. MIT Press.[8] de Moura, L., Bjørner, N., 2008. Z3: An e ffi cient SMT solver. In: Ramakrishnan, C. R., Rehof, J. (Eds.), Tools andAlgorithms for the Construction and Analysis of Systems: 14th International Conference, TACAS 2008. Vol. 4963of LNCS. Springer, pp. 337–340.[9] Dehnert, C., Junges, S., Katoen, J.-P., Volk, M., 2017. A S torm is coming: A modern probabilistic model checker.In: Majumdar, R., Kuncak, V. (Eds.), Computer Aided Verification: 29th International Conference, CAV 2017, PartII. Vol. 10427 of LNCS. Springer, pp. 592–600.[10] Dolzmann, A., Sturm, T., 1997. R edlog : Computer algebra meets computer logic. ACM SIGSAM Bulletin 31 (2),2–9.[11] Feng, Y., Hahn, E. M., Turrini, A., Ying, S., 2017. Model checking ω -regular properties for quantum Markovchains. In: Meyer, R., Nestmann, U. (Eds.), 28th International Conference on Concurrency Theory, CONCUR2017. Vol. 85 of LIPIcs. Schloss Dagstuhl — Leibniz-Zentrum f¨ur Informatik, pp. 35:1–35:16.[12] Feng, Y., Yu, N., Ying, M., 2013. Model checking quantum Markov chains. Journal of Computer and SystemSciences 79 (7), 1181–1198.[13] Gao, Y., Xu, M., Zhan, N., Zhang, L., 2013. Model checking conditional CSL for continuous-time Markov chains.Information Processing Letters 113 (1-2), 44–50.[14] Gay, S. J., Nagarajan, R., Papanikolaou, N., 2006. Probabilistic model-checking of quantum protocols. In: Proc.2nd International Workshop on Developments in Computational Models.[15] Gay, S. J., Nagarajan, R., Papanikolaou, N., 2008. QMC: A model checker for quantum systems. In: Gupta, A.,Malik, S. (Eds.), Computer Aided Verification, 20th International Conference, CAV 2008. Vol. 5123 of LNCS.Springer, pp. 543–547.[16] Grover, L. K., 1996. A fast quantum mechanical algorithm for database search. In: Proc. 28th Annual ACM Sym-posium on the Theory of Computing. ACM, pp. 212–219.[17] Guan, J., Feng, Y., Ying, M., 2018. Decomposition of quantum Markov chains and its applications. Journal ofComputer and System Sciences 95, 55–68.[18] Hahn, E. M., Li, Y., Schewe, S., Turrini, A., Zhang, L., 2014. iscas M c : A web-based probabilistic model checker.In: Jones, C., Pihlajasaari, P., Sun, J. (Eds.), FM 2014: Formal Methods—19th International Symposium. Vol.8442 of LNCS. Springer, pp. 312–317.[19] Han, T., Katoen, J.-P., Damman, B., 2009. Counterexample generation in probabilistic model checking. IEEETransactions on Software Engineering 35 (2), 241–257.[20] Hansson, H., Jonsson, B., 1989. A framework for reasoning about time and reliability. In: Proc. IEEE Real-TimeSystems Symposium, 1989. IEEE Computer Society, pp. 102–111.[21] Harrow, A. W., Hassidim, A., Lloyd, S., 2009. Quantum algorithm for solving linear systems of equations. PhysicalReview Letters 103 (15), article no. 150502.[22] Istrˇat¸escu, V. I., 2001. Fixed Point Theory: An Introduction. Springer.[23] Kwiatkowska, M., Norman, G., Parker, D., 2011. PRISM 4.0: Verification of probabilistic real-time systems. In:Gopalakrishnan, G., Qadeer, S. (Eds.), Computer Aided Verification: 23rd International Conference, CAV 2011.Vol. 6806 of LNCS. Springer, pp. 585–591.[24] Li, L., Feng, Y., 2015. Quantum Markov chains: Description of hybrid systems, decidability of equivalence, andmodel checking linear-time properties. Information and Computation 244, 229–244.[25] Nielsen, M. A., Chuang, I. L., 2000. Quantum Computation and Quantum Information. Cambridge UniversityPress.[26] Shor, P. W., 1994. Algorithms for quantum computation: Discrete logarithms and factoring. In: Proc. 35th AnnualSymposium on Foundations of Computer Science. IEEE Computer Society, pp. 124–134.[27] Tarski, A., 1951. A Decision Method for Elementary Algebra and Geometry, 2nd Edition. University of CaliforniaPress.[28] Wootters, W. K., Zurek, W. H., 1982. A single quantum cannot be cloned. Nature 299, 802–803.[29] Xu, M., Zhang, L., Jansen, D. N., Zhu, H., Yang, Z., 2016. Multiphase until formulas over Markov reward models:An algebraic approach. Theoretical Computer Science 611, 116–135.[30] Ying, M., Yu, N., Feng, Y., Duan, R., 2013. Verification of quantum programs. Science of Computer Programming78 (9), 1679–1700.[31] Ying, S., Feng, Y., Yu, N., Ying, M., 2013. Reachability probabilities of quantum Markov chains. In: D’Argenio,P. R., Melgratti, H. C. (Eds.), CONCUR 2013: Concurrency Theory—24th International Conference. Vol. 8052 ofLNCS. Springer, pp. 334–348.: A web-based probabilistic model checker.In: Jones, C., Pihlajasaari, P., Sun, J. (Eds.), FM 2014: Formal Methods—19th International Symposium. Vol.8442 of LNCS. Springer, pp. 312–317.[19] Han, T., Katoen, J.-P., Damman, B., 2009. Counterexample generation in probabilistic model checking. IEEETransactions on Software Engineering 35 (2), 241–257.[20] Hansson, H., Jonsson, B., 1989. A framework for reasoning about time and reliability. In: Proc. IEEE Real-TimeSystems Symposium, 1989. IEEE Computer Society, pp. 102–111.[21] Harrow, A. W., Hassidim, A., Lloyd, S., 2009. Quantum algorithm for solving linear systems of equations. PhysicalReview Letters 103 (15), article no. 150502.[22] Istrˇat¸escu, V. I., 2001. Fixed Point Theory: An Introduction. Springer.[23] Kwiatkowska, M., Norman, G., Parker, D., 2011. PRISM 4.0: Verification of probabilistic real-time systems. In:Gopalakrishnan, G., Qadeer, S. (Eds.), Computer Aided Verification: 23rd International Conference, CAV 2011.Vol. 6806 of LNCS. Springer, pp. 585–591.[24] Li, L., Feng, Y., 2015. Quantum Markov chains: Description of hybrid systems, decidability of equivalence, andmodel checking linear-time properties. Information and Computation 244, 229–244.[25] Nielsen, M. A., Chuang, I. L., 2000. Quantum Computation and Quantum Information. Cambridge UniversityPress.[26] Shor, P. W., 1994. Algorithms for quantum computation: Discrete logarithms and factoring. In: Proc. 35th AnnualSymposium on Foundations of Computer Science. IEEE Computer Society, pp. 124–134.[27] Tarski, A., 1951. A Decision Method for Elementary Algebra and Geometry, 2nd Edition. University of CaliforniaPress.[28] Wootters, W. K., Zurek, W. H., 1982. A single quantum cannot be cloned. Nature 299, 802–803.[29] Xu, M., Zhang, L., Jansen, D. N., Zhu, H., Yang, Z., 2016. Multiphase until formulas over Markov reward models:An algebraic approach. Theoretical Computer Science 611, 116–135.[30] Ying, M., Yu, N., Feng, Y., Duan, R., 2013. Verification of quantum programs. Science of Computer Programming78 (9), 1679–1700.[31] Ying, S., Feng, Y., Yu, N., Ying, M., 2013. Reachability probabilities of quantum Markov chains. In: D’Argenio,P. R., Melgratti, H. C. (Eds.), CONCUR 2013: Concurrency Theory—24th International Conference. Vol. 8052 ofLNCS. Springer, pp. 334–348.