A naïve measure of entanglement.
Originally published September 2010; this version 21 August 2011.
Dave Barber's other pages.

Acknowledgements to author Nate Weeks, whose short story motivated this page.


§1. A quantum bit (qubit for short) is a generalization of the classical bit of computer science. The notion of the qubit arises from quantum physics, in which field researchers are seeking to build practical quantum computers implementing qubits by means of subatomic particles. Their hope is that a quantum computer with only a dozen or so qubits will be able to significantly outperform classical computers, which (as of the year 2011) can have thousands of classical bits in the central processing unit alone, and thousands of millions in main memory.

This report will look at qubits as abstract data items, rather than examine their physical properties. Central to quantum computing is that several qubits together can become entangled, their aggregate (here termed a quantum register, or qureg for short) displaying behavior far more complicated than the qubits could show individually. Often it is helpful to describe the amount of such entanglement with a nonnegative real number, with the minimum value of zero representing no entanglement at all. Authors have already proposed a variety of entanglement measures because no single formula is best for every purpose. Here we offer yet another, this one fairly easy to calculate and intuitively simple — hence the adjective naïve.

Before doing that, however, we must lay some groundwork.


§2. A lone qubit can be represented by an ordered pair of complex numbers customarily written as α and β, and constrainted by the requirement │α│2 + │β │2 = 1. In that expression, a pair of vertical bars designates the absolute value of their contents; an absolute value is always a nonnegative real number. Nomenclature varies, but each of α and β can be called an amplitude. Meanwhile, each of │α│2 and │β│2 is termed a probability, which is consistent with the requirement that they sum to unity.

Convenient for students is that many important properties of qubits remain clear if the complex numbers are limited to their real number subset, in other words if the imaginary part of each complex number is restricted to zero.

A qubit can also be described using a Bloch sphere, but that model is not pursued here because it does not easily generalize to the multi-qubit case.


§3. An essential qubit operation is measurement, in this report written n-measurement to distinguish it from the other measurements that arise. When we n-measure a single qubit we obtain one of two states, conventionally written │0 ⟩ and │1 ⟩. The vertical bar and right-hand angle bracket of this notation are Dirac notation, while the 0 and 1 are binary numbers.

We can expect that the value │0 ⟩ will appear with probability │α│2, and the value │1 ⟩ with probability │β│2. As long as we do not alter the qubit, subsequent n-measurements will give the same result — this is fundamental to qubit behavior. Even though probabilities are involved, successive n-measurements on the same qubit will not generate a sequence of random values.

Consider for example a qubit with α = 0.58 + 0.46i and β = 0.62 − 0.26i. Then │α │2 = 0.548 and │β │2 = 0.452. When we n-measure this qubit:

After the n-measurement, all evidence of the numbers 0.58, 0.46, 0.62 and 0.26 will have vanished. Often suprising to beginners is this phenomenon that n-measuring a qubit can alter it, with no hope of retrieving the previous value.

§4. Exactly what are │0 ⟩ and │1 ⟩? We can regard them as column vectors in a vector space. Specifically, each needs to be a unit vector, and they must be orthogonal to each other. As such, they form an orthonormal basis for some two-dimensional vector space. No generality is lost with the following standard basis:

For typographical convenience, we have written these column vectors as row vectors with the transpose symbol. For two qubits, we need 4 = 22 linearly independent column vectors to form a basis. Here is the standard basis for a four-dimensional vector space:

For three qubits, the standard basis is:

A system of n qubits will have 2n components in the basis.

If the elements of a row vector are complicated expressions, we might for ease of reading place commas between them: [ 1, 0, 0, 0 ].

A symbol like │000 ⟩ is called a ket, and its conjugate transpose is termed a bra, written ⟨ 000 │. For instance, if │x ⟩ = [ 3 + 2i, 5 − 7i ]T, then ⟨ x │ = [ 3 − 2i, 5 + 7i ]. Conjugation and transposition can be merged into the superscript H, so that │x ⟩ is also writable as [ 3 − 2i, 5 + 7i ]H. A notation for the inner product would be ⟨ x │ │y ⟩, but repetition of the vertical bar is conventionally eliminated to instead yield ⟨ x │ y ⟩.


§5. The Kronecker product (often called tensor product) of two column vectors is frequently encountered. If U = [ u1, u2, … um]T and V = [ v1, v2, … vn]T, then UV is a column vector, each element of which is the product of one element from U and one element from V. Here we write it out as the transpose of a row vector of such length that several line breaks are necessary:

UV = [ u1 × v1, u1 × v2, … u1 × vn,
u2 × v1, u2 × v2, … u2 × vn,
um × v1, um × v2, … um × vn ]T

When the factors are two column vectors, the Kronecker product has the same contents as the outer product, but is arranged as a column vector rather than a matrix. Here is an example of the Kronecker product:

[ 0 1 0 0 ]T ⊗ [ 0 1 ]T = [ 0 0 0 1 0 0 0 0 ]T

or with Dirac symbols,

│01 ⟩ ⊗ │1 ⟩ = │011 ⟩

An example using ordinary integers:

[ 2 3 5 ]T ⊗ [ 7 11 ]T = [ 14 22 21 33 35 55 ]T

In much literature the operator sign is omitted, Kronecker multiplication being indicated simply by juxtaposition of two column vectors:

│11 ⟩ │0 ⟩ = │110 ⟩

Kronecker multiplication of Dirac symbols looks much the same as catenation of the symbols' binary digits that form the contents. However, the reader is cautioned that such may not be true in general.

Kronecker multiplication of row vectors is analogous, and can be explained in terms of the column vector definition: if R and S are row vectors, then RS = (RTST)T. Note that we have not written RS = (STRT)T, which exhibits the reversal of factors that often occurs under transposition in linear algebra.


Kronecker multiplication can be extended to quregs. Consider these:

Qureg Q
StateAmplitudeProbability
│0 ⟩α│α │2
│1 ⟩β│β │2
Qureg R
StateAmplitudeProbability
│0 ⟩γ│γ │2
│1 ⟩δ│δ │2
Qureg S
StateAmplitudeProbability
│0 ⟩ε│ε │2
│1 ⟩ζ│ζ │2
Qureg T = NOT Q
StateAmplitudeProbability
│0 ⟩β│β │2
│1 ⟩α│α │2

In practice, there is no distinction between a qubit, and a qureg containing one qubit. Here are some products:

Qureg U = QRS
StateAmplitudeProbability
│000 ⟩ α × γ × ε │α × γ × ε │2
│001 ⟩ α × γ × ζ │α × γ × ζ │2
│010 ⟩ α × δ × ε │α × δ × ε │2
│011 ⟩ α × δ × ζ │α × δ × ζ │2
│100 ⟩ β × γ × ε │β × γ × ε │2
│101 ⟩ β × γ × ζ │β × γ × ζ │2
│110 ⟩ β × δ × ε │β × δ × ε │2
│111 ⟩ β × δ × ζ │β × δ × ζ │2
Qureg V = RQS
StateAmplitudeProbability
│000 ⟩ α × γ × ε │α × γ × ε │2
│001 ⟩ α × γ × ζ │α × γ × ζ │2
│010 ⟩ β × γ × ε │β × γ × ε │2
│011 ⟩ β × γ × ζ │β × γ × ζ │2
│100 ⟩ α × δ × ε │α × δ × ε │2
│101 ⟩ α × δ × ζ │α × δ × ζ │2
│110 ⟩ β × δ × ε │β × δ × ε │2
│111 ⟩ β × δ × ζ │β × δ × ζ │2
Qureg W = RTS
StateAmplitudeProbability
│000 ⟩ β × γ × ε │β × γ × ε │2
│001 ⟩ β × γ × ζ │β × γ × ζ │2
│010 ⟩ α × γ × ε │α × γ × ε │2
│011 ⟩ α × γ × ζ │α × γ × ζ │2
│100 ⟩ β × δ × ε │β × δ × ε │2
│101 ⟩ β × δ × ζ │β × δ × ζ │2
│110 ⟩ α × δ × ε │α × δ × ε │2
│111 ⟩ α × δ × ζ │α × δ × ζ │2

Is qubit multiplication commutative? Formally, no. For many purposes however, the difference between U and V will be regarded as a trivial distinction in notation; this is most likely if in some physical application Q, R and S do not naturally fall into any kind of sequence. By the same token, there will be circumstances in which the difference between Q and T = NOT Q will be viewed as insignificant.

Elsewhere in mathematics, multiplication of two vectors that contain complex numbers often has an added feature: the elements of one vector are conjugated. This is most frequently seen with inner products. We have not chosen conjugation here because such an operation is not associative. To see this, for complex numbers a and b, define a binary infix operation ab = a × conj(b). Then (ab) ◊ c will not always equal a ◊ (bc), as in the simple example a = b = 1 and c = i. Among a qureg's component qubits, there will often be no evident criterion for deciding which should be grouped most closely for calculation, so we do not adopt conjugative multiplication.

Although U, V and W can be factored into individual qubits (in other words are separable), not all quregs can be; the next section gives an example. This is manifested by the observation that a three-qubit register is described by eight complex numbers (the amplitudes), but the qubits that would factor it have a total of merely six. Definition: a qureg is entangled if and only if a factorization into qubits fails to exist. By what metric ought entanglement to be measured? It varies according to the purpose, but at least there is consensus that an entanglement of zero should stand for factorability, or synonymously, separability.


§6. Here is an extended example showing n-measurement of a three-qubit register. Random-looking numbers, carried to five decimal places, were chosen so that a reader who is working through the calculations will not likely get the right answer if using an incorrect procedure. Qureg A0 contains 8 = 23 (not 6 = 3 × 2) states, amplitudes and probabilities. Because there are 8 amplitudes for 3 qubits, it is not possible to match up amplitudes with qubits. Rather, every amplitude is "somewhat" associated with every qubit, this indefinition being what allows entanglement.

Qureg A0
StateAmplitudeProbability
│000 ⟩+0.32272 − 0.12294i0.11926
│001 ⟩−0.16136 + 0.03074i0.02698
│010 ⟩−0.17673 − 0.19210i0.06813
│011 ⟩+0.25645 + 0.11105i0.07810
│100 ⟩+0.07684 + 0.39188i0.15947
│101 ⟩+0.22712 − 0.18991i0.08765
│110 ⟩+0.57598 − 0.25131i0.39490
│111 ⟩+0.23749 + 0.09535i0.06549

The interpretation is that, when A0 is n-measured, the state │000 ⟩ for instance will appear with probability 0.11926. Similarly, the state │101 ⟩ will appear with probability 0.08765. What follows is a full writing out of the resultant A1 when the n-measured state happens to be │010 ⟩; note the proportional increase of the real and imaginary parts of │010 ⟩'s amplitude:

Qureg A1
StateAmplitudeProbability
│000 ⟩00
│001 ⟩00
│010 ⟩−0.67706 − 0.73593i1
│011 ⟩00
│100 ⟩00
│101 ⟩00
│110 ⟩00
│111 ⟩00

As in the single-qubit case, repeated n-measurements will give the same result as the first unless the qureg is altered. A qureg will often be simplified by n-measurement, but never be made more complicated.

We need not n-measure the whole qureg. If we n-measure only the last two qubits of A0, there are four possible outcomes. Among them, A2 has a probability 0.11926 + 0.15947 = 0.27873 of being the result:

Qureg A2
StateAmplitudeProbability
│000 ⟩+0.61127 − 0.23286i0.42788
│001 ⟩00
│010 ⟩00
│011 ⟩00
│100 ⟩+0.14554 + 0.74226i0.57212
│101 ⟩00
│110 ⟩00
│111 ⟩00

To save space we can rewrite the table leaving out rows with an amplitude of zero:

Qureg A2
StateAmplitudeProbability
│000 ⟩+0.61127 − 0.23286i0.42788
│100 ⟩+0.14554 + 0.74226i0.57212

From this shorter method of writing A2, we can perfectly well regard it as a single-qubit register whose two states are called │000 ⟩ and │100 ⟩, rather than a three-qubit register containing many amplitudes of zero.

A second result appears with a probability of 0.02698 + 0.08765 = 0.11463:

Qureg A3
StateAmplitudeProbability
│001 ⟩−0.47659 + 0.09078i0.23538
│101 ⟩+0.67082 − 0.56092i0.76462

This third result has a probability of 0.06813 + 0.39490 = 0.46303:

Qureg A4
StateAmplitudeProbability
│010 ⟩−0.25972 − 0.28230i0.14715
│110 ⟩+0.84644 − 0.36931i0.85285

The final possible result has a probability of 0.07810 + 0.06549 = 0.14359:

Qureg A5
StateAmplitudeProbability
│011 ⟩+0.67676 + 0.29306i0.54389
│111 ⟩+0.62673 + 0.25163i0.45611

We could next perform an n-measurement on the entire qureg A5. The probability of getting A5 from A0 was 0.14359, and the probability of obtaining │011 ⟩ from A5 is 0.54389. Observe that 0.14359 × 0.54389 = 0.07810, which is the same as the probability of getting │011 ⟩ directly from a full n-measurement of A0. This illustrates the important point that a sequence of n-measurements can be replaced by a lone n-measurement, suitably devised — such is the nature of projections.

Since a qureg description contains a list of probabilities, calculating its Shannon entropy is a natural thing to do, and its value will often be displayed with the qureg listings.


§7. Quregs A2 through A5 were generated by n-measuring the last two qubits of A0. Let us reprise their charts, writing a hash sign (#) in the second and third qubit positions to show that we are finished with them:

Qureg A2
StateAmplitudeProbability
│0## ⟩+0.61127 − 0.23286i0.42788
│1## ⟩+0.14554 + 0.74226i0.57212
Qureg A3
StateAmplitudeProbability
│0## ⟩−0.47659 + 0.09078i0.23538
│1## ⟩+0.67082 − 0.56092i0.76462
Qureg A4
StateAmplitudeProbability
│0## ⟩−0.25972 − 0.28230i0.14715
│1## ⟩+0.84644 − 0.36931i0.85285
Qureg A5
StateAmplitudeProbability
│0## ⟩+0.67676 + 0.29306i0.54389
│1## ⟩+0.62673 + 0.25163i0.45611

Quregs A2′ through A5′ were obtained by the same n-measuring procedure, but differ because of a component qubit that we did not attempt to n-measure, namely the first. Such is the hallmark of entanglement. Where did it come from?

To write the answer, we adopt the symbol cxyz for the amplitude of state │xyz ⟩. In A0 for instance, c101 = +0.22712 − 0.18991i. With this notation, we can easily describe a source of the entanglement — in A0 these four ratios are not all equal:

More can be said. When the following four-member equality is satisfied, the first qubit is assuredly not entangled with that subset of the quantum register (subqureg) which contains the second and third qubits:

c100 ÷ c000 = c101 ÷ c001 = c110 ÷ c010 = c111 ÷ c011 (I)

By the same token, the second qubit is not entangled with the subqureg consisting of the first and third qubits when:

c010 ÷ c000 = c011 ÷ c001 = c110 ÷ c100 = c111 ÷ c101 (II)

Similarly, the third qubit is unentangled with the first two when this is true:

c001 ÷ c000 = c011 ÷ c010 = c101 ÷ c100 = c111 ÷ c110 (III)

We call these generative ratios, because they are used to construct an entanglement measure as in the next section. They are easily extended to the non-three-qubit case.


§8. Expand the three four-member equalities from immediately above into eighteen two-member equalities below:

IIIIII
c100 ÷ c000 = c111 ÷ c011 c010 ÷ c000 = c011 ÷ c001 c001 ÷ c000 = c011 ÷ c010
c100 ÷ c000 = c101 ÷ c001 c010 ÷ c000 = c111 ÷ c101 c001 ÷ c000 = c101 ÷ c100
c100 ÷ c000 = c110 ÷ c010 c010 ÷ c000 = c110 ÷ c100 c001 ÷ c000 = c111 ÷ c110
c101 ÷ c001 = c110 ÷ c010 c110 ÷ c100 = c111 ÷ c101 c101 ÷ c100 = c111 ÷ c110
c110 ÷ c010 = c111 ÷ c011 c011 ÷ c001 = c110 ÷ c100 c011 ÷ c010 = c111 ÷ c110
c101 ÷ c001 = c111 ÷ c011 c011 ÷ c001 = c111 ÷ c101 c011 ÷ c010 = c101 ÷ c100

Convert division to multiplication, which reveals that some equations are redundant:

I II III
a c100 × c011 = c111 × c000c010 × c001 = c011 × c000≡ III-a c001 × c010 = c011 × c000≡ II-a
b c100 × c001 = c101 × c000≡ III-b c010 × c101 = c111 × c000c001 × c100 = c101 × c000≡ I-b
c c100 × c010 = c110 × c000≡ II-c c010 × c100 = c110 × c000≡ I-c c001 × c110 = c111 × c000
d c101 × c010 = c110 × c001c110 × c101 = c111 × c100≡ III-d c101 × c110 = c111 × c100≡ II-d
e c110 × c011 = c111 × c010≡ III-e c011 × c100 = c110 × c001c011 × c110 = c111 × c010≡ I-e
f c101 × c011 = c111 × c001≡ II-f c011 × c101 = c111 × c001≡ I-f c011 × c100 = c101 × c010

The redundant equations can be dropped if the only question is whether entanglement exists. Otherwise, they might be left in or not, according to the preference of the researcher, as they will influence the weighting of elements in the calculation of the entanglement. In this report, the redundant equations are retained unless otherwise indicated.

When there is entanglement, some of the equalities will not be satisfied. One way to quantify that nonsatisfaction is to change each equal sign to a subtraction sign, and take the absolute value of the remainder, forming a nugget. Now square each nugget:

IIIIII
c100 × c011c111 × c0002 c010 × c001c011 × c0002 c001 × c010c011 × c0002
c100 × c001c101 × c0002 c010 × c101c111 × c0002 c001 × c100c101 × c0002
c100 × c010c110 × c0002 c010 × c100c110 × c0002 c001 × c110c111 × c0002
c101 × c010c110 × c0012 c110 × c101c111 × c1002 c101 × c110c111 × c1002
c110 × c011c111 × c0102 c011 × c100c110 × c0012 c011 × c110c111 × c0102
c101 × c011c111 × c0012 c011 × c101c111 × c0012 c011 × c100c101 × c0102

The square root of the sum of all eighteen squared nuggets is our desired naïve measure of entanglement (the naïveté) for a register of three qubits. As we are dealing with the square root of the sum of squares, this measure can be characterized as Euclidean.

Other measurement options are to take the sum of the nuggets without any powers or roots, or simply to take the maximum of the nuggets, et cetera. The researcher might also opt to omit the redundant nuggets, or more generally to multiply each nugget by a different weighting factor to emphasize some nuggets over others.

If u is a complex number whose magnitude is unity, and we multiply every amplitude of a qureg by u, the entanglement will not change. This amounts to rotating each amplitude through the same angle within the complex plane. Another operation that will not change the entanglement is to conjugate every amplitude; this is a reflection.


§9. An explicit formula for the naïveté in the general case is elementary but bulky. Suppose that Q is a qureg containing n qubits. To index the amplitudes of Q, we write c(m) instead of cm for clarity because the indices will sometimes be complicated. Then the naïveté (with weighting that reflects redundant entries) of Q is given by

i < n
square root of Σ T2 (i) + R2 (i)
i ≥ 0

where

j < 2i
T2 (i) = Σ T1 (j × 2ni, 2ni − 1)
j ≥ 0

k < 2i j < k
R2 (i) = Σ Σ R1 (j × 2ni, k × 2ni, 2ni − 1)
k ≥ 0 j ≥ 0

and where

j < w i < j
T1 (u, w) = Σ Σ c (u + w + j) × c (u + i) − c (u + j) × c (u + w + i) │2
j ≥ 0 i ≥ 0

j < w i < w
R1 (u, v, w) = Σ Σ c (u + w + j) × c (v + i) − c (u + j) × c (v + w + i) │2
j ≥ 0 i ≥ 0

The limits of summation have been written in a slightly nonstandard fashion offering a clue to the reader who might wonder how to calculate the naïveté when the number of qubits is not an integer. Among the possible steps are to replace Σ with ∫ , and to define c( ) as a function of a real variable. (We grant that evidence of fractional qubits in nature is either rare or nonexistent.)


The computational cost incurred by these formulas may be significant, because it grows exponentially as the number of qubits in the qureg. Let X represent this nugget evaluation from T1:

c (u + w + j) × c (u + i) − c (u + j) × c (u + w + i) │2

and let Y represent this nugget evaluation from R1:

c (u + w + j) × c (v + i) − c (u + j) × c (v + w + i) │2

Then the number of executions of X and Y is governed by the number of qubits. These numbers include redundancy:

QubitsExecutions of XExecutions of Y
1 0 0
2 1 1
3 8 10
4 44 68
5 208 392
6 912 2,064
8 15,808 49,216
10 259,328 1,048,832
124,180,99220,972,544
n 2n − 2 × (2nn − 1) 2n − 2 × (n × 2n − 1 − 2n + 1)

As n becomes large, the proportion of executions avoided by eliminating redundancy becomes small. If, however, a substantial reduction in computation cost is required, a judicious selection of fewer nuggets can still give useful results.


The following brief C++-style function also figures the naïve entanglement. Vector Q contains the amplitudes of the qureg. Function squ_mag figures the square of the magnitude of the complex number on which it is called.

std::vector < std::complex < double > > Q;

double naive () {
   double t (0.0);
   for (size_t d (1); d < Q.size(); d <<= 1) {
      for (size_t u (0); u < Q.size(); ++u) {
         if (u & d) continue;
         complex const & Qu (Q.at(u));
         complex const & Qud (Q.at(u + d));
         for (size_t v (u + 1); v < Q.size(); ++v) {
            if (v & d) continue;
            complex const & Qv (Q.at(v));
            complex const & Qvd (Q.at(v + d));								
            t += (Qu * Qvd - Qv * Qud).squ_mag();
         }
      }
   }
   return sqrt (t);
}

§10. Here is another three-qubit register:

Qureg B0
StateAmplitudeProbability
│000 ⟩+0.44133 − 0.16813i0.22304
│001 ⟩−0.34676 − 0.26270i0.18926
│010 ⟩−0.08385 + 0.03194i0.00805
│011 ⟩+0.06588 + 0.04991i0.00683
│100 ⟩+0.14711 + 0.53591i0.30884
│101 ⟩−0.30473 + 0.38879i0.24402
│110 ⟩−0.02795 − 0.10182i0.01115
│111 ⟩+0.05790 − 0.07387i0.00881
naïveté = 0.69554
entropy = 2.19499

If we n-measure the first bit, we get either B1 (probability 0.22304 + 0.18926 + 0.00805 + 0.00683 = 0.42718) or B2 (probability 0.30884 + 0.24402 + 0.01115 + 0.00881 = 0.57282):

Qureg B1
StateAmplitudeProbability
│000 ⟩+0.67524 − 0.25724i0.52213
│001 ⟩−0.53055 − 0.40193i0.44303
│010 ⟩−0.12830 + 0.04887i0.01885
│011 ⟩+0.10080 + 0.07637i0.01599
│100 ⟩00
│101 ⟩00
│110 ⟩00
│111 ⟩00
naïveté = 0
entropy = 1.21325
Qureg B2
StateAmplitudeProbability
│000 ⟩00
│001 ⟩00
│010 ⟩00
│011 ⟩00
│100 ⟩+0.19437 + 0.70808i0.53915
│101 ⟩−0.40263 + 0.51370i0.42600
│110 ⟩−0.03693 − 0.13453i0.01946
│111 ⟩+0.07650 − 0.09760i0.01538
naïveté = 0
entropy = 1.20818

If we n-measure the second bit, we get either B3 (probability 0.96516) or B4 (probability 0.03484):

Qureg B3
StateAmplitudeProbability
│000 ⟩+0.44923 − 0.17114i0.23109
│001 ⟩−0.35297 − 0.26740i0.19609
│010 ⟩00
│011 ⟩00
│100 ⟩+0.14974 + 0.54549i0.31999
│101 ⟩−0.31018 + 0.39575i0.25283
│110 ⟩00
│111 ⟩00
naïveté = 0.69554
entropy = 1.97688
Qureg B4
StateAmplitudeProbability
│000 ⟩00
│001 ⟩00
│010 ⟩−0.44923 + 0.17114i0.23109
│011 ⟩+0.35297 + 0.26740i0.19609
│100 ⟩00
│101 ⟩00
│110 ⟩−0.14974 − 0.54549i0.31999
│111 ⟩+0.31018 − 0.39575i0.25283
naïveté = 0.69554
entropy = 1.97688

If we n-measure the third bit, we get either B5 (probability 0.55108) or B6 (probability 0.44892):

Qureg B5
StateAmplitudeProbability
│000 ⟩+0.59451 − 0.22648i0.40474
│001 ⟩00
│010 ⟩−0.11296 + 0.04303i0.01461
│011 ⟩00
│100 ⟩+0.19817 + 0.72191i0.56042
│101 ⟩00
│110 ⟩−0.03765 − 0.13716i0.02023
│111 ⟩00
naïveté = 0
entropy = 1.19926
Qureg B6
StateAmplitudeProbability
│000 ⟩00
│001 ⟩−0.51755 − 0.39208i0.42158
│010 ⟩00
│011 ⟩+0.09833 + 0.07450i0.01522
│100 ⟩00
│101 ⟩−0.45481 + 0.58028i0.54358
│110 ⟩00
│111 ⟩+0.08641 − 0.11025i0.01962
naïveté = 0
entropy = 1.20656

Much as before, we can dismiss the zero-amplitude states and write a hash mark for qubits already n-measured to yield briefer forms:

Qureg B1
StateAmplitudeProbability
│#00 ⟩+0.67524 − 0.25724i0.52213
│#01 ⟩−0.53055 − 0.40193i0.44303
│#10 ⟩−0.12830 + 0.04887i0.01885
│#11 ⟩+0.10080 + 0.07637i0.01599
naïveté = 0
Qureg B2
StateAmplitudeProbability
│#00 ⟩+0.19437 + 0.70808i0.53915
│#01 ⟩−0.40263 + 0.51370i0.42600
│#10 ⟩−0.03693 − 0.13453i0.01946
│#11 ⟩+0.07650 − 0.09760i0.01538
naïveté = 0
Qureg B3
StateAmplitudeProbability
│0#0 ⟩+0.44923 − 0.17114i0.23109
│0#1 ⟩−0.35297 − 0.26740i0.19609
│1#0 ⟩+0.14974 + 0.54549i0.31999
│1#1 ⟩−0.31018 + 0.39575i0.25283
naïveté = 0.69554
Qureg B4
StateAmplitudeProbability
│0#0 ⟩−0.44923 + 0.17114i0.23109
│0#1 ⟩+0.35297 + 0.26740i0.19609
│1#0 ⟩−0.14974 − 0.54549i0.31999
│1#1 ⟩+0.31018 − 0.39575i0.25283
naïveté = 0.69554
Qureg B5
StateAmplitudeProbability
│00# ⟩+0.59451 − 0.22648i0.40474
│01# ⟩−0.11296 + 0.04303i0.01461
│10# ⟩+0.19817 + 0.72191i0.56042
│11# ⟩−0.03765 − 0.13716i0.02023
naïveté = 0
Qureg B6
StateAmplitudeProbability
│00# ⟩−0.51755 − 0.39208i0.42158
│01# ⟩+0.09833 + 0.07450i0.01522
│10# ⟩−0.45481 + 0.58028i0.54358
│11# ⟩+0.08641 − 0.11025i0.01962
naïveté = 0

Among the qubits of the original qureg B0:

In other words, the qureg B0 has two factors: a subqureg containing the second qubit, and a subqureg containing the first and third qubits. A conspicuous conclusion is that non-entanglement (in other words, separability) is not transitive. Here is an informal description of what has happened:

Another page shows a similar breakdown of A0.


§11. Suppose C and D are two ordinary quregs bearing no particular relationship to each other:

Qureg C
StateAmplitudeProbability
│00 ⟩+0.50591 − 0.19273i0.29309
│01 ⟩−0.25296 + 0.04818i0.06631
│10 ⟩−0.39750 − 0.30114i0.24869
│11 ⟩+0.12046 + 0.61432i0.39190
naïveté = 0.33849
entropy = 1.80742
Qureg D
StateAmplitudeProbability
│000 ⟩−0.15778 + 0.43747i0.21627
│001 ⟩−0.08606 + 0.28687i0.08970
│010 ⟩+0.23666 − 0.37293i0.19508
│011 ⟩+0.05020 + 0.10757i0.01409
│100 ⟩+0.30121 − 0.25818i0.15738
│101 ⟩−0.21515 + 0.17212i0.07591
│110 ⟩−0.32272 − 0.32272i0.20830
│111 ⟩+0.14343 − 0.15060i0.04325
naïveté = 0.68133
entropy = 2.70606

The Kronecker product of C and D is laid out in the next table.

Qureg CD
StateAmplitudeProbability  StateAmplitudeProbability
│00000 ⟩+0.00449 + 0.25173i0.06339 │10000 ⟩+0.19446 − 0.12638i0.05379
│00001 ⟩+0.01175 + 0.16172i0.02629 │10001 ⟩+0.12060 − 0.08811i0.02231
│00010 ⟩+0.04786 − 0.23428i0.05718 │10010 ⟩−0.20638 + 0.07697i0.04852
│00011 ⟩+0.04613 + 0.04475i0.00413 │10011 ⟩+0.01244 − 0.05788i0.00350
│00100 ⟩+0.10263 − 0.18867i0.04613 │10100 ⟩−0.19748 + 0.01192i0.03914
│00101 ⟩−0.07567 + 0.12854i0.02225 │10101 ⟩+0.13735 − 0.00363i0.01888
│00110 ⟩−0.22547 − 0.10107i0.06105 │10110 ⟩+0.03110 + 0.22547i0.05180
│00111 ⟩+0.04354 − 0.10384i0.01268 │10111 ⟩−0.10237 + 0.01667i0.01076
│01000 ⟩+0.01883 − 0.11826i0.01434 │11000 ⟩−0.28775 − 0.04423i0.08476
│01001 ⟩+0.00795 − 0.07671i0.00595 │11001 ⟩−0.18659 − 0.01831i0.03515
│01010 ⟩−0.04190 + 0.10574i0.01294 │11010 ⟩+0.25760 + 0.10047i0.07645
│01011 ⟩−0.01788 − 0.02479i0.00093 │11011 ⟩−0.06004 + 0.04380i0.00552
│01100 ⟩−0.06375 + 0.07982i0.01044 │11100 ⟩+0.19489 + 0.15394i0.06168
│01101 ⟩+0.04613 − 0.05391i0.00503 │11101 ⟩−0.13165 − 0.11144i0.02975
│01110 ⟩+0.09718 + 0.06609i0.01381 │11110 ⟩+0.15938 − 0.23713i0.08163
│01111 ⟩−0.02903 + 0.04501i0.00287 │11111 ⟩+0.10980 + 0.06997i0.01695
naïveté = 0.76078
entropy = 4.51348


§12. Kronecker multiplication can be extended to two matrices. As with the vector version, each component of the first factor is multiplied by each component of the second factor.

Specifically, let M be any matrix with mr rows and mc columns, and N be any matrix with nr rows and nc columns. Use the notation L (i, j) to stand for the element of matrix L in row i and column j. The Kronecker product P = MN will have mr × nr rows and mc × nc columns, and M (i, j) × N (k, l) is the value to be placed into location P (i * nr + k, j * nc + l).

If a column vector is regarded as a matrix with exactly one column, this definition is consistent with that of section 5 above; similarly for row vectors. There is no need for any of mr, mc, nr and nc to be equal; this contrasts with a restriction of conventional matrix multiplication. While the definition of the tensor product of two matrices varies, it often contains the same components as the Kronecker producr, but arranged into a four-dimensional structure.


One use of this operation is to write the state of a qureg in a form known as the density matrix. The Greek minuscules rho (ρ) and sigma (σ) are often used to signify density matrices. Recall the amplitudes of qureg C, here arranged as a column vector — in light of the limitations of HTML, rendered on this web page as a table with borders:

Amplitudes of C
+0.50591 − 0.19273i
−0.25296 + 0.04818i
−0.39750 − 0.30114i
+0.12046 + 0.61432i

The state of C can be represented by the density matrix ρ = CCH, which is hermitian and beyond that, nonnegative on the diagonal:

ρ = CCH
+0.29309 −0.13726 + 0.02438i −0.14306 + 0.22896i −0.05746 − 0.33401i
−0.13726 − 0.02438i +0.06631 +0.08604 − 0.09533i −0.00087 + 0.16120i
−0.14306 − 0.22896i +0.08604 + 0.09533i +0.24869 −0.23288 + 0.20792i
−0.05746 + 0.33401i −0.00087 − 0.16120i −0.23288 − 0.20792i +0.39190

This state is termed pure because it is formed from a sole qureg. (The convex combination of two or more pure states is a mixed state, to be discussed later.) The trace of this matrix is one, because the diagonal elements are the square magnitudes (hence probabilities) of the qureg amplitudes. The rank is also one, because:

If any row or column is normalized, it will have a naïveté of 0.33848 and an entropy of 1.80742, exactly like C. Perhaps surprising, however, is that C itself cannot be recovered from CCH. The closest possible is to construct a state C′ where each amplitude differs from the corresponding amplitude of C by a complex-number factor whose magnitude is unity. A canonical form for C′ might force the first nonzero component to be a nonnegative real:

Canonical C′
+0.54138
−0.25354 − 0.04503i
−0.26425 − 0.42292i
−0.10613 + 0.61696i

Although the density matrix is redundant, it turns out to be a very useful form for subsequent calculations.


§13. Here is another qureg:

Qureg E
StateAmplitudeProbability
│00 ⟩+0.32532 − 0.51274i0.36874
│01 ⟩+0.06902 + 0.14781i0.02661
│10 ⟩−0.29576 + 0.23664i0.14347
│11 ⟩−0.41896 + 0.53446i0.46118
naïveté = 0.64872
entropy = 1.58681

Its density matrix is:

σ = EEH
+0.36874 −0.05333 − 0.08348i −0.21755 + 0.07466i −0.41034 + 0.04094i
−0.05333 + 0.08348i +0.02661 +0.01456 − 0.06005i +0.05008 − 0.09882i
−0.21755 − 0.07466i +0.01456 + 0.06005i +0.14347 +0.25039 + 0.05893i
−0.41034 − 0.04094i +0.05008 + 0.09882i +0.25039 − 0.05893i +0.46118

Before going further, we mention by way of reminder two well-known operations of elementary linear algebra:

Given two states S and T, and two nonnegative reals p and q whose sum is unity, a mixed state is S × p + T × q. An example is τ = ρ × 0.3 + σ × 0.7:

τ = ρ × 0.3 + σ × 0.7
+0.34604 −0.07851 − 0.05112i −0.19520 + 0.12095i −0.30447 − 0.07154i
−0.07851 + 0.05112i +0.03852 +0.03601 − 0.07063i +0.03479 − 0.02081i
−0.19520 − 0.12095i +0.03601 + 0.07063i +0.17504 +0.10541 + 0.10363i
−0.30447 + 0.07154i +0.03479 + 0.02081i +0.10541 − 0.10363i +0.44040

For instance, examining the second row and third column of density matrices ρ, σ and τ gives (0.08604 − 0.09533i) × 0.3 + (0.01456 − 0.06005i) × 0.7 = (0.03601 + 0.07063i).

Although any column of a mixed state matrix can be normalized, and its naïveté or entropy calculated, the values will usually vary from one column to the next, and will have no obvious use; in this regard mixed states differ from pure states. Another difference is this: the trace of the square (the purity) of a pure-state density matrix will be unity, but in the mixed-state case will be less. (For this purpose, the squaring entails conventional matrix multiplication.) To illustrate, the respective traces of ρ, ρ2, σ, σ2 and τ all equal one, but the trace of τ2 is 0.72404.

Among the interpretations of a mixed state are these:

Every mixed state is a convex combination of pure states.


Good reading: