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

Quantum Hoare Logic

Quantum Hoare Logic

Effects, weakest preconditions, and measurement-loop rules for partial and total correctness in Chapter 6 quantum Hoare logic.

Quantum Hoare logic extends the classical triple {P} C {Q} to the quantum while-language. A predicate is an effect rather than a set of states: it is a Hermitian operator satisfying 0⪯P⪯I0\preceq P\preceq I. For a (possibly subnormalized) state ρ\rho, tr⁡(Pρ)\operatorname{tr}(P\rho) is the predicate's average truth value or degree of satisfaction. Write E=⟦C⟧\mathcal E=\llbracket C\rrbracket for the denotation of a program. It is usually a completely positive trace-nonincreasing map; lost trace represents mass that has not terminated in the chosen semantics. If a model uses postselection, it must state explicitly whether postselection loss is being treated as nontermination.

The notation follows Chapter 6: HX=⨂q∈XHq\mathcal H_X=\bigotimes_{q\in X}\mathcal H_q, Hall\mathcal H_{all} is the space of all quantum variables, D(H)\mathcal D(\mathcal H) is the set of positive operators of trace at most one, and P(H)\mathcal P(\mathcal H) is the set of effects.

§6.1 Quantum predicates, Löwner order, and weakest preconditions

Definition 6.1 (printed p. 92). A quantum predicate is a Hermitian operator MM whose eigenvalues all lie in [0,1][0,1], equivalently 0⪯M⪯I0\preceq M\preceq I. The Löwner order A⪯BA\preceq B means that B−AB-A is positive semidefinite. Lemma 6.1 also gives the equivalent condition 0≤tr⁡(Mρ)≤10\le\operatorname{tr}(M\rho)\le1 for every density operator ρ\rho. Projections are therefore Boolean predicates, while general effects express quantitative properties. Lemma 6.2 (printed p. 93) states

M⪯N⟺tr⁡(Mρ)≤tr⁡(Nρ) for every density operator ρ.M\preceq N\quad\Longleftrightarrow\quad \operatorname{tr}(M\rho)\le\operatorname{tr}(N\rho)\ \text{for every density operator }\rho.

P(H)\mathcal P(\mathcal H) is a CPO under this order (Lemma 6.3, printed p. 93), but it is generally not a lattice: two effects need not have a greatest lower bound or a least upper bound. Classical conjunction and disjunction therefore cannot be copied unconditionally onto one quantum system. Tensor products work for disjoint systems, and Kraus-weighted sums combine measurement branches.

§6.1.1 Semantic wp and Schrödinger–Heisenberg duality

For a quantum operation E\mathcal E and predicate MM, Definition 6.2 (printed p. 95) defines the precondition relation by

{N}E{M}⟺tr⁡(Nρ)≤tr⁡(ME(ρ))∀ρ.\{N\}\mathcal E\{M\}\quad\Longleftrightarrow\quad \operatorname{tr}(N\rho)\le\operatorname{tr}(M\mathcal E(\rho))\quad\forall\rho.

Definition 6.3. wp⁡(E)(M)\operatorname{wp}(\mathcal E)(M) is the effect satisfying this relation and such that every other precondition NN obeys N⪯wp⁡(E)(M)N\preceq\operatorname{wp}(\mathcal E)(M). “Weakest” is therefore the greatest admissible effect in the Löwner order; it is not an unstated Boolean implication order.

If E(ρ)=∑iEiρEi†\mathcal E(\rho)=\sum_i E_i\rho E_i^\dagger, Proposition 6.1 (printed pp. 95–96) gives

wp⁡(E)(M)=E∗(M)=∑iEi†MEi.\operatorname{wp}(\mathcal E)(M)=\mathcal E^*(M)=\sum_i E_i^\dagger M E_i.

The adjoint (Definition 6.4, Eq. (6.9), printed p. 97) is characterized by

tr⁡(ME(ρ))=tr⁡(E∗(M)ρ).\operatorname{tr}(M\mathcal E(\rho)) =\operatorname{tr}(\mathcal E^*(M)\rho).

Thus the Schrödinger picture moves states forward, ρ↦E(ρ)\rho\mapsto\mathcal E(\rho), while the Heisenberg picture moves observations backward, M↦E∗(M)M\mapsto\mathcal E^*(M). Proposition 6.3 identifies this duality with the quantum weakest-precondition transformer. The adjoint preserves scalar multiplication, sums, reverse composition, and suprema of increasing sequences (Proposition 6.4, printed pp. 98–99).

§6.1.2 Commutativity: wp does not generally preserve it

Two predicates commute when MN=NMMN=NM. Joint reasoning about them depends on this commutativity. A general quantum operation does not guarantee that commuting M,NM,N produce commuting E∗(M),E∗(N)\mathcal E^*(M),\mathcal E^*(N). Extra hypotheses are needed before taking separate weakest preconditions of a joint specification.

Proposition 6.5 (printed p. 100) gives two useful cases:

  • If E(ρ)=UρU†\mathcal E(\rho)=U\rho U^\dagger is unitary, then E∗(M)\mathcal E^*(M) and E∗(N)\mathcal E^*(N) commute exactly when MM and NN commute.
  • If E(ρ)=∑kPkρPk\mathcal E(\rho)=\sum_kP_k\rho P_k is a projective measurement whose result is discarded, they commute exactly when every compressed pair PkMPkP_kMP_k and PkNPkP_kNP_k commutes. For measurement in a complete orthonormal basis, the weakest preconditions commute for all M,NM,N.

A useful sufficient condition from Proposition 6.8 (printed p. 101) is that M,NM,N commute with each other and each commutes with every Kraus operator of E\mathcal E; then wp⁡(E)(M)\operatorname{wp}(\mathcal E)(M) and wp⁡(E)(N)\operatorname{wp}(\mathcal E)(N) commute. The bit-flip example (Example 6.2, printed p. 100) additionally requires MXN=NXMMXN=NXM besides MN=NMMN=NM, showing why postcondition commutativity alone is insufficient. Propositions 6.6, 6.9, and 6.10 provide more specialized sufficient conditions using spectral decompositions and system–environment models; their long matrix proofs are omitted here.

§6.2 Partial and total correctness

A quantum Hoare triple is

{P} C {Q},P,Q∈P(Hall).\{P\}\ C\ \{Q\},\qquad P,Q\in\mathcal P(\mathcal H_{all}).

For every ρ∈D(Hall)\rho\in\mathcal D(\mathcal H_{all}), Definition 6.8 (printed pp. 103–104) gives two semantics:

Total correctness:

⊨tot{P}C{Q}⟺tr⁡(Pρ)≤tr⁡(QE(ρ)).(6.12)\models_{tot}\{P\}C\{Q\} \quad\Longleftrightarrow\quad \operatorname{tr}(P\rho)\le \operatorname{tr}\bigl(Q\mathcal E(\rho)\bigr). \tag{6.12}

Partial correctness:

⊨par{P}C{Q}⟺tr⁡(Pρ)≤tr⁡(QE(ρ))+tr⁡(ρ)−tr⁡(E(ρ)).(6.13)\models_{par}\{P\}C\{Q\} \quad\Longleftrightarrow\quad \operatorname{tr}(P\rho)\le \operatorname{tr}\bigl(Q\mathcal E(\rho)\bigr) +\operatorname{tr}(\rho)-\operatorname{tr}(\mathcal E(\rho)). \tag{6.13}

The final two terms together compensate for nonterminating mass, so partial correctness permits an execution to fail to terminate. Total correctness requires the satisfaction promised by the precondition to appear in terminating output. If E\mathcal E is trace-preserving, the two inequalities coincide.

Termination must be read relative to the precondition. If P=IP=I and ρ\rho is normalized, (6.12), together with Q⪯IQ\preceq I, forces tr⁡(E(ρ))=1\operatorname{tr}(\mathcal E(\rho))=1 and requires the output to satisfy QQ. If P=0P=0, the triple is trivial. An arbitrary PP constrains only the input effect weighted by PP; it does not assert global termination on every input. Under partial correctness, {P}C{I}\{P\}C\{I\} always holds, while {I}C{Q}\{I\}C\{Q\} equates output satisfaction with termination mass.

In adjoint form,

⊨tot{P}C{Q}⟺P⪯wp⁡C(Q),⊨par{P}C{Q}⟺P⪯wlp⁡C(Q).\models_{tot}\{P\}C\{Q\}\Longleftrightarrow P\preceq\operatorname{wp}_C(Q), \qquad \models_{par}\{P\}C\{Q\}\Longleftrightarrow P\preceq\operatorname{wlp}_C(Q).

§6.3 Structural wp/wlp rules and loop fixed points

Definition 6.9 (printed p. 108). The program transformer wp⁡C(Q)\operatorname{wp}_C(Q) is the greatest input effect making ⊨tot{wp⁡C(Q)}C{Q}\models_{tot}\{\operatorname{wp}_C(Q)\}C\{Q\} true; wlp⁡C(Q)\operatorname{wlp}_C(Q) is defined the same way for partial correctness. For the denotation, wp⁡C(Q)=E∗(Q)\operatorname{wp}_C(Q)=\mathcal E^*(Q) and

wlp⁡C(Q)=E∗(Q)+I−E∗(I).(6.21’)\operatorname{wlp}_C(Q)=\mathcal E^*(Q)+I-\mathcal E^*(I). \tag{6.21'}

The main structural equations (Propositions 6.12 and 6.13, printed pp. 109–112) are

wp⁡skip(Q)=Q,wp⁡q:=U[q](Q)=U†QU,wp⁡C1;C2(Q)=wp⁡C1(wp⁡C2(Q)),wp⁡if(Q)=∑mMm†wp⁡Cm(Q)Mm.\begin{aligned} \operatorname{wp}_{skip}(Q)&=Q,\\ \operatorname{wp}_{q:=U[q]}(Q)&=U^\dagger Q U,\\ \operatorname{wp}_{C_1;C_2}(Q)&=\operatorname{wp}_{C_1}(\operatorname{wp}_{C_2}(Q)),\\ \operatorname{wp}_{if}(Q)&=\sum_m M_m^\dagger\operatorname{wp}_{C_m}(Q)M_m. \end{aligned}

For Boolean initialization,

wp⁡q:=∣0⟩(Q)=∣0⟩ ⁣⟨0∣qQ∣0⟩ ⁣⟨0∣q+∣1⟩ ⁣⟨0∣qQ∣0⟩ ⁣⟨1∣q,\operatorname{wp}_{q:=|0\rangle}(Q)= |0\rangle\!\langle0|_q Q|0\rangle\!\langle0|_q +|1\rangle\!\langle0|_q Q|0\rangle\!\langle1|_q,

with the analogous sum over all basis values for an integer register. wlp has the same equations for skip, initialization, unitary, sequencing, and measurement branches, replacing each subprogram wp by wlp; it additionally credits nontermination mass.

Let the loop be while M[q] = 1 do S od, with measurement {M0,M1}\{M_0,M_1\} satisfying M0†M0+M1†M1=IM_0^\dagger M_0+M_1^\dagger M_1=I. For postcondition PP, define

Fwp(X)=M0†PM0+M1†wp⁡S(X)M1,F_{wp}(X)=M_0^\dagger P M_0+M_1^\dagger\operatorname{wp}_S(X)M_1,
Fwlp(X)=M0†PM0+M1†wlp⁡S(X)M1.F_{wlp}(X)=M_0^\dagger P M_0+M_1^\dagger\operatorname{wlp}_S(X)M_1.

The loop wp is the least fixed point of FwpF_{wp}: with X0=0X_0=0 and Xn+1=Fwp(Xn)X_{n+1}=F_{wp}(X_n),

wp⁡while(P)=⨆n≥0Xn.\operatorname{wp}_{while}(P)=\bigsqcup_{n\ge0}X_n.

The loop wlp is the greatest fixed point of FwlpF_{wlp}, obtained by the descending approximation from Y0=IY_0=I:

wlp⁡while(P)=gfp⁡(Fwlp).\operatorname{wlp}_{while}(P)=\operatorname{gfp}(F_{wlp}).

These are the least/greatest fixed-point statements of Proposition 6.14 (printed pp. 113–114). For every ρ\rho,

tr⁡(wp⁡C(P)ρ)=tr⁡(PE(ρ)),\operatorname{tr}(\operatorname{wp}_C(P)\rho)=\operatorname{tr}(P\mathcal E(\rho)),
tr⁡(wlp⁡C(P)ρ)=tr⁡(PE(ρ))+tr⁡(ρ)−tr⁡(E(ρ)).\operatorname{tr}(\operatorname{wlp}_C(P)\rho)=\operatorname{tr}(P\mathcal E(\rho)) +\operatorname{tr}(\rho)-\operatorname{tr}(\mathcal E(\rho)).

§6.4 qPD: the partial-correctness proof system

qPD uses the Löwner order in place of classical implication. Let M={Mm}M=\{M_m\} be a measurement with ∑mMm†Mm=I\sum_mM_m^\dagger M_m=I. The core axioms and rules (Figure 6.3, PDF p. 25, printed p. 115; soundness/completeness theorems on pp. 117–120) are:

  • (Ax.Sk) {P} skip {P}\{P\}\,skip\,\{P\}.
  • (Ax.In) {∑n∣n⟩q⟨0∣Q∣0⟩q⟨n∣} q:=∣0⟩ {Q}\{\sum_n|n\rangle_q\langle0|Q|0\rangle_q\langle n|\}\ q:=|0\rangle\ \{Q\} (for a Boolean register, n=0,1n=0,1).
  • (Ax.UT) {U†PU} q:=U[q] {P}\{U^\dagger P U\}\ q:=U[q]\ \{P\}.
  • (R.SC) From {P}C1{Q}\{P\}C_1\{Q\} and {Q}C2{R}\{Q\}C_2\{R\}, infer {P}C1;C2{R}\{P\}C_1;C_2\{R\}.
  • (R.IF) From {Pm}Cm{Q}\{P_m\}C_m\{Q\} for every mm, infer
{∑mMm†PmMm} if (M=m→Cm)m fi {Q}.\left\{\sum_mM_m^\dagger P_mM_m\right\}\ if\ (M=m\to C_m)_m\ fi\ \{Q\}.
  • (R.LP) From {Q}S{M0†PM0+M1†QM1}\{Q\}S\{M_0^\dagger P M_0+M_1^\dagger Q M_1\}, infer
{M0†PM0+M1†QM1} while M[q]=1 do S od {P}.\{M_0^\dagger P M_0+M_1^\dagger Q M_1\}\ while\ M[q]=1\ do\ S\ od\ \{P\}.
  • (R.Or) If P⪯P′P\preceq P', {P′}C{Q′}\{P'\}C\{Q'\}, and Q′⪯QQ'\preceq Q, infer {P}C{Q}\{P\}C\{Q\}.

Theorem 6.1 (printed p. 117): qPD is sound: provability implies partial-correctness validity. Theorem 6.2 (printed p. 120): qPD is relatively complete for partial correctness of quantum while-programs: every semantically valid triple is derivable, relative to facts about the complex field and an assertion language expressive enough to state the required wlp. Relative completeness does not mean that a tool will automatically find invariants or proofs.

§6.5 qTD: total correctness, ranking functions, and termination obligations

qTD shares qPD's skip, initialization, unitary, sequencing, case, and consequence rules, replacing only its loop rule by (R.LT). For ε>0\varepsilon>0, Definition 6.10 (printed p. 121) calls t:D(Hall)→Nt:\mathcal D(\mathcal H_{all})\to\mathbb N a (P,ε)(P,\varepsilon)-ranking function for a loop when, for every ρ\rho,

t(⟦S⟧(M1ρM1†))≤t(ρ),t(\llbracket S\rrbracket(M_1\rho M_1^\dagger))\le t(\rho),

and, whenever tr⁡(Pρ)≥ε\operatorname{tr}(P\rho)\ge\varepsilon,

t(⟦S⟧(M1ρM1†))<t(ρ).t(\llbracket S\rrbracket(M_1\rho M_1^\dagger))<t(\rho).

The measured state M1ρM1†M_1\rho M_1^\dagger must appear here; the classical condition t(⟦S⟧(ρ))<t(ρ)t(\llbracket S\rrbracket(\rho))<t(\rho) cannot simply be reused. Well-foundedness of N\mathbb N rules out an infinite strictly descending chain.

The qTD loop rule (R.LT, Figure 6.5, PDF p. 33, printed p. 123) is

{Q}S{M0†PM0+M1†QM1}∀ε>0, tε is a (M1†QM1,ε)-ranking function{M0†PM0+M1†QM1} while M[q]=1 do S od {P}\frac{ \{Q\}S\{M_0^\dagger P M_0+M_1^\dagger Q M_1\}\quad \forall\varepsilon>0,\ t_\varepsilon\text{ is a }(M_1^\dagger Q M_1,\varepsilon)\text{-ranking function} }{ \{M_0^\dagger P M_0+M_1^\dagger Q M_1\}\ while\ M[q]=1\ do\ S\ od\ \{P\}}

Lemma 6.6 (printed p. 122) characterizes the ranking obligation by the residual limit

lim⁡n→∞tr⁡ ⁣(P(⟦S⟧∘E1)n(ρ))=0,E1(ρ)=M1ρM1†.\lim_{n\to\infty}\operatorname{tr}\!\left(P(\llbracket S\rrbracket\circ E_1)^n(\rho)\right)=0, \qquad E_1(\rho)=M_1\rho M_1^\dagger.

This is the vanishing of residual mass still in the continuing branch as observed by PP; it is not an automatic claim that global termination mass vanishes for every arbitrary precondition. Theorem 6.3 (printed p. 124) proves qTD sound, and Theorem 6.4 (printed p. 126) proves relative completeness. The relative qualification again concerns complex-field order facts and the expressibility of ranking functions.

§6.6 Grover example in outline

Printed pp. 127–130 use Grover search to demonstrate the combination of qPD and qTD. The search space has size N=2nN=2^n and LL solutions. Registers q0,…,qn−1q_0,\ldots,q_{n-1} form the search register, qq is the oracle ancilla, and rr is an integer counter. The program initializes the registers, prepares the uniform superposition and ∣−⟩| -\rangle, and executes

while M[r] = 1 do D od; if (computational-basis measurement of the q-register) fi,

where DD consists of the oracle, Hadamards, phase transformation, Hadamards, and r := r+1. The threshold kk is chosen using the Grover angle θ\theta (the textbook convention is cos⁡(θ/2)=(N−L)/N\cos(\theta/2)=\sqrt{(N-L)/N} and an integer kk in [π/(2θ)−1,π/(2θ)][\pi/(2\theta)-1,\pi/(2\theta)]).

The general specification (printed p. 128) is ⊨tot{psuccI}Grover{P}\models_{tot}\{p_{succ}I\}\mathrm{Grover}\{P\}, where

psucc=sin⁡2 ⁣(2k+12θ),P=(∑s is a solution∣s⟩qˉ⟨s∣)⊗Iq⊗Ir.p_{succ}=\sin^2\!\left(\frac{2k+1}{2}\theta\right),\qquad P=\left(\sum_{s\text{ is a solution}}|s\rangle_{\bar q}\langle s|\right)\otimes I_q\otimes I_r.

Here qˉ=q0,…,qn−1\bar q=q_0,\ldots,q_{n-1} and 1≤L≤N/21\le L\le N/2; the near-optimal integer choice above gives psucc≥(N−L)/Np_{succ}\ge(N-L)/N. To simplify its proof, the textbook additionally assumes L=1L=1 and that the midpoint k=π/(2θ)−1/2k=\pi/(2\theta)-1/2 is an admissible integer iteration count. This extra ideal case has psucc=1p_{succ}=1, giving the target ⊨tot{I}Grover{P}\models_{tot}\{I\}\mathrm{Grover}\{P\}. A unique solution alone does not give probability one for an arbitrary integer iteration count.

The proof has three parts: use (Ax.UT) and (R.IF) to verify the loop body D; use the counter-based ranking function that decreases on each continuing iteration (pp. 129–130, Eq. (6.37)) and (R.LT) to prove loop termination; then combine initialization, gates, the loop, and final measurement with (Ax.In), (R.SC), and (R.Or). The example makes the qTD termination obligation explicit; it does not turn an arbitrary program precondition into a global termination guarantee.

§6.7 Auxiliary rules, scope, and side conditions

Auxiliary rules compress many qPD/qTD steps into readable structural proofs without changing the underlying semantics. For X⊆YX\subseteq Y, the cylindric extension is cl⁡Y(A)=A⊗IY∖X\operatorname{cl}_Y(A)=A\otimes I_{Y\setminus X}; for disjoint variables, tr⁡Y\operatorname{tr}_Y is the partial trace. Weak operator convergence An→w.o.t.AA_n\xrightarrow{w.o.t.}A means ⟨ψ∣An∣ϕ⟩→⟨ψ∣A∣ϕ⟩\langle\psi|A_n|\phi\rangle\to\langle\psi|A|\phi\rangle for every pair of vectors.

Figure 6.9 (PDF p. 42, printed p. 132) gives:

  • (Ax.Inv) If var⁡(S)∩V=∅\operatorname{var}(S)\cap V=\varnothing, B∈P(HV)B\in\mathcal P(\mathcal H_V), and A=cl⁡V∪var⁡(S)(B)A=\operatorname{cl}_{V\cup\operatorname{var}(S)}(B), then {A}S{A}\{A\}S\{A\}.
  • (R.TI) With V∩W=∅V\cap W=\varnothing, A,B∈P(HV)A,B\in\mathcal P(\mathcal H_V) and var⁡(S)⊆V\operatorname{var}(S)\subseteq V, infer {A}S{B}\{A\}S\{B\} from {A⊗IW}S{B⊗IW}\{A\otimes I_W\}S\{B\otimes I_W\}.
  • (R.CC) From {Ai}S{Bi}\{A_i\}S\{B_i\} for i=1,…,mi=1,\ldots,m, infer {∑ipiAi}S{∑ipiBi}\{\sum_i p_iA_i\}S\{\sum_i p_iB_i\}, with pi≥0p_i\ge0 and ∑ipi≤1\sum_i p_i\le1.
  • (R.Inv) If {A}S{B}\{A\}S\{B\} and CC concerns variables unchanged by SS, infer {pA+qC}S{pB+qC}\{pA+qC\}S\{pB+qC\}, with p,q≥0p,q\ge0 and p+q≤1p+q\le1.
  • (R.SO) For a quantum operation E\mathcal E on variables unchanged by SS, infer {E∗(A)}S{E∗(B)}\{\mathcal E^*(A)\}S\{\mathcal E^*(B)\} from {A}S{B}\{A\}S\{B\}.
  • (R.Lin) From {A}S{B}\{A\}S\{B\} infer {λA}S{λB}\{\lambda A\}S\{\lambda B\} for λ≥0\lambda\geq0, with both scaled operators remaining effects. Figure 6.9 states scaling, not an affine shift by μI\mu I.
  • (R.Lim) If An→w.o.t.AA_n\xrightarrow{w.o.t.}A, Bn→w.o.t.BB_n\xrightarrow{w.o.t.}B, and every {An}S{Bn}\{A_n\}S\{B_n\} is valid, infer {A}S{B}\{A\}S\{B\}.

Lemma 6.8 (printed pp. 131–132) supplies the scope conditions: Ax.Inv is sound only for partial correctness; R.TI, R.CC, R.Inv, and R.Lim are sound for both partial and total correctness; R.SO is sound for total correctness and for partial correctness only when E\mathcal E is trace-preserving; R.Lin is sound for total correctness and for partial correctness only when λ≤1\lambda\le1. The following probability equivalences use normalized inputs; for partial density operators, replace 1 by tr⁡(ρ)\operatorname{tr}(\rho). Figure 6.10 also introduces abortion and termination predicates. AA characterizes abortion of PP when ⊨par{A}P{0}\models_{par}\{A\}P\{0\}, equivalently tr⁡(Aρ)≤1−tr⁡(⟦P⟧(ρ))\operatorname{tr}(A\rho)\le1-\operatorname{tr}(\llbracket P\rrbracket(\rho)); it characterizes termination when ⊨tot{I−A}P{I}\models_{tot}\{I-A\}P\{I\}, equivalently 1−tr⁡(⟦P⟧(ρ))≤tr⁡(Aρ)1-\operatorname{tr}(\llbracket P\rrbracket(\rho))\le\operatorname{tr}(A\rho). The strengthened (R.CC1)/(R.CC2) rules require respectively Abort/Term and coefficients pi≥0,∑pi≤1p_i\ge0,\sum p_i\le1 or λi≥0,∑λi≥1\lambda_i\ge0,\sum\lambda_i\ge1.

These rules support framing, mixing, noisy channels, and limit arguments; they do not automatically synthesize loop invariants, ranking functions, or numerical error bounds. Classical registers, retained measurement outcomes, postselection, and open-system models must be included explicitly in the state space and denotation.

References and page index

This entry was checked against Chapter 6 of Foundations of Quantum Programming (PDF pp. 1–44, printed pp. 91–134): Definitions/Lemmas 6.1–6.4 (PDF pp. 2–7), Proposition 6.4 (p. 8), Propositions 6.5–6.10 (pp. 10–12), Definitions 6.7–6.8 (pp. 13–14), Definition/Propositions 6.9 and 6.12–6.14 (pp. 18–24), Theorems 6.1–6.2 (pp. 27 and 30), Definition/Lemma 6.10/6.6 and Theorems 6.3–6.4 (pp. 31–36), Grover (pp. 37–40), and Lemmas 6.8–6.9 with Figures 6.9–6.10 (pp. 41–43). Long proofs, all exercises, the three quantum-relation compositions, and detailed system–environment commutativity matrices are not reproduced; definitions, rule conclusions, theorem statements, coefficients, and side conditions are retained.

  • Mingsheng Ying, Foundations of Quantum Programming, Chapter 6, 2024.
  • Mingsheng Ying, Floyd-Hoare Logic for Quantum Programs, ACM TOPLAS 33(6), 2011, DOI.
  • Ellie D'Hondt and Prakash Panangaden, Quantum Weakest Preconditions, arXiv:quant-ph/0501157.

Further examples

Predicate connectives, auxiliary rules and Grover proof give worked details and the explicitly labelled apparent angle-formula typo.

An introductory guide. Consult the original references for technical details and formal citations.
READ NEXTQuantum Hoare Rules and Loop Proofs→

Search the collection