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 multiqubit case.
§3. An essential qubit operation is measurement, in this report written nmeasurement to distinguish it from the other measurements that arise. When we nmeasure a single qubit we obtain one of two states, conventionally written │0 ⟩ and │1 ⟩. The vertical bar and righthand 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 nmeasurements will give the same result — this is fundamental to qubit behavior. Even though probabilities are involved, successive nmeasurements 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 nmeasure this qubit:
§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 twodimensional vector space. No generality is lost with the following standard basis:
For three qubits, the standard basis is:
A system of n qubits will have 2^{n} 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 = [ u_{1}, u_{2}, … u_{m}]^{T} and V = [ v_{1}, v_{2}, … v_{n}]^{T}, then U ⊗ V 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:
U ⊗ V = [  u_{1} × v_{1}, u_{1} × v_{2}, … u_{1} × v_{n},  
u_{2} × v_{1}, u_{2} × v_{2}, … u_{2} × v_{n},  
…  
u_{m} × v_{1}, u_{m} × v_{2}, … u_{m} × v_{n}  ]^{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 R ⊗ S = (R^{T} ⊗ S^{T})^{T}. Note that we have not written R ⊗ S = (S^{T} ⊗ R^{T})^{T}, which exhibits the reversal of factors that often occurs under transposition in linear algebra.
Kronecker multiplication can be extended to quregs. Consider these:

 


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



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 a ◊ b = a × conj(b). Then (a ◊ b) ◊ c will not always equal a ◊ (b ◊ c), 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 threequbit 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 nmeasurement of a threequbit register. Randomlooking 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 A_{0} contains 8 = 2^{3} (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 A_{0}  

State  Amplitude  Probability 
│000 ⟩  +0.32272 − 0.12294i  0.11926 
│001 ⟩  −0.16136 + 0.03074i  0.02698 
│010 ⟩  −0.17673 − 0.19210i  0.06813 
│011 ⟩  +0.25645 + 0.11105i  0.07810 
│100 ⟩  +0.07684 + 0.39188i  0.15947 
│101 ⟩  +0.22712 − 0.18991i  0.08765 
│110 ⟩  +0.57598 − 0.25131i  0.39490 
│111 ⟩  +0.23749 + 0.09535i  0.06549 
The interpretation is that, when A_{0} is nmeasured, 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 A_{1} when the nmeasured state happens to be │010 ⟩; note the proportional increase of the real and imaginary parts of │010 ⟩'s amplitude:
Qureg A_{1}  

State  Amplitude  Probability 
│000 ⟩  0  0 
│001 ⟩  0  0 
│010 ⟩  −0.67706 − 0.73593i  1 
│011 ⟩  0  0 
│100 ⟩  0  0 
│101 ⟩  0  0 
│110 ⟩  0  0 
│111 ⟩  0  0 
As in the singlequbit case, repeated nmeasurements will give the same result as the first unless the qureg is altered. A qureg will often be simplified by nmeasurement, but never be made more complicated.
We need not nmeasure the whole qureg. If we nmeasure only the last two qubits of A_{0}, there are four possible outcomes. Among them, A_{2} has a probability 0.11926 + 0.15947 = 0.27873 of being the result:
Qureg A_{2}  

State  Amplitude  Probability 
│000 ⟩  +0.61127 − 0.23286i  0.42788 
│001 ⟩  0  0 
│010 ⟩  0  0 
│011 ⟩  0  0 
│100 ⟩  +0.14554 + 0.74226i  0.57212 
│101 ⟩  0  0 
│110 ⟩  0  0 
│111 ⟩  0  0 
To save space we can rewrite the table leaving out rows with an amplitude of zero:
Qureg A_{2}  

State  Amplitude  Probability 
│000 ⟩  +0.61127 − 0.23286i  0.42788 
│100 ⟩  +0.14554 + 0.74226i  0.57212 
From this shorter method of writing A_{2}, we can perfectly well regard it as a singlequbit register whose two states are called │000 ⟩ and │100 ⟩, rather than a threequbit register containing many amplitudes of zero.
A second result appears with a probability of 0.02698 + 0.08765 = 0.11463:
Qureg A_{3}  

State  Amplitude  Probability 
│001 ⟩  −0.47659 + 0.09078i  0.23538 
│101 ⟩  +0.67082 − 0.56092i  0.76462 
This third result has a probability of 0.06813 + 0.39490 = 0.46303:
Qureg A_{4}  

State  Amplitude  Probability 
│010 ⟩  −0.25972 − 0.28230i  0.14715 
│110 ⟩  +0.84644 − 0.36931i  0.85285 
The final possible result has a probability of 0.07810 + 0.06549 = 0.14359:
Qureg A_{5}  

State  Amplitude  Probability 
│011 ⟩  +0.67676 + 0.29306i  0.54389 
│111 ⟩  +0.62673 + 0.25163i  0.45611 
We could next perform an nmeasurement on the entire qureg A_{5}. The probability of getting A_{5} from A_{0} was 0.14359, and the probability of obtaining │011 ⟩ from A_{5} 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 nmeasurement of A_{0}. This illustrates the important point that a sequence of nmeasurements can be replaced by a lone nmeasurement, 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 A_{2} through A_{5} were generated by nmeasuring the last two qubits of A_{0}. Let us reprise their charts, writing a hash sign (#) in the second and third qubit positions to show that we are finished with them:

 


Quregs A_{2}′ through A_{5}′ were obtained by the same nmeasuring procedure, but differ because of a component qubit that we did not attempt to nmeasure, namely the first. Such is the hallmark of entanglement. Where did it come from?
To write the answer, we adopt the symbol c_{xyz} for the amplitude of state │xyz ⟩. In A_{0} for instance, c_{101} = +0.22712 − 0.18991i. With this notation, we can easily describe a source of the entanglement — in A_{0} these four ratios are not all equal:
More can be said. When the following fourmember 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:
c_{100} ÷ c_{000} = c_{101} ÷ c_{001} = c_{110} ÷ c_{010} = c_{111} ÷ c_{011} (I)
By the same token, the second qubit is not entangled with the subqureg consisting of the first and third qubits when:
c_{010} ÷ c_{000} = c_{011} ÷ c_{001} = c_{110} ÷ c_{100} = c_{111} ÷ c_{101} (II)
Similarly, the third qubit is unentangled with the first two when this is true:
c_{001} ÷ c_{000} = c_{011} ÷ c_{010} = c_{101} ÷ c_{100} = c_{111} ÷ c_{110} (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 nonthreequbit case.
§8. Expand the three fourmember equalities from immediately above into eighteen twomember equalities below:
I  II  III 

c_{100} ÷ c_{000} = c_{111} ÷ c_{011}  c_{010} ÷ c_{000} = c_{011} ÷ c_{001}  c_{001} ÷ c_{000} = c_{011} ÷ c_{010} 
c_{100} ÷ c_{000} = c_{101} ÷ c_{001}  c_{010} ÷ c_{000} = c_{111} ÷ c_{101}  c_{001} ÷ c_{000} = c_{101} ÷ c_{100} 
c_{100} ÷ c_{000} = c_{110} ÷ c_{010}  c_{010} ÷ c_{000} = c_{110} ÷ c_{100}  c_{001} ÷ c_{000} = c_{111} ÷ c_{110} 
c_{101} ÷ c_{001} = c_{110} ÷ c_{010}  c_{110} ÷ c_{100} = c_{111} ÷ c_{101}  c_{101} ÷ c_{100} = c_{111} ÷ c_{110} 
c_{110} ÷ c_{010} = c_{111} ÷ c_{011}  c_{011} ÷ c_{001} = c_{110} ÷ c_{100}  c_{011} ÷ c_{010} = c_{111} ÷ c_{110} 
c_{101} ÷ c_{001} = c_{111} ÷ c_{011}  c_{011} ÷ c_{001} = c_{111} ÷ c_{101}  c_{011} ÷ c_{010} = c_{101} ÷ c_{100} 
Convert division to multiplication, which reveals that some equations are redundant:
I  II  III  

a  c_{100} × c_{011} = c_{111} × c_{000}  –  c_{010} × c_{001} = c_{011} × c_{000}  ≡ IIIa  c_{001} × c_{010} = c_{011} × c_{000}  ≡ IIa 
b  c_{100} × c_{001} = c_{101} × c_{000}  ≡ IIIb  c_{010} × c_{101} = c_{111} × c_{000}  –  c_{001} × c_{100} = c_{101} × c_{000}  ≡ Ib 
c  c_{100} × c_{010} = c_{110} × c_{000}  ≡ IIc  c_{010} × c_{100} = c_{110} × c_{000}  ≡ Ic  c_{001} × c_{110} = c_{111} × c_{000}  – 
d  c_{101} × c_{010} = c_{110} × c_{001}  –  c_{110} × c_{101} = c_{111} × c_{100}  ≡ IIId  c_{101} × c_{110} = c_{111} × c_{100}  ≡ IId 
e  c_{110} × c_{011} = c_{111} × c_{010}  ≡ IIIe  c_{011} × c_{100} = c_{110} × c_{001}  –  c_{011} × c_{110} = c_{111} × c_{010}  ≡ Ie 
f  c_{101} × c_{011} = c_{111} × c_{001}  ≡ IIf  c_{011} × c_{101} = c_{111} × c_{001}  ≡ If  c_{011} × c_{100} = c_{101} × c_{010}  – 
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:
I  II  III 

│c_{100} × c_{011} − c_{111} × c_{000} │^{2}  │c_{010} × c_{001} − c_{011} × c_{000} │^{2}  │c_{001} × c_{010} − c_{011} × c_{000} │^{2} 
│c_{100} × c_{001} − c_{101} × c_{000} │^{2}  │c_{010} × c_{101} − c_{111} × c_{000} │^{2}  │c_{001} × c_{100} − c_{101} × c_{000} │^{2} 
│c_{100} × c_{010} − c_{110} × c_{000} │^{2}  │c_{010} × c_{100} − c_{110} × c_{000} │^{2}  │c_{001} × c_{110} − c_{111} × c_{000} │^{2} 
│c_{101} × c_{010} − c_{110} × c_{001} │^{2}  │c_{110} × c_{101} − c_{111} × c_{100} │^{2}  │c_{101} × c_{110} − c_{111} × c_{100} │^{2} 
│c_{110} × c_{011} − c_{111} × c_{010} │^{2}  │c_{011} × c_{100} − c_{110} × c_{001} │^{2}  │c_{011} × c_{110} − c_{111} × c_{010} │^{2} 
│c_{101} × c_{011} − c_{111} × c_{001} │^{2}  │c_{011} × c_{101} − c_{111} × c_{001} │^{2}  │c_{011} × c_{100} − c_{101} × c_{010} │^{2} 
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 c_{m} 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  Σ  T_{2} (i) + R_{2} (i) 
i ≥ 0 
where
j < 2^{i}  
T_{2} (i) =  Σ  T_{1} (j × 2^{n − i}, 2^{n − i − 1}) 
j ≥ 0 
k < 2^{i}  j < k  
R_{2} (i) =  Σ  Σ  R_{1} (j × 2^{n − i}, k × 2^{n − i}, 2^{n − i − 1})  
k ≥ 0  j ≥ 0 
and where
j < w  i < j  
T_{1} (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  
R_{1} (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 T_{1}:
│c (u + w + j) × c (u + i) − c (u + j) × c (u + w + i) │^{2}
and let Y represent this nugget evaluation from R_{1}:
│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:
Qubits  Executions of X  Executions 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 
12  4,180,992  20,972,544 
n  2^{n − 2} × (2^{n} − n − 1)  2^{n − 2} × (n × 2^{n − 1} − 2^{n} + 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 threequbit register:
Qureg B_{0}  

State  Amplitude  Probability 
│000 ⟩  +0.44133 − 0.16813i  0.22304 
│001 ⟩  −0.34676 − 0.26270i  0.18926 
│010 ⟩  −0.08385 + 0.03194i  0.00805 
│011 ⟩  +0.06588 + 0.04991i  0.00683 
│100 ⟩  +0.14711 + 0.53591i  0.30884 
│101 ⟩  −0.30473 + 0.38879i  0.24402 
│110 ⟩  −0.02795 − 0.10182i  0.01115 
│111 ⟩  +0.05790 − 0.07387i  0.00881 
naïveté = 0.69554
entropy = 2.19499 
If we nmeasure the first bit, we get either B_{1} (probability 0.22304 + 0.18926 + 0.00805 + 0.00683 = 0.42718) or B_{2} (probability 0.30884 + 0.24402 + 0.01115 + 0.00881 = 0.57282):


If we nmeasure the second bit, we get either B_{3} (probability 0.96516) or B_{4} (probability 0.03484):


If we nmeasure the third bit, we get either B_{5} (probability 0.55108) or B_{6} (probability 0.44892):


Much as before, we can dismiss the zeroamplitude states and write a hash mark for qubits already nmeasured to yield briefer forms:

 

 


Among the qubits of the original qureg B_{0}:
Another page shows a similar breakdown of A_{0}.
§11. Suppose C and D are two ordinary quregs bearing no particular relationship to each other:


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

State  Amplitude  Probability  State  Amplitude  Probability  
│00000 ⟩  +0.00449 + 0.25173i  0.06339  │10000 ⟩  +0.19446 − 0.12638i  0.05379  
│00001 ⟩  +0.01175 + 0.16172i  0.02629  │10001 ⟩  +0.12060 − 0.08811i  0.02231  
│00010 ⟩  +0.04786 − 0.23428i  0.05718  │10010 ⟩  −0.20638 + 0.07697i  0.04852  
│00011 ⟩  +0.04613 + 0.04475i  0.00413  │10011 ⟩  +0.01244 − 0.05788i  0.00350  
│00100 ⟩  +0.10263 − 0.18867i  0.04613  │10100 ⟩  −0.19748 + 0.01192i  0.03914  
│00101 ⟩  −0.07567 + 0.12854i  0.02225  │10101 ⟩  +0.13735 − 0.00363i  0.01888  
│00110 ⟩  −0.22547 − 0.10107i  0.06105  │10110 ⟩  +0.03110 + 0.22547i  0.05180  
│00111 ⟩  +0.04354 − 0.10384i  0.01268  │10111 ⟩  −0.10237 + 0.01667i  0.01076  
│01000 ⟩  +0.01883 − 0.11826i  0.01434  │11000 ⟩  −0.28775 − 0.04423i  0.08476  
│01001 ⟩  +0.00795 − 0.07671i  0.00595  │11001 ⟩  −0.18659 − 0.01831i  0.03515  
│01010 ⟩  −0.04190 + 0.10574i  0.01294  │11010 ⟩  +0.25760 + 0.10047i  0.07645  
│01011 ⟩  −0.01788 − 0.02479i  0.00093  │11011 ⟩  −0.06004 + 0.04380i  0.00552  
│01100 ⟩  −0.06375 + 0.07982i  0.01044  │11100 ⟩  +0.19489 + 0.15394i  0.06168  
│01101 ⟩  +0.04613 − 0.05391i  0.00503  │11101 ⟩  −0.13165 − 0.11144i  0.02975  
│01110 ⟩  +0.09718 + 0.06609i  0.01381  │11110 ⟩  +0.15938 − 0.23713i  0.08163  
│01111 ⟩  −0.02903 + 0.04501i  0.00287  │11111 ⟩  +0.10980 + 0.06997i  0.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 m_{r} rows and m_{c} columns, and N be any matrix with n_{r} rows and n_{c} 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 = M ⊗ N will have m_{r} × n_{r} rows and m_{c} × n_{c} columns, and M (i, j) × N (k, l) is the value to be placed into location P (i * n_{r} + k, j * n_{c} + 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 m_{r}, m_{c}, n_{r} and n_{c} 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 fourdimensional 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 ρ = C ⊗ C^{H}, which is hermitian and beyond that, nonnegative on the diagonal:
ρ = C ⊗ C^{H}  

+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 C ⊗ C^{H}. The closest possible is to construct a state C′ where each amplitude differs from the corresponding amplitude of C by a complexnumber 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  

State  Amplitude  Probability 
│00 ⟩  +0.32532 − 0.51274i  0.36874 
│01 ⟩  +0.06902 + 0.14781i  0.02661 
│10 ⟩  −0.29576 + 0.23664i  0.14347 
│11 ⟩  −0.41896 + 0.53446i  0.46118 
naïveté = 0.64872 entropy = 1.58681 
Its density matrix is:
σ = E ⊗ E^{H}  

+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 wellknown 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 purestate density matrix will be unity, but in the mixedstate 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: