ψQuantum PL WIKITHE LANGUAGE OF QUANTUM COMPUTATION中文
VOLUME IV · Logic & verification

Auxiliary Rules of Quantum Hoare Logic

Auxiliary Rules of Quantum Hoare Logic

Organize proofs using convex combinations, local variables, adjoint operations and limits, with explicit partial and total correctness conditions.

This entry follows Chapter 6 §6.7. Figures 6.9–6.10 and Lemma 6.8 were checked against printed pages 131–133 (PDF pages 41–43). See Hoare rules for triple semantics. All assertions are effects, 0⪯A⪯I0\preceq A\preceq I. Local operators are implicitly extended by identities.

Locality and invariant assertions

A command uses variables var⁡(S)\operatorname{var}(S). For an effect CC on a disjoint set VV, its cylindric extension is C⊗Ivar⁡(S)C\otimes I_{\operatorname{var}(S)}. Axiom (Ax.Inv) gives {C}S{C}p\{C\}S\{C\}_p. This is a partial-correctness axiom: the command may still diverge.

Rule (R.TI) derives {A}S{B}\{A\}S\{B\} from {A⊗IW}S{B⊗IW}\{A\otimes I_W\}S\{B\otimes I_W\} when V∩W=∅V\cap W=\varnothing, A,BA,B act on VV, and var⁡(S)⊆V\operatorname{var}(S)\subseteq V. It holds for partial and total correctness. Removing an unused auxiliary space does not license ignoring entanglement.

Convex combinations and independent invariants

If every {Ai}S{Bi}∗\{A_i\}S\{B_i\}_* holds, pi≥0p_i\geq0 and ∑ipi≤1\sum_i p_i\leq1, rule (R.CC) yields

{∑ipiAi}S{∑ipiBi}∗.\left\{\sum_i p_iA_i\right\}S\left\{\sum_i p_iB_i\right\}_*.

The same correctness convention must be used throughout. Convex combinations preserve effect bounds; multiplying noncommuting effects is not a replacement for conjunction.

Rule (R.Inv) adds the same independent assertion CC to both sides of a triple:

{pA+qC}S{pB+qC}∗,p,q≥0, p+q≤1.\{pA+qC\}S\{pB+qC\}_*,\qquad p,q\geq0,\ p+q\leq1.

The variables of CC must be disjoint from those of the command.

Adjoint operations and scaling

Rule (R.SO) transforms a triple into {E∗(A)}S{E∗(B)}\{\mathcal E^*(A)\}S\{\mathcal E^*(B)\} when the quantum operation E\mathcal E acts on variables unused by SS. It holds for total correctness. Partial correctness additionally requires trace preservation of E\mathcal E. It cannot be applied indiscriminately to noise on the registers the command modifies.

Rule (R.Lin) gives {λA}S{λB}\{\lambda A\}S\{\lambda B\} for λ≥0\lambda\geq0, provided both scaled operators remain effects. Total correctness permits this scaling; partial correctness additionally requires λ≤1\lambda\leq1, since its nontermination compensation cannot be scaled arbitrarily.

Weak operator limits

Suppose An→AA_n\to A and Bn→BB_n\to B in the weak operator topology: for all vectors ψ,ϕ\psi,\phi, ⟨ψ∣An∣ϕ⟩→⟨ψ∣A∣ϕ⟩\langle\psi|A_n|\phi\rangle\to\langle\psi|A|\phi\rangle. If all {An}S{Bn}∗\{A_n\}S\{B_n\}_* hold, (R.Lim) gives {A}S{B}∗\{A\}S\{B\}_*. The assertions remain uniformly bounded effects; arbitrary divergent matrix series do not qualify.

Strengthening combination with nontermination bounds

For normalized input define dS(ρ)=1−tr(⟦S⟧(ρ))d_S(\rho)=1-\mathrm{tr}(\llbracket S\rrbracket(\rho)). The book's Term⁡(C)\operatorname{Term}(C) means dS(ρ)≤tr(Cρ)d_S(\rho)\leq\mathrm{tr}(C\rho), an upper bound on nontermination. Its Abort⁡(C)\operatorname{Abort}(C) means tr(Cρ)≤dS(ρ)\mathrm{tr}(C\rho)\leq d_S(\rho), a lower bound. The name Term does not assert unconditional termination.

Given partial triples {Ai}S{Bi}p\{A_i\}S\{B_i\}_p:

  • (R.CC1): if pi≥0p_i\geq0, s=∑ipi≤1s=\sum_i p_i\leq1 and Abort⁡(C)\operatorname{Abort}(C) holds, the precondition is ∑ipiAi+(1−s)C\sum_i p_iA_i+(1-s)C and the postcondition is ∑ipiBi\sum_i p_iB_i.
  • (R.CC2): if λi≥0\lambda_i\geq0, s=∑iλi≥1s=\sum_i\lambda_i\geq1 and Term⁡(C)\operatorname{Term}(C) holds, the precondition is ∑iλiAi−(s−1)C\sum_i\lambda_iA_i-(s-1)C and the postcondition is ∑iλiBi\sum_i\lambda_iB_i. Both must remain effects.

For example, a never-terminating command has dS=1d_S=1, so Abort⁡(I)\operatorname{Abort}(I) holds. Its partial correctness does not establish that any output is produced.

Source

Mingsheng Ying, Foundations of Quantum Programming, second edition, §6.7, printed pages 131–133, Figures 6.9–6.10 and Lemmas 6.8–6.9. Chapter 6 DOI. This entry verifies the auxiliary rules; it does not certify completion of the remaining chapter audit.

An introductory guide. Consult the original references for technical details and formal citations.
READ NEXTQuantum Predicate Connectives and Noncommutativity→

Search the collection