Analysis of Quantum Circuits Via Abstract Stabilizer Simulation
Analysis of Quantum Circuits Via Abstract Stabilizer Simulation
Analysis of Quantum Circuits Via Abstract Stabilizer Simulation
Stabilizer Simulation
Benjamin Bichsel, Maximilian Baader, Anouk Paradis, and Martin Vechev
In this work, we address this challenge by presenting a novel approach for efficient
stabilizer simulation on arbitrary quantum circuits, at the cost of lost precision. Our
key idea is to compress an exponential sum representation of the quantum state into
a single abstract summand covering (at least) all occurring summands. This allows
us to introduce an abstract stabilizer simulator that efficiently manipulates abstract
summands by over-abstracting the effect of circuit operations including Clifford gates,
non-Clifford gates, and (internal) measurements.
We implemented our abstract simulator in a tool called Abstraqt and experi-
mentally demonstrate that Abstraqt can establish circuit properties intractable for
existing techniques.
1 Introduction
Stabilizer simulation [1] is a promising technique for efficient classical simulation of quantum cir-
cuits consisting exclusively of Clifford gates. Unfortunately, generalizing stabilizer simulation to
arbitrary circuits including non-Clifford gates requires exponential time [2, 3, 4, 5, 6, 7]. Specifi-
cally, the first such generalization by Aaronson and Gottesman [2, §VII-C] tracks the quantum state
ρ at any point in the quantum circuit as a sum whose number of summands m grows exponentially
with the number of non-Clifford gates:
m n
I+(−1)bij Qj
X Y
ρ= ci P i 2 . (1)
i=1 j=1
Here, while ci , Pi , bij , and Qj can be represented efficiently (see §2), the overall representation is
inefficient due to exponentially large m.
Abstraction. The key idea of this work is to avoid tracking the exact state ρ of a quantum system
and instead only track key aspects of ρ, by over-approximating the set of possible summands.
To this end, we rely on the established framework of abstract interpretation [8, 9], which is
traditionally used to analyze classical programs [10, 11] or neural networks [12] by describing sets
of possible states without explicitly enumerating all of them. Here, we use abstract interpretation
to describe sets of possible summands.
Merging Summands. This allows us to curb the exponential blow-up of stabilizer simulation
by merging multiple summands in Eq. (1) into a single summand which over-approximates all
covered summands, at the cost of lost precision. The key technical challenge addressed by our
work is designing a suitable abstract domain to describe sets of summands, accompanied by the
corresponding abstract transformers to over-approximate the actions performed by the original
exponential stabilizer simulation on individual summands.
1
As a result, our approach is both efficient and exact on Clifford circuits, as these circuits
never require merging summands. On non-Clifford circuits, merging summands trades precision
for efficiency. Moreover, our approach naturally allows us to merge the possible outcomes of a
measurement into a single abstract state, preventing an exponential path explosion when simulating
multiple internal measurements.
Outlook. This work trades precision for efficiency by over-abstracting the very first stabilizer
simulation generalized to non-Clifford gates by Aaronson and Gottesman [2, §VII-C], see Eq. (1).
As discussed in §7.4, we believe that our encouraging results pave the way to introduce analogous
abstraction to various follow-up works which improve upon this simulation [4, 5, 6, 7]. As these
more recent works scale better than [2, §VII-C], we expect that a successful application of abstract
interpretation to them will yield even more favorable trade-offs between precision and efficiency.
2 Background
We first introduce the necessary mathematical concepts.
Basic Notation. We use Zn := Z/(nZ), define B := Z2 , and write 2S for the power set of the
n
set S. We represent an n-qubit quantum state either using vectors ψ ∈ C2 or density matrices
2n ×2n
ρ ∈ C . We denote the embedding of a k-qubit gate U ∈ U(2 ) as an n-qubit gate by
k
Stabilizer Simulation. The key idea of stabilizer simulation [1, 2] is representing quantum
states ρ = ψψ † implicitly, by stabilizers Q which stabilize the state ψ, that is Qψ = ψ.QAs shown
n I+Q
in [2], appropriately selecting n stabilizers Qj then specifies a unique n-qubit state ρ = j=1 2 j .
In stabilizer simulation, all Qj are Pauli elements from Pn of the form iv · P (0) ⊗ · · · ⊗ P (n−1) ,
where P (j) ∈ {X, Y, Z, I2 } and v ∈ Z4 . This directly implies that all stabilizers for some state
ψ commute, that is Qi Qj = Qj Qi , as elements from the Pauli group Pn either commute or anti-
commute. These elements can be represented efficiently in memory by storing v and P (0) , . . . , P (n−1) .
In App. B, we list states stabilized by Pauli matrices (Tab. 6) and the results of multiplying Pauli
matrices (Tab. 7). Further, for this work we use the functions bare b : Pn → Pn and prefactor
f : Pn → Z4 which extract the Pauli matrices without the prefactor and the prefactor, respectively:
While Eq. (4) holds for any gate U , stabilizer simulation can only exploit it if U Qj U † ∈ Pn .
Clifford gates such as S, H, CN OT , I, X, Y, and Z satisfy this for any Qj ∈ Pn .
2
Table 1: Transformers for the interval abstraction.
To also support the application of non-Clifford gates such as T gates, we follow [2, Sec. VII.C]
and represent ρ more generally as
m n
P Q I+(−1)bij Qj
ρ= ci Pi 2 ,
i=1 j=1
for cpiq = dp ci d∗q ∈ C, Ppiq = Rp Pi Rq ∈ Pn , and bijq = bij + Qj Rq ∈ B. Here, d∗q denotes the
complex conjugate of dq , + denotes addition modulo 2, and Qj Rq is the commutator defined as 0
if Qj and Rq commute and 1 otherwise. Note that · · : Pn × Pn → B has the highest precedence.
Overall, the decomposition of a k-qubit non-Clifford gate results in at most 4k summands,
thus blowing up the number of summands in our representation by at most 4k · 4k = 16k . In
practice, the blow-up is typically smaller, e.g., decomposing a T gate only requires 2 summands,
while decomposing a CCN OT gate requires 8 summands.
Measurement. Measuring in bare Pauli basis P ∈ b(Pn ) yields one of two possible quantum
states. They can be computed by applying the two projections P+ := I+P 2 and P− = 2 , resulting
I−P
in states ρ+ = P+ ρP+ and ρ− = P− ρP− , respectively. For example, collapsing the i qubit to |0i
th
or |1i corresponds to measuring in Pauli basis Z(i) . The probability of outcome ρ+ is tr (ρ+ ), and
analogously for ρ− . We discuss in §5 how measurements are performed in [2, Sec. VII.C].
2 This decomposition always exists and is unique, as bare Pauli elements span (more than) U (2n ).
3
|0i H T • |−i
|0i H •
I Z(0) I Z(1) I X(0) I X(1) I X(0) I X(1) I X(0) X(1) I X(0) 0 with prob.
e[0,0]+i[0,0] {I} 2 2 e[0,0]+i[0,0] {I} 2 2 4 ? c{I, Z(0) } 2 2 4 ? c{I, Z(0) } 2 2 p ∈ [0, 0]
Notational Convention. In slight abuse of notation, throughout this work we may write
the concretization of abstract elements instead of the abstract element itself. For example, for
(0, 1) ∈ R , we write [0, 1] := {v ∈ R | 0 ≤ v ≤ 1} to indicate that it represents an interval.
Where clear from context, we omit ] and write f for f ] . For example, we write [l1 , u1 ] + [l2 , u2 ] for
[l1 , u1 ] +] [l2 , u2 ].
3 Overview
In this section, we showcase Abstraqt by applying it to the example circuit in Fig. 1. Overall,
Abstraqt proceeds analogously to [2, §VII-C], but operates on abstract summands representing
many concrete summands.
Example Circuit. We first discuss the circuit in Fig. 1. Both qubits are initialized to |0i.
The circuit then applies a succession of gates. The abstract representation of the state after the
application of each gate is shown in the gray boxes below the circuit. On the final state, the circuit
I−X
collapses the upper qubit to |−i by applying the projection M− = 2 (0) . Precise circuit simulation
shows that the probability of obtaining |−i is 0, in this case. In the following, we demonstrate how
Abstraqt computes an over-approximation of this probability.
Initial State. The density matrix for the initial state |0i ⊗ |0i can be represented as (see [2]):
I+(−1)0 Z(0) I+(−1)0 Z(1)
ρA = 1I 2 2 .
To translate this to an abstract density matrix, we simply replace some elements by abstract
representations. This gives the following initial abstract state:
I+(−1){0} Z(0) I+(−1){0} Z(1)
ρA = e[0,0]+[0,0]i {I} 2 2 . (6)
Here we abstract booleans as sets, for instance {0}. For conciseness, in Fig. 1 we write x y,
x y, and x y for x + (−1){0} y, x + (−1){1} y, and x + (−1){0,1} y. Further, we represent abstract
complex numbers in polar form with logarithmic length, using real intervals: 1 is represented as
π
e[0,0]+[0,0]i , while the set of complex numbers {1, i} would be over-approximated as e[0,0]+[0, 2 ]i .
Finally, we abstract Pauli elements as sets, such as {I} in Fig. 1 and Eq. (6). In §4, we will clarify
how we store these sets efficiently, for example representing {I} as i{0} · {I} ⊗{I} and {i · I, i · Z (0) }
as i{1} · {I, Z} ⊗{I}.
We now explain how each operation in the circuit modifies this abstract state.
4
Clifford Gate Application. First, the circuit applies one Hadamard gate H to each qubit.
This corresponds to the unitary operator H(0) H(1) , yielding updated abstract density matrix ρB =
(H(0) H(1) )ρA (H(0) H(1) )† . Just as for concrete density matrices (see §2), this amounts to replacing
{I} by (H(0) H(1) ){I}(H(0) H(1) )† = {I},
Z(0) by (H(0) H(1) )Z(0) (H(0) H(1) )† = X(0) , and
Z(1) by (H(0) H(1) )Z(1) (H(0) H(1) )† = X(1) .
I+(−1){0} X(0) I+(−1){0} X(1)
We hence get ρB = e[0,0]+[0,0]i {I} 2 2 .
Non Clifford Gate Application. Next, the circuit applies gate T on the upper qubit. To this
end, we again follow the simulation described in §2. We first decompose T into Pauli elements:
T(0) = d1 I + d2 Z(0) , where d1 ≈ e−0.1+0.4i and d2 ≈ e−1.0−1.2i . Replacing T with its decomposition,
we can then write ρT = T ρB T † , using Eq. (5), as:
I+(−1){0} X(0) I+(−1){0} X(1)
†
ρT = d1 I + d2 Z(0) e[0,0]+[0,0]i {I} 2 2 d1 I + d2 Z(0) .
where
Merging Summands. Unfortunately, simply applying T gates as shown above may thus increase
the number of summands in the abstract density matrix by a factor of 4. To counteract this,
our key idea is to merge summands, by allowing a single abstract summand to represent multiple
concrete ones, resulting in reduced computation overhead at the cost of lost precision. Our abstract
representation allows for a straightforward merge: we take the union of sets and join intervals.
Specifically, for complex numbers, we join the intervals in their representation, obtaining:
c := c1 t c2 t c3 t c4 = e[−2.0,−0.2]+[−1.6,1.6]i .
Finally, we introduce the symbol ? to denote how many concrete summands an abstract summand
represents. Altogether, merging the summands in ρT yields:
I+(−1){0,1} X(0) I+(−1){0} X(1)
ρC = 4 ? e[−2.0,−0.2]+[−1.6,1.6]i {I, Z(0) } 2 2 .
Note that for an abstract element x, r ? x is not equivalent to r · x. For example, 2 ? {0, 1} =
{0, 1} + {0, 1} = {0, 1, 2}, while 2 · {0, 1} = {0, 2}.
Measurement. After the T gate, the circuit applies two additional CN OT gates, resulting in
the updated density matrix:
I+(−1){0,1} X(0) X(1) I+(−1){0} X(0)
ρD = 4 ? e[−2.0,−0.2]+[−1.6,1.6]i {I, Z(0) } 2 2 .
5
I−X
Finally, the circuit applies the projection M− = 2 (0) . To update the density matrix accordingly,
we closely follow [2], which showed that measurement can be reduced to simple state updates
through a case distinction on M− and the state ρ. If (i) the measurement Pauli (here −X(0) ) com-
mutes with the product Paulis (here (−1){0,1} X(0) X(1) and (−1){0} X(1) ) and (ii) the measurement
Pauli cannot be written as a product of the product Paulis, the density matrix after measurement
is 0. We will explain in §5.2 how our abstract domain allows both of these checks to be performed
efficiently.
Here, both conditions are satisfied, and we hence get the final state ρM 1 = 0. We can then com-
pute the probability of such an outcome by p = tr (ρM 1 ) = 0. Thus, our abstract representation
was able to provide a fully precise result.
Imprecise Measurement. Suppose now that instead of the measurement in Fig. 1, we had
I+Z
collapsed the lower qubit to |0i by applying projection M0 = 2 (1) .
To derive the resulting state, we again follow [2] closely. We note that the measurement Pauli
+Z(1) (i) anticommutes with the first product Pauli (−1){0,1} X(0) X(1) and commutes with the
second one (−1){0} X(1) and (ii) commutes with the initial Paulis {I, Z(1) }. In this case, we get
that the density matrix is unchanged, thus ρM 2 = ρD . To compute the trace of this matrix, we
follow the procedure outlined in §5.4. We omit intermediate steps here and get: 3
Thus, our abstraction here is highly imprecise and does not yield any information on the measure-
ment result (we already knew that the probability must lie in [0, 1]).
4 Abstract Domains
In the following, we formalize all abstract domains (Tab. 2) underlying our abstract representation
of density matrices ρ along with key abstract transformers operating on them (Tab. 3). We
note that all abstract transformers introduced here naturally also support (partially) concrete
arguments.
Example Elements. Tab. 2 provides example elements of each abstract domain and exem-
plifies the respective concretization functions γ : X → 2X . While Tab. 2 correctly distinguishes
abstract elements from their concretization, in the following, when describing operators we write
concretizations instead of abstract elements (as announced in §2).
b + c = {b + c | b ∈ b, c ∈ c}. (7)
We define multiplication of abstract booleans analogously. Further, we define the join of two
abstract booleans as their set union.
Analogously to booleans, our abstract domain Z4 consists of subsets of Z4 , where addition,
subtraction, multiplication, and joins works analogously to abstract booleans. Further, we can
straight-forwardly embed abstract booleans into Z4 by mapping 0 to 0 and 1 to 1.
Real Numbers. We abstract real numbers by intervals [a, a] ⊆ R ∪ {±∞}, and denote the set
of such intervals by R. Interval addition, interval multiplication, and the cosine and exponential
transformer on intervals are defined in their standard way, see §2.
3 We used the precise interval bounds for c here, not the rounded values provided earlier.
6
Table 2: Example elements on abstract domains.
We can compute the multiplication and join of two abstract complex numbers c = e[r,r]+[ϕ,ϕ]i
0 0 0 0
and c0 = e[r ,r ]+[ϕ ,ϕ ]i as
0 0 0 0
c · c0 = e[r+r ,r+r ]+[ϕ+ϕ ,ϕ+ϕ ]i and (8)
0 [min(r,r 0 ),max(r,r 0 )]+[min(ϕ,ϕ0 ),max(ϕ,ϕ0 )]i
ctc =e . (9)
Again, simple arithmetic shows that Eqs. (8)–(9) are sound.
We compute the real part of an abstract complex number c = e[r,r]+[ϕ,ϕ]i as
Re(c) = exp([r, r]) · cos [ϕ, ϕ] , (10)
where we rely on interval transformers to evaluate the right-hand side. The soundness of Eq. (10)
follows from the standard formula to extract the real part from a complex number in polar coor-
dinates. We will later use Eq. (10) to compute tr (ρ). To this end, we also need the transformer
G
ib = {ib } ∈ C. (11)
b∈b
Pauli Elements. Recall that a Pauli element P ∈ Pn has the form P = iv · P (0) ⊗ · · · ⊗ P (n−1) ,
for v in Z4 and P (k) ∈ {I, X, Y, Z}. We therefore parametrize P as a prefactor v (in logi space)
and n bare Paulis P (k) .
7
Accordingly, we parametrize abstract Pauli elements P ∈ P n as iv · P (0) ⊗ · · · ⊗ P (n−1) , where
v ∈ Z4 is a set of possible prefactors and P (k) ⊆ {X, Y, Z, I2 } are sets of possible Pauli matrices.
Formally, we interpret P as the set of all possible outcomes when instantiating all sets:
n−1
γ(P ) = iv · ⊗ P (i) v ∈ v, P (i) ∈ P (i) .
i=0
where we can evaluate the summands in the right-hand side of Eq. (13) by precomputing them
for all possible sets of Pauli matrices
and Q . Then, we compute the sum using Eq. (7).
P (i) (i)
Analogously, we can evaluate b P (i) Q(i) by precomputation. The soundness of Eq. (12) follows
from applying the multiplication component-wise, and then separating out prefactors from bare
Paulis.
We also define the conjugation of an abstract Pauli element P with k-qubit gate U padded to
n qubits as:
† †
U(i) P U(i) = U(i) iv · P (0:i) ⊗ P (i:i+k) ⊗ P (i+k:n) U(i)
(i:i+k)
U †)
= iv+f(U P · P (0:i) ⊗ b(U P (i:i+k) U † ) ⊗ P (i+k:n) , (14)
where P (i:j) denotes P (i) ⊗ · · · ⊗ P (j−1) . Because k is typically small, and all possible gates U
are known in advance, we can efficiently precompute f(U P (i:i+k) U † ) and b(U P (i:i+k) U † ). We
note that this only works if the result of conjugation is indeed an (abstract) Pauli element—if not,
this operation throws an error. The soundness from Eq. (14) follows from applying U to qubits i
through i + k, and then separating out prefactors from bare Paulis.
We define the commutator P Q of two abstract Pauli elements P and Q as
n
n−1 n−1 X
(i) (i)
v
i · ⊗ P w
i · ⊗ Q = P (i) Q(i) . (15)
i=0 i=0
i=1
Here, we evaluate the sum using Eq. (7), and efficiently evaluate P (i) Q(i) ∈ B by precomputing:
n o
P (i) Q(i) = P (i) Q(i) P (i) ∈ P (i) , Q(i) ∈ Q(i) .
The soundness of Eq. (15) can be derived from the corresponding concrete equation, which can be
verified through standard linear algebra manipulations.
We define the join of abstract Pauli elements as
n−1 n−1 n−1
iv ⊗ P (i) t iw ⊗ Q(i) = ivtw ⊗ P (i) ∪ Q(i) , (16)
i=0 i=0 i=0
8
Abstract Density Matrices. The concrete and abstract domains introduced previously allow
us to represent an abstract density matrix ρ ∈ D as
n
I+(−1)bj Qj
Y
ρ=r?c·P · 2 . (18)
j=1
5 Abstract Transformers
We now formalize the abstract transformers used by Abstraqt to simulate quantum circuits. The
soundness of all transformers is straightforward, except for the trace transformer (§5.4) which we
discuss in App. A.
Initialization. We start from initial state ⊗ni=1 |0i, which corresponds to density matrix
n n
I+Z(j) I+(−1){0} Z(j)
Y Y
ρ= 2 = 1 ? e[0,0]+i[0,0] · i{0} {I} 2 ,
j=1 j=1
as established in [2, Sec. III]. We note that we can prepare other starting states by applying
appropriate gates to the starting state ⊗ni=1 |0i.
9
5.2 Measurement
We now describe how to perform Pauli measurements, by extending the (concrete) stabilizer sim-
ulation to abstract density matrices. The correctness of the concrete simulation was previously
established in [2, Sec. VII.C]—the correctness of the abstraction is immediate.
Concrete simulation of measurement distinguishes two cases: either (i) R commutes with all
Qj or (ii) R anti-commutes with at least one Qj . Note that as the Qj are concrete in an abstract
state ρ, those two cases translate directly to the abstract setting. We now describe both cases for
concrete and abstract simulation.
Background: Concrete Case (i). In this case, we assume R commutes with all Qj . Focusing
on a single summand ρi of ρ, measurement maps it to (see [2]):
n
I+(−1)bij Qj
Y
ρi,+ = ci I+R I+R
2 Pi 2 2 . (22)
j=1
Let us first introduce the notation {(−1)bij Qj } R, denoting that R can be written as a prod-
uct of selected Pauli elements from {(−1)bij Qj }. Symmetrically, we write {(−1)bij Qj } 6 R if R
Qn I+(−1)bij Qj
cannot be written as such a product. As shown in [2], if {(−1)bij Qj } R then I+R2 j=1 2
Qn I+(−1)bij Qj I+R Qn I+(−1)bij Qj
is equal to j=1 2 and if {(−1)bij
Qj } 6 R then 2 j=1 2 is null. Further,
using that R2 = I, we get from Eq. (22) that if Pi commutes with R, ρi,+ is equal to ρi , otherwise,
Pi anti-commutes with R and ρi,+ is null. Putting it all together, we finally get:
n
I+(−1)bij Qj
m m
if {(−1)bij Qj } R and R Pi = 0,
Q
X X ci Pi 2
ρ+ = ρi,+ = j=1 (23)
0 if {(−1)bij Qj } 6 R or R Pi = 1.
i=1 i=1
Abstract Case (i). Let us first define u and 6 u for a concrete R, concrete Qj and abstract
bj . We say {(−1)bj Qj } u R if for all j, for all bj ∈ γ(bj ), we have {(−1)bj Qj } R. Similarly,
we say {(−1)bj Qj } 6 u R if for all j, for all bj ∈ γ(bj ), we have {(−1)bj Qj } 6 R. Note that u
and 6 u are under-approximations, and there can exist some R and {(−1)bj Qj } such that neither
apply. Using those two abstract relations, we get the abstract transformer:
n
I+(−1)bj Qj
if {(−1)bj Qj } u R and R P = {0},
Q
cP 2
j=1
ρ+ = r ? 0 if {(−1)bj Qj } 6 u R or R P = {1}, (24)
n bj
I+(−1) Q
otherwise.
Q j
(c t {0}) P
2
j=1
We can evaluate Eq. (24) by relying on the abstract transformers from Tab. 3 and by evaluat-
ing u
as discussed shortly.
10
Background: Concrete Case (ii). We now suppose R anti-commutes with at least one Qj . In
this case, we can rewrite ρ such that R anti-commutes with Q1 , and commutes with all other Qj .
Specifically, we can select any Qj ∗ which anti-commutes with R, swap bij ∗ and Qj ∗ with bi1 and
Q1 , and replace all other Qj anti-commuting with R by Q1 Qj (and analogously bij by bij + bi1 ),
which leaves ρ invariant (see [2]). Assuming ρ is the result after this rewrite, we have:
n
(
X 0
0 I+(−1) R
Y I+(−1)bij Qj Pi if R Pi = 0,
ρ+ = 1
2 c i Pi , where Pi =
0
(25)
i
2
j=2
2
(−1) Pi Q1 if R Pi = 1.
bi1
Overall, after rewriting ρ as above, Eq. (25) replaces Pi by Pi0 , bi1 by 0, and Q1 by R.
Abstract Case (ii). After applying the same rewrite as in the concrete case, directly abstracting
Eq. (25) yields:
n P
if R P = {0},
{0} bj
I+(−1) Qj
R
Y
ρ+ = r ? 21 cP 0 I+(−1)
2 2 , where P 0
= (−1) b1
P Q1 if R P = {1}, (26)
P t (−1) P Q1 otherwise.
b1
j=2
Again, we can evaluate Eq. (26) by relying on the abstract transformers from Tab. 3.
Joining Both Measurement Results. For measurements occurring within a quantum circuit,
stabilizer simulation generally requires randomly selecting either ρ+ or ρ− with probability tr(ρ+ )
and tr(ρ− ), respectively, and then continues only with the selected state. In contrast, Abstraqt
can join both measurement outcomes into a single abstract state ρ+ t ρ− , as the Qj are the same
in both. This allows us to pursue both measurement outcomes simultaneously, as we demonstrate
in §7.
Background: Concrete case. We first note that {(−1)bj Qj } R holds if and only if there
exist some x ∈ B such that:
n
!
Y xj
R= (−1)bj Qj . (27)
j=1
Eq. (28) has a solution if and only if R commutes with all the Qj , in which case this solution x is
unique (see [2]). Hence, to check if {(−1)bj Qj } R, we can first verify whether R Qj = 0 for all
j, and if so, check if the unique x satisfying Eq. (28) also satisfies Eq. (27).
Background: Finding x for Eq. (28). To compute this solution x, the stabilizer simulation
relies critically on an isomorphism g between Pauli matrices {I, X, Y, Z} and B2 .
Specifically, g maps I to ( 00 ), X to ( 10 ), Y to ( 11 ), and Z to ( 01 ). Further, g extends naturally
n
to bare Pauli elements R ∈ b(Pn ) and tuples Q = (Q1 , . . . , Qn ) ∈ b(Pn ) by:
(0)
(0)
(0)
g(R ) g(Q1 ) ··· g(Qn )
g(R) = .. and g(Q) = .. .. .. ,
. . . .
(n−1) (n−1) (n−1)
g(R ) g(Q1 ) ··· g(Qn )
11
where g(R) ∈ B2n×1 and g(Q) ∈ B2n×n . We can naturally extend g to Pn , by defining g(R) =
g(b(R)).
This isomorphism g is designed so that the product of bare Pauli elements ignoring prefactors
corresponds to a component-wise addition of encodings:
g(P1 P2 ) = g(P1 ) + g(P2 ). (29)
Using Eq. (29), we can obtain solution candidates x for Eq. (28) by solving a system of linear
equations using Gaussian elimination modulo 2:
!
n n
! Q xj P
g (R) = g Qj = g(Qj )xj = g(Q)x. (30)
j=1 j=1
Because in our case, g(Q) is over-determined and has full rank, Eq. (30) either has no solution, or
a unique solution x.
Background: Checking prefactors. Once we have found the unique x (if it exists) satisfying
Eq. (28) as described above, we need to check if it also satisfies Eq. (27). It is enough to check if
the prefactors match:
! x
Y
f (R) = f (−1)bj xj Qj j ,
j
or equivalently:
x !
Y X
f (R) − f Qj j − 2 bj xj = 0,
j j
if ∃j, R Qj = 1,
E
!
F(R, Q, b) = n
Q xj n (31)
xj bj otherwise,
P
f(R) − f
Qj −2
j=1 j=1
where x is the unique value such that g(R) = g(Q)x and E indicates there is no such x. We then
have that {(−1)bj Qj } R if and only if F(R, Q, b) = 0, and {(−1)bj Qj } 6 R if and only if
F(R, Q, b) 6= 0.
F for abstract bj . For abstract values bj , we define F : Pn × Pnn × Bn → 2Z4 ∪{E} as follows:
if ∃j, R Qj = 1,
{E}
!
F(R, Q, b) = n
Q xj n (32)
xj bj otherwise.
P
f(R) − f
Qj −2
j=1 j=1
F for abstract bj and R. To compute the trace of a state (see §5.4), we further extend Eq. (31)
to abstract bj and abstract R, defining F : P n × Pnn × Bn → 2Z4 ∪{E} as:
if ∃j.R Qj = {1},
{E} !
n n
x
if ∀j.R Qj = {0},
Q P
f(R) − f Qj j − 2
xj bj
F(R, Q, b) = j=1 j=1 (33)
!
n n
f(R) − f Q Qxj − 2 P x b ∪ {E} otherwise,
j j j
j=1 j=1
12
Here, evaluating Eq. (33) requires evaluating Qbj for an abstract boolean b, which we define natu-
rally as
{Qj }
if b = {1},
b
Qj := {I} if b = {0},
{Qj , I} if b = {0, 1}.
Further, Eq. (34) requires over-approximating all x which satisfy g(R) = g(Q)x. Here, we naturally
extend g to abstract Paulis by joining their images. For instance, we have that g({X, Y }) =
{1}
{( 10 )} t {( 11 )} = {0,1} . We then view g(R) = g(Q)x as a system of linear equations b = Ax,
where the left-hand side consists of abstract booleans b ∈ B2n . We then drop all equations in this
equation system where the left-hand side is {0, 1}, as they do not constrain the solution space.
This updated system is fully concrete, hencePp we can solve it using Gaussian elimination. We get
either no solution, or a solution space y + k=1 λk uk , where y is a possible solution and u1 , ..., up
is a possibly empty basis of the null solution space.
PIn the case of no solution, x is not needed in
m
Eq. (33). Otherwise, we can compute xj as {yj + k=1 λk uk,j | λk ∈ B}.
5.4 Trace
Recall that the probability of obtaining state ρ+ when measuring ρ is tr (ρ+ ). We now describe
how to compute this trace using F defined above.
Background: Concrete Trace. Following [2], we compute the trace of a density matrix ρ by:
m
X
tr (ρ) = Re ci iF(P,Q,bi ) , (35)
i=1
where we define iE := 0. Because the trace of a density matrix is always real, Re(·) is redundant,
but will be convenient to avoid complex traces in our abstraction.
6 Implementation
In the following, we discuss our implementation of the abstract transformers from §4 and §5 in
Abstraqt.
Language and Libraries. We implemented Abstraqt in Python 3.8, relying on Qiskit 0.40.0 [14]
for handling quantum circuits, and a combination of NumPy 1.20.0 [15] and Numba 0.54 [16] to
handle matrix operations.
Qn I+(−1)bj Qj
Bit Encodings. An abstract density matrix ρ = r ? c · P · j=1 2 is encoded as a
tuple (r, c, P , b1 , ..., bn , Q1 , . . . , Qn ). To encode the concrete Pauli matrices Qj , we follow concrete
stabilizer simulation encodings such as [17] and encode Pauli matrices P using two bits g(P ) (see
§5.3). To encode abstract elements of a finite set we use bit patterns. For example, we encode
b1 = {1, 0} ∈ B as 112 , where the least significant bit (i.e. the right-most bit) indicates that
0 ∈ b1 . Analogously, we encode v = {3, 0} ∈ Z4 as 10012 . Further, we encode {Z, Y} as 11002 ,
where the indicator bits correspond to Z, Y, X, and I, respectively, from left to right. Hence the
abstact Pauli P = ({0, 3}, {Z, Y}, {X}) would be represented as (10012 , 11002 , 00102 ).
13
Implementing Transformers. The abstract transformers on abstract density matrices can be
implemented using operations in B, Z4 , C, and P 1 . As B, Z4 , and P 1 are small finite domains,
we can implement operations in these domains using lookup tables, which avoids the need for bit
manipulation tricks. While such tricks are applicable in our context (e.g., [2] uses bit manipulations
†
to compute H(i) P H(i) for P ∈ Pn ), they are generally hard to come up with [18]. In contrast, the
efficiency of our lookup tables is comparable to that of bit manipulation tricks, without requiring
new insights for new operations.
For example, to evaluate {} + {0} over B using Eq. (7), we encode the first argument {} as 00
and the second argument {0} as 01. Looking up entry (00, 01) in a two-dimensional pre-computed
table then yields 00, the encoding of the correct result {}. We note that we cannot implement
this operation directly using a XOR instruction on encodings, as this would yield incorrect results:
00 XOR 01 = 01 ' {0}, which is incorrect.
Gaussian Elimination. To efficiently solve equations modulo two as discussed in §5, we imple-
mented a custom Gaussian elimination relying on bit-packing (i.e., storing 32 boolean values in
a single 32-bit integer). In the future, it would be interesting to explore if Gaussian elimination
could be avoided altogether, as suggested by previous works [2, 17].
We check this inclusion for multiple selected samples of xi and xi ∈ xi (typically corner cases).
This approach is highly effective at catching implementation errors, which we have found in
multiple existing tools as shown in §7.
7 Evaluation
We now present our evaluation of Abstraqt, demonstrating that it can establish circuit properties
no existing tool can establish.
7.1 Benchmarks
To evaluate Abstraqt, we generated 8 benchmark circuits, summarized and visualized in Tab. 4.
Benchmark Circuit Generation. Each circuit operates on 62 qubits, partitioned into 31 upper
qubits and 31 lower qubits. We picked the limit of 62 qubits because our baseline ESS (discussed
shortly) only supports up to 63 qubits; Abstraqt is not subject to such a limitation.
Each circuit operates on initial state |0i and is constructed to ensure that all lower qubits are
eventually reverted to state |0i. We chose this invariant as it can be expressed for each of the
evaluated tools, as we will show in §7.2. Further, as some tools can only check this for one qubit
at a time, we only check if the very last qubit is reverted to |0i, instead of running 31 independent
checks (which would artificially slow down some baselines). Note that this check is of equivalent
difficulty for all lower qubits.
Most of the circuits are built from three concatenated subcircuits. First c1 which only modifies
the upper qubits, then c2 which only modifies the lower qubits (potentially using gates controlled
by the upper qubits) and finally c3 which is generated by inverting c2 and optimizing the result
using PyZX [19]. Thus, running c1 ; c2 ; c3 on initial state |0i reverts the lower qubits to |0i, but
this is hard to establish as c3 is obfuscated by an optimization pass. Further, in all but the first
two circuits, the upper and lower qubits are entangled with each other. Tab. 4 details how c1 and
c2 were generated for each circuit. Note that Cliff+T;H;CZ+RX and CCX+H;Cliff slighter differ
from this construction. In the former, the circuit is built as c1 ; ch ; c2 ; c3 ; ch where ch applies an H
gate to each of the lower qubits in the circuit. In the latter, the circuit c2 also modifies the upper
14
Table 4: Description of benchmark circuits, where upper = {1, . . . , 31} and lower = {32, . . . , 62}.
15
qubits using gates controlled by the lower ones. Overall, our benchmark covers various gates, with
all applying Clifford gates, three applying T gates, two applying CCX gates, one applying RX π4
gates (one qubit gate, rotation around the X axis of π4 radians), and one applying RZ2 gates (one
qubit gate, rotation around the Z axis of 2 radians).
The last benchmark applies internal measurements. It first generates a GHZ state √12 |0 · · · 0i+
√1 |1 · · · 1i, and collapses it to |0 · · · 0i or |1 · · · 1i by measuring the first qubit. Then, it resets all
2
qubits to |0i except for the first one. It then repeats this process, with the first qubit starting
in either |0i or |1i. Thus, the state before measurement is either √12 |0 · · · 0i + √12 |1 · · · 1i or
√1 |0 · · · 0i − √1 |1 · · · 1i, but every repetition still resets all lower qubits to |0i.
2 2
Discussion. Overall, all benchmarks are constructed to revert the lower qubits to |0i, but in a
non-obvious way. As fully precise simulation of most benchmarks is unrealistic, we expect that
over-abstraction is typically necessary to establish this fact.
7.2 Baselines
We now discuss how we instantiated existing tools to establish that a circuit c evolves a qubit q to
state |0i. Overall, we considered two tools based on stabilizer simulation (ESS [5] and QuiZX [4]),
one tool based on abstract interpretation (YP21 [20], in two different modes), and one tool based
on state vectors (Statevector as implemented by Qiskit [14]).
ESS. Qiskit [14] provides an extended stabilizer simulator implementing the ideas published in [5]
which (i) decomposes quantum circuits into Clifford circuits, (ii) simulates these circuits separately,
and (iii) performs measurements by an aggregation across these circuits. To check if a circuit c
consistently evolves a qubit q to |0i, we check if c extended by a measurement of q always yields
0. To run our simulation, we used default parameters.
QuiZX. QuiZX [4] improves upon [5] by alternating between decomposing circuits (splitting
non-Clifford gates into Clifford gates) and optimizing the decomposed circuits (which may further
reduce non-Clifford gates). We can use QuiZX to establish that a qubit is in state |0i by "plugging"
output q as |1i and establishing that the probability of this output is zero. 4
YP21. Like Abstraqt, YP21 [20] also uses abstract interpretation, but relies on projectors
instead of stabilizer simulation. Specifically, it encodes the abstract state of selected (small) subsets
of qubits as projectors {Pj }j∈J , which constrain the state of these qubits to the range of Pj .
To check if a qubit q is in state |0i, we check if the subspace resulting from intersecting the range
of all Pj is a subset of the range of I + Z(q) —an operation which is natively supported by YP21.
When running YP21, we used the two execution modes suggested in its original evaluation [20].
The first mode tracks the state of all pairs of qubits, while the second considers subsets of 5 qubits
that satisfy a particular condition (for details, see [20, §9]). Because [20] does not discuss which
execution mode to pick for new circuits, we evaluated all circuits in both modes.
We note that because YP21 does not support CX(a, b) for a > b, we instead encoded such
gates as H(a); H(b); CX(b, a); H(b); H(a).
Statevector. Qiskit [14] further provides a simulator based on state vectors, which we also used
for completeness.
Abstraqt. In Abstraqt, we can establish that a qubit is in state |0i by measuring the final
abstract state ρ in basis Z(i) and checking if the probability of obtaining |1i is 0.
16
Table 5: Results when running simulators on benchmarks from Tab. 4. OOM indicates running out of memory,
unsupp. indicates the tool does not support an operation present in the circuit, and incorr. indicates incorrect
simulation results.
7.3 Results
Tab. 5 summarizes the results when using all tools discussed in §7.2 to establish that the last qubit
in each circuit is in state |0i. Overall, it demonstrates that while Abstraqt can establish this
for all benchmarks within minutes, QuiZX can only establish it for one benchmark and all other
tools cannot establish it for any circuit. Further, we found that for some circuits the established
simulation tool ESS yields incorrect results. We now discuss the results of each tool in more details.
MeasureGHZ. Importantly, no baseline tool except Abstraqt can simultaneously simulate both
outcomes of a measurement, without incurring an exponential blow-up. Therefore, for MeasureGHZ,
we consider internal measurements as an unsupported operation in these tools. We note that we
could randomly select one measurement outcome and simulate the remainder of the circuit for
it, but then we can only establish that the final state is |0i for a given sequence of measurement
outcomes. In contrast, a single run of Abstraqt can establish that the final state is |0i for all
possible measurement outcomes (see also §5.2).
ESS. Surprisingly, ESS does not simulate circuits Cliff;Cliff and Cliff+T;Cliff correctly.
Instead, it samples the impossible measurement of 1 around 50% of cases. Interestingly, smaller cir-
cuits generated with the same process are handled correctly. It is reassuring to see that Abstraqt
allows us to discover such instabilities in established tools.
Note that it may be surprising that ESS can simulate circuits containing many T gates—this is
because Qiskit can establish that the Clifford+T part of circuit Cliff+T;Cliff is irrelevant when
measuring the last qubit. In contrast, for most remaining circuits, ESS runs out of memory as it
decomposes the circuit into exponentially many Clifford circuits.
QuiZX. QuiZX also fails to simulate Cliff;Cliff, which we conjecture is due to a bug for
circuits that do not contain non-Clifford gates. After adding a single T gate, or when running
Cliff+T;Cliff, simulation is successful. However, we note that Abstraqt is significantly faster
than QuiZX, possibly because it does not need to repeatedly optimize circuits.
The results on the remaining circuits are analogous to ESS, except that QuiZX sometimes times
out instead of running out of memory. Further, we note that QuiZX runs into an internal error
when simulating RZ2 +H;CX.
YP21. YP21 typically either times out, throws an internal error, does not support a relevant
operation (e.g., measurements or RZ2 ), or returns incorrect results. The latter is because on some
circuits, mode 2 choses an empty set of projectors, which leads to trivially unsound results. When
YP21 does terminate, it is too imprecise to establish that the last qubit is in state |0i.
17
Statevector. Unsurprisingly, statevector simulation cannot handle the circuits in Tab. 5. This
is because it requires space exponential in the number of qubits, which precludes simulating any
of the benchmarks.
8 Related Work
Here, we discuss works related to our goal and methods.
Quantum Abstract Interpretation. Some existing works have investigated abstract interpre-
tation for simulating quantum circuits [20, 21, 22]. As [20] is not specialized for Clifford circuits,
it is very imprecise on the circuits investigated in §7: it cannot derive that the lower qubits are
|0i for any of them. While [21, 22] are inspired by stabilizer simulation, they only focus on de-
termining if certain qubits are entangled or not, whereas Abstraqt can extract more precise
information about the state. Further, both tools are inherently imprecise on non-Clifford gates—
in contrast, a straight-forward extension of Abstraqt can treat some non-Clifford gates precisely
at the exponential cost of not merging summands.
Stabilizer Simulation. The Gottesman-Knill theorem [1] established that stabilizers can be
used to efficiently simulate Clifford circuits. Stim [17] is a recent implementation of such a simu-
lator, which only supports non-Clifford gates and Pauli measurements.
Stabilizer simulation was extended to allow for non-Clifford gates at an exponential cost, while
still allowing efficient simulation of Clifford gates [2, §VII-C]. Various works build upon this in-
sight, handling Clifford gates efficiently but suffering from an exponential blow-up on non-Clifford
gates [3, 4, 5, 6, 7]. In our evaluation, we demonstrate that Abstraqt extends the reach of
state-of-the-art stabilizer simulation by comparing to two tools from this category, ESS [5] (chosen
because it is implemented in the popular Qiskit library) and QuiZX [4] (chosen because it is a
recent tool reporting favorable runtimes).
18
Finally, the work [25] automatically generates rich invariants, but is exponential in the number of
qubits, limiting its use to small circuits.
9 Conclusion
In this work, we have demonstrated that combining abstract interpretation with stabilizer simula-
tion allows to establish circuit properties that are intractable otherwise.
Our key idea was to over-abstract the behavior of non-Clifford gates in the generalized stabilizer
simulation of Aaronson and Gottesman [2] by merging summands in the sum representation of
the quantum states density matrix. Our carefully chosen abstract domain allows us to define
efficient abstract transformers that approximate each of the concrete stabilizer simulation functions,
including measurement.
References
[1] Daniel Gottesman. “The Heisenberg Representation of Quantum Computers”. Technical Re-
port arXiv:quant-ph/9807006. arXiv (1998).
[2] Scott Aaronson and Daniel Gottesman. “Improved Simulation of Stabilizer Circuits”. Physical
Review A 70, 052328 (2004).
[3] Robert Rand, Aarthi Sundaram, Kartik Singhal, and Brad Lackey. “Extend-
ing gottesman types beyond the clifford group”. In The Second International
Workshop on Programming Languages for Quantum Computing (PLanQC 2021).
(2021). url: https://pldi21.sigplan.org/details/planqc-2021-papers/9/
Extending-Gottesman-Types-Beyond-the-Clifford-Group.
[4] Aleks Kissinger and John van de Wetering. “Simulating quantum circuits with ZX-calculus
reduced stabiliser decompositions”. Quantum Science and Technology 7, 044001 (2022).
[5] Sergey Bravyi, Dan Browne, Padraic Calpin, Earl Campbell, David Gosset, and Mark
Howard. “Simulation of quantum circuits by low-rank stabilizer decompositions”. Quantum
3, 181 (2019).
[6] Hakop Pashayan, Oliver Reardon-Smith, Kamil Korzekwa, and Stephen D. Bartlett. “Fast
estimation of outcome probabilities for quantum circuits”. PRX Quantum 3, 020361 (2022).
[7] “Classical simulation of quantum circuits with partial and graphical stabiliser decompositions”.
Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022).
[8] Patrick Cousot and Radhia Cousot. “Abstract Interpretation: A Unified Lattice Model for
Static Analysis of Programs by Construction or Approximation of Fixpoints”. In Proceedings
of the 4th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages.
Pages 238–252. POPL ’77New York, NY, USA (1977). ACM.
[9] Patrick Cousot and Radhia Cousot. “Abstract interpretation frameworks”. Journal of logic
and computation 2, 511–547 (1992).
[10] Bruno Blanchet, Patrick Cousot, Radhia Cousot, Jérome Feret, Laurent Mauborgne, Antoine
Miné, David Monniaux, and Xavier Rival. “A static analyzer for large safety-critical software”.
ACM SIGPLAN Notices 38, 196–207 (2003).
[11] Francesco Logozzo and Manuel Fähndrich. “Pentagons: A weakly relational abstract domain
for the efficient validation of array accesses”. Science of Computer Programming 75, 796–
807 (2010).
[12] Timon Gehr, Matthew Mirman, Dana Drachsler-Cohen, Petar Tsankov, Swarat Chaudhuri,
and Martin Vechev. “AI2: Safety and Robustness Certification of Neural Networks with
Abstract Interpretation”. In 2018 IEEE Symposium on Security and Privacy (SP). Pages
3–18. San Francisco, CA (2018). IEEE.
[13] Michael A. Nielsen and Isaac L. Chuang. “Quantum computation and quantum information:
10th anniversary edition”. Cambridge University Press. (2010).
19
[14] Héctor Abraham et al. “Qiskit: An open-source framework for quantum computing” (2019).
[15] Charles R. Harris, K. Jarrod Millman, Stéfan J. van der Walt, Ralf Gommers, Pauli Vir-
tanen, David Cournapeau, Eric Wieser, Julian Taylor, Sebastian Berg, Nathaniel J. Smith,
Robert Kern, Matti Picus, Stephan Hoyer, Marten H. van Kerkwijk, Matthew Brett, Allan
Haldane, Jaime Fernández del Río, Mark Wiebe, Pearu Peterson, Pierre Gérard-Marchant,
Kevin Sheppard, Tyler Reddy, Warren Weckesser, Hameer Abbasi, Christoph Gohlke, and
Travis E. Oliphant. “Array programming with NumPy”. Nature 585, 357–362 (2020).
[16] Siu Kwan Lam, Antoine Pitrou, and Stanley Seibert. “Numba: a LLVM-based Python JIT
compiler”. In Proceedings of the Second Workshop on the LLVM Compiler Infrastructure
in HPC. Pages 1–6. LLVM ’15New York, NY, USA (2015). Association for Computing
Machinery.
[17] Craig Gidney. “Stim: a fast stabilizer circuit simulator”. Quantum 5, 497 (2021).
[18] Henry S. Warren. “Hacker’s delight”. Addison-Wesley Professional. (2012). 2nd edition.
[19] Aleks Kissinger and John van de Wetering. “PyZX: Large Scale Automated Diagrammatic
Reasoning”. In Bob Coecke and Matthew Leifer, editors, Proceedings 16th International
Conference on Quantum Physics and Logic, Chapman University, Orange, CA, USA., 10-14
June 2019. Volume 318 of Electronic Proceedings in Theoretical Computer Science, pages
229–241. Open Publishing Association (2020).
[20] Nengkun Yu and Jens Palsberg. “Quantum abstract interpretation”. In Proceedings of the
42nd ACM SIGPLAN International Conference on Programming Language Design and Imple-
mentation. Pages 542–558. PLDI 2021New York, NY, USA (2021). Association for Computing
Machinery.
[21] Simon Perdrix. “Quantum Entanglement Analysis Based on Abstract Interpretation”. In
Proceedings of the 15th International Symposium on Static Analysis. Pages 270–282. SAS
’08Berlin, Heidelberg (2008). Springer-Verlag.
[22] Kentaro Honda. “Analysis of Quantum Entanglement in Quantum Programs using Stabilizer
Formalism”. Electronic Proceedings in Theoretical Computer Science195 (2015).
[23] Kesha Hietala, Robert Rand, Shih-Han Hung, Liyi Li, and Michael Hicks. “Proving Quantum
Programs Correct”. Leibniz International Proceedings in Informatics (LIPIcs) 193, 21:1–
21:19 (2021).
[24] Christophe Chareton, Sébastien Bardin, François Bobot, Valentin Perrelle, and Benoît Val-
iron. “An automated deductive verification framework for circuit-building quantum programs”.
In Programming Languages and Systems. Pages 148–177. Springer International Publish-
ing (2021).
[25] Mingsheng Ying, Shenggang Ying, and Xiaodi Wu. “Invariants of quantum programs: Char-
acterisations and generation”. SIGPLAN Not. 52, 818–832 (2017).
20
A Abstract Transformers Soundness
Here, we prove the soundness of the trace transformer Eq. (36):
Theorem A.1. Trace. For all ρ ∈ D we have
γ ◦ tr (ρ) ⊇ tr ◦γ(ρ).
Proof. The over-approximation F# follows closely the form of F, where the first term f(P ) over-
approximates the prefactors of P and secondQn term over-approximates the prefactors originating
y
from the solution space for y of b(P ) = b( j=1 Qj j ). Overall, we have:
( r n
)!
X Y bij
1
tr ◦γ (ρ) = tr ci Pi 2
I + (−1) Qj ci ∈ c, Pi ∈ P , bij ∈ bj
i=1 j=1
( r n
! )
X Y bij
1
= tr ci Pi 2
I + (−1) Qj ci ∈ c, Pi ∈ P , bij ∈ bj
i=1 j=1
( r )
X F(P,Q,bij )
= Re ci i ci ∈ c, Pi ∈ P , bij ∈ bj Concrete trace, §5.4
i=1
r
X
Re {ci ∈ c} · iF({Pi ∈P },Q,{bij ∈bj })
=
i=1
r
!
F] (P ,Q,bj )
X
⊆γ Re c · i Soundness of transf.
i=1
]
(P ,Q,bj )
= γ r · Re c · iF Property of intervals
= γ ◦ tr (ρ) .
21
0 −i
1 0
Table 6: States stabilized by Pauli matrices P and also −P , where X := ( 01 10 ), Y := i 0 , Z := 0 −1 ,
and I2 := ( 10 01 ).
Stab. State vec. Dens. mat. Stab. State vec. Dens. mat.
1 −1
1 1 1 1
1
√1 1
∧ ∧
X √ (1)
2 1
= |+i 2 1 1 −X 2 −1 = |−i 2 −1 1
1 −i
1 1 1 i
1
Y √ (1) −Y √1 1
2 i 2 −i 1 2 −i 2 i 1
∧ 1 0
0
∧ 0 0
Z ( 10 ) = |0i 0 0 −Z 1 = |1i 0 1
II = I IX = X IY = Y IZ = Z
XI = X XX = I XY = iZ XZ = −iY
YI = Y YX = −iZ YY = I YZ = iX
ZI = Z ZX = iY ZY = −iX ZZ = I
22