A quantum register is a list of distinct variables qˉ=q1,...,qn. Each quantum variable q has a type Hq, which is the state Hilbert space of quantum system denoted by q.
For a set of quantum variables S={q1,...,qn}⊆V (or a quantum register qˉ=q1,...,qn):
HS=⨂i=1nHqi: the Hilbert space of S.
dim(S): the dimension of HS.
D(S): the set of all (mixed) quantum states of S.
For any ρ∈D(S), its domain is defined as dom(ρ)≜S. We write D=⋃S⊆VD(S) for the set of all states.
P(S): the set of projections on HS. In particular, for any P∈P(S), its domain is defined as free(P)≜S.
Since there is a one-to-one correspondence between projections and closed subspaces, we sometimes call closed subspaces of HS projections. We write P=⋃S⊆VP(S) for the set of all projections.
ρ∣S≜trdom(ρ)\S(ρ): the restriction of state ρ on S, defined as a reduced density operator over S∩dom(ρ).
BI formula is generated with the following syntax:
ϕ,ψ::=p∈AP∣⊤∣⊥∣ϕ∧ψ∣ϕ∧ψ∣ϕ→ψ∣ϕ∗ψ∣ϕ−∗ψ
where p ranges over a set AP of atomic propositions.
BI frame is a tuple X=(X,∘,⪯,e) where X is a set equipped with a preorder ⪯, and ∘:X×X→X is a partial binary operation with an unit element e, satisfying:
(Unit Existence) ∀x∈X,x=x∘e=e∘x.
(Commutativity) x∘y=y∘x.
(Associativity) x∘(y∘z)=(x∘y)∘z.
(Compatible with ⪯) If x⪯x′ and y⪯y and x∘y,x′∘y′ are defined, then x∘y⪯x′∘y′.
The “=” means that either both sides are defined, or both undefined.
A valuation is a mapping V:AP→℘(X) where ℘ represents the power set. The map is monotonic if x∈V(p) and y⪰x implies y∈V(p).
A BI frame X together with a monotonic valuation V gives a BI modelM=(X,∘,≺,e,V).
Given a BI formula ϕ and a BI model M, for each x∈X, the satisfaction relationx⊨ϕ is defined by induction on ϕ:
x⊨Mp iff x∈V(p).
x⊨M⊤: always.
x⊨M⊥: never.
x⊨Mϕ1∧ϕ2 iff x⊨Mϕ1 and x⊨Mϕ2.
x⊨Mϕ1∨ϕ2 iff x⊨Mϕ1 or x⊨Mϕ2.
x⊨Mϕ1→ϕ2 iff ∀x′⪰x, x′⊨Mϕ1 implies x′⊨Mϕ2.
x⊨Mϕ1∗ϕ2 iff ∃y,z s.t. y∘z is defined and x⪰y∘z and y⊨Mϕ1 and z⊨Mϕ2.
x\models_{\mathcal{M}}\phi_1\sepimp\phi_2 iff ∀y s.t. x∘y is defined, y⊨Mϕ1 implies x∘y⊨Mϕ2.
Then we are going to introduce the quantum instance for BI logic:
For each variable set S⊆V, we introduce a set of atomic propositions D[S] with domain defined by free(D[S])≜S. We interpret it as the state with domain at least S:
[∣D[S]∣]≜{ρ∈D:S⊆dom(ρ)}
Propositions for qualitative analysis:
For qualitative analysis of quantum programs, we often use projection operators as atomic propositions. For a projection P∈P as an atomic proposition, its semantics is defined as:
[∣P∣]≜{ρ∈D:free(P)⊆dom(ρ) and supp(ρ∣free(P))⊆P}
where the support of a state ρ∈D is the (topological) closure of the subspaces spanned by its eigenvectors with nonzero eigenvalues, or equivalently:
supp(ρ)={∣ϕ⟩∈Hdom(ρ):⟨ϕ∣ρ∣ϕ⟩=0}⊥
Let’s carefully explain the definition of [∣P∣]. In the case that ρ has the same domain of P, it is natural to define ρ∈[∣P∣] if its support space supp(ρ) lies in P.
In the case where dom(ρ) and free(P) are not the same, in order to make [∣P∣] upward-closed (i.e. monotonic): ρ∈[∣P∣] and ρ⪯ρ′ imply ρ′∈[∣P∣], it is appropriate to require that ρ∈[∣P∣] iff dom(ρ)⊇free(P) and the restricted state of ρ on free(P) is in [∣P∣].
Atomic propositions expressing uniformity in quantum security
For each variable set S⊆V, we introduce an atomic proposition U[S]. Its domain is free(U[S])≜S. The semantics is defined as:
[∣U(S)∣]≜{ρ∈D:S⊆dom(ρ) and ρ∣S=dim(S)IS}
The intuition is: for a state ρ∈[∣U(S)∣] such that S⊆dom(ρ), its restriction on S should be the completely mixed state, dim(S)IS, which means “uniformly distributed” over all orthonormal bases of the system denoted by S.
Axiom schema for atomic formulas:
⊨D[S]↔IS, where IS is the identity operator over HS, i.e. [∣D(S)∣]=[∣IS∣].
and ⌈P⌉q=⨆{ closed subspaces T:∣0⟩q⟨0∣⊗T⊆P}∈P(free(P)\q).
Here ⊔ is the disjunction of projections in quantum logic, that is, for projections P,Q with the same domain, P⊔Q=span(P∪Q) with “⋅” standing for (topological closure).
For uniformity atomic proposition,
U[S][qˉ:=U[qˉ]]={U[S]undefinedqˉ⊆S or qˉ∩S=∅otherwiseU[S][qˉ:=∣0⟩]={U[S]undefinedq∈/Sotherwise
we write ϕ[C]↓ when ϕ[C] is defined.
if ϕ=⊤,⊥, ϕ[C]≜ϕ;
if ϕ=p∈AP, ϕ[C] is defined as above;
if ϕ=ϕ1∧ϕ2 and ϕ1[C]↓ and ϕ2[C]↓, then ϕ[C]=ϕ1[C]∧ϕ2[C];
if ϕ=ϕ1∨ϕ2 and ϕ1[C]↓ and ϕ2[C]↓, then ϕ[C]=ϕ1[C]∨ϕ2[C];
if ϕ=ϕ1∗ϕ2 and ϕ1[C]↓,ϕ2[C]↓ and (qˉ⊆free(ϕ1) or qˉ∧free(ϕ1)=∅) and (qˉ⊆free(ϕ2) or qˉ∧free(ϕ2)=∅), then
if C=qˉ:=U[qˉ], then ϕ[C]=ϕ1[C]∗ϕ2[C];
if C=q:=∣0⟩, then
if q∈/free(ϕ1)∪free(ϕ2), ϕ[C]=ϕ1[C]∗ϕ2[C];
if only one of q∈free(ϕ1) or q∈free(ϕ2)is satisfied, then ϕ[C]=(ϕ1[C]∧ϕ2[C])∧(D[free(ϕ1)\q]∗D[free(ϕ2)\q]).
otherwise, ϕ[C] is undefined.
Proposition:
free(ϕ)=free(ϕ[C]).
for all ρ∈D(free(ϕ)∪var(C)), if ρ⊨ϕ[C], then [∣C∣](ρ)⊨ϕ.
Let V be a set of quantum variables with free(ϕ),free(ψ),var(C)⊆V. Then V⊨{ϕ}C{ψ} is true in the sense of partial correctness if we have:
∀ρ∈D(V),ρ⊨ϕ⇒[∣C∣]V(ρ)⊨ψ
Inference rules:
{ϕ}skip{ψ}{ϕ[q:=∣0⟩}q:=∣0⟩{ϕ}ϕ[q:=∣0⟩]↓{ϕ}C1;C2{μ}{ϕ}C1{ψ}{ψ}C2{μ}{ϕ∗D(qˉ)}if (□m.M[qˉ]=m→Cm) fi{ψ}∀m,{ϕ∗Mm}Cm{ϕ}ψ∈CM{ϕ∗D(qˉ)}while M[qˉ]=1 do C od{ϕ∧M0}{ϕ∗M1}C{ϕ∗D(qˉ)}ϕ∈CM
where “CM” stands for closed under mixtures. i.e., if dom(ρ)=dom(ρ′) and ρ⊨ϕ,ρ′⊨ϕ, we have ∀λ∈[0,1],λρ+(1−λ)ρ′⊨ϕ.
Proposition: The formulas generated by following grammar are CM:
ϕ,ψ::=p∈AP∣⊤∣⊥∣ϕ∧ψ∣U[S]∗ϕ
Structural rules:
{ϕ}C{ψ}D[free(ϕ)∪free(ϕ′)]→(ϕ→ϕ′){ϕ′}C{ψ′}D[free(ψ)∪free(ψ′)]→(ψ→ψ′){ϕ1∧ϕ2}C{ψ1∧ψ2}{ϕ1}C{ψ1}{ϕ2}C{ψ2}{ϕ1∨ϕ2}C{ψ1∨ψ2}{ϕ1}C{ψ1}{ϕ2}C{ψ2}{ϕ∧μ}C{ψ∧μ}{ϕ}C{ψ}free(μ)∩var(C)=∅{ϕ∗μ}C{ψ∗μ}{ϕ}C{ψ}free(μ)∩var(C)=∅free(ψ)∪var(C)⊆free(ϕ) or ψ∈SP
A formula ψ is called supported, written ψ∈SP, if [∣ψ∣] is nonempty then it has a least element, or equivalently, there exists a S⊆V such that