Classical information
Like we did in the previous lesson, we'll begin this lesson with a discussion of classical information. Once again, the probabilistic and quantum descriptions are mathematically similar, and recognizing how the mathematics works in the familiar setting of classical information is helpful in understanding why quantum information is described in the way that it is.
Classical states via the Cartesian product
We'll start at a very basic level, with classical states of multiple systems. For simplicity, we'll begin by discussing just two systems, and then generalize to more than two systems.
To be precise, let be a system whose classical state set is and let be a second system whose classical state set is Note that, because we have referred to these sets as classical state sets, our assumption is that and are both finite and nonempty. It could be that but this is not necessarily so — and regardless, it will be helpful to use different names to refer to these sets in the interest of clarity.
Now imagine that the two systems, and are placed side-by-side, with on the left and on the right. If we so choose, we can view these two systems as if they form a single system, which we can denote by or depending on our preference. A natural question to ask about this compound system is, "What are its classical states?"
The answer is that the set of classical states of is the Cartesian product of and which is the set defined as
In simple terms, the Cartesian product is precisely the mathematical notion that captures the idea of viewing an element of one set and an element of a second set together, as if they form a single element of a single set. In the case at hand, to say that is in the classical state means that is in the classical state and is in the classical state and if the classical state of is and the classical state of is then the classical state of the joint system is
For more than two systems, the situation generalizes in a natural way. If we suppose that are systems having classical state sets respectively, for any positive integer the classical state set of the -tuple viewed as a single joint system, is the Cartesian product
Of course, we are free to use whatever names we wish for systems, and to order them as we choose. In particular, if we have systems like above, we could instead choose to name them and arrange them from right to left, so that the joint system becomes Following the same pattern for naming the associated classical states and classical state sets, we might then refer to a classical state
of this compound system. Indeed, this is the ordering convention used by Qiskit when naming multiple qubits. We'll come back to this convention and how it connects to quantum circuits in the next lesson, but we'll start using it now to help to get used to it.
It is often convenient to write a classical state of the form as a A *string* is a finite, ordered sequence of symbols or characters. for the sake of brevity, particularly in the very typical situation that the classical state sets are associated with sets of symbols or characters. In this context, the term alphabet is commonly used to refer to sets of symbols used to form strings, but the mathematical definition of an alphabet is precisely the same as the definition of a classical state set: it is a finite and nonempty set.
For example, suppose that are bits, so that the classical state sets of these systems are all the same.
There are then classical states of the joint system which are the elements of the set
Written as strings, these classical states look like this:
For the classical state for instance, we see that and are in the state while all other systems are in the state
Probabilistic states
Recall from the previous lesson that a probabilistic state associates a probability with each classical state of a system. Thus, a probabilistic state of multiple systems — viewed collectively as a single system — associates a probability with each element of the Cartesian product of the classical state sets of the individual systems.
For example, suppose that and are both bits, so that their corresponding classical state sets are and respectively. Here is a probabilistic state of the pair
This probabilistic state is one in which both and are random bits — each is with probability and with probability — but the classical states of the two bits always agree. This is an example of a correlation between these systems.
Ordering Cartesian product state sets
Probabilistic states of systems can be represented by probability vectors, as was discussed in the previous lesson. In particular, the vector entries represent probabilities for the system to be in the possible classical states of that system, and the understanding is that a correspondence between the entries and the set of classical states has been selected.
Choosing such a correspondence effectively means deciding on an ordering of the classical states, which is often natural or determined by a standard convention. For example, the binary alphabet is naturally ordered with first and second, so the first entry in a probability vector representing a probabilistic state of a bit is the probability for it to be in the state and the second entry is the probability for it to be in the state
None of this changes in the context of multiple systems, but there is a decision to be made. The classical state set of multiple systems together, viewed collectively as a single system, is the Cartesian product of the classical state sets of the individual systems — so we must decide how the elements of Cartesian products of classical state sets are to be ordered.
There is a simple convention that we follow for doing this, which is to start with whatever orderings are already in place for the individual classical state sets, and then to order the elements of the Cartesian product alphabetically. Another way to say this is that the entries in each -tuple (or, equivalently, the symbols in each string) are treated as though they have significance that decreases from left to right. For example, according to this convention, the Cartesian product is ordered like this:
When -tuples are written as strings and ordered in this way, we observe familiar patterns, such as being ordered as and the set being ordered as it was written earlier in the lesson. As another example, viewing the set as a set of strings, we obtain the two-digit numbers through ordered numerically. This is obviously not a coincidence; our decimal number system uses precisely this sort of alphabetical ordering, where the word alphabetical should be understood as having a broad meaning that includes numerals in addition to letters.
Returning to the example of two bits from above, the probabilistic state described previously is therefore represented by the following probability vector, where the entries are labeled explicitly for the sake of clarity.
Independence of two systems
A special type of probabilistic state of two systems is one in which the systems are independent. Intuitively speaking, two systems are independent if learning the classical state of either system has no effect on the probabilities associated with the other. That is, learning what classical state one of the systems is in provides no information at all about the classical state of the other.
To define this notion precisely, let us suppose once again that and are systems having classical state sets and respectively. With respect to a given probabilistic state of these systems, they are said to be independent if it is the case that
for every choice of and
To express this condition in terms of probability vectors, assume that the given probabilistic state of is described by a probability vector, written in the Dirac notation as
The condition for independence is then equivalent to the existence of two probability vectors
representing the probabilities associated with the classical states of and respectively, such that
for all and
For example, the probabilistic state of a pair of bits represented by the vector
is one in which and are independent. Specifically, the condition required for independence is true for the probability vectors
For instance, to make the probabilities for the state match, we need and indeed this is the case. Other entries can be verified in a similar manner.
On the other hand, the probabilistic state which we may write as
does not represent independence between the systems and A simple way to argue this follows.
Suppose that there did exist probability vectors and as in equation above, for which the condition is satisfied for every choice of and It would then necessarily be that
This implies that either or because if both were nonzero, the product would also be nonzero. This leads to the conclusion that either (in case ) or (in case ). We see, however, that neither of those equalities can be true because we must have and Hence, there do not exist vectors and satisfying the property required for independence.
Having defined independence between two systems, we can now define what is meant by correlation: it is a lack of independence. For example, because the two bits in the probabilistic state represented by the vector are not independent, they are, by definition, correlated.
Tensor products of vectors
The condition of independence just described can be expressed succinctly through the notion of a tensor product. Although tensor products are a very general notion, and can be defined quite abstractly and applied to a variety of mathematical structures, we can adopt a simple and concrete definition in the case at hand.
Given two vectors
the tensor product is the vector defined as
The entries of this new vector correspond to the elements of the Cartesian product which are written as strings in the previous equation. Equivalently, the vector is defined by the equation
being true for every and
We can now recast the condition for independence: for a joint system in a probabilistic state represented by a probability vector the systems and are independent if is obtained by taking a tensor product
of probability vectors and on each of the subsystems and In this situation, is said to be a product state or product vector.
We often omit the symbol when taking the tensor product of kets, such as writing rather than This convention captures the idea that the tensor product is, in this context, the most natural or default way to take the product of two vectors. Although it is less common, the notation is also sometimes used.
When we use the alphabetical convention for ordering elements of Cartesian products, we obtain the following specification for the tensor product of two column vectors.
As an important aside, notice the following expression for tensor products of standard basis vectors:
We could alternatively write as an ordered pair, rather than a string, in which case we obtain It is, however, more common to omit the parentheses in this situation, instead writing This is typical in mathematics more generally; parentheses that don't add clarity or remove ambiguity are often simply omitted.
The tensor product of two vectors has the important property that it is bilinear, which means that it is linear in each of the two arguments separately, assuming that the other argument is fixed. This property can be expressed through these equations:
1. Linearity in the first argument:
2. Linearity in the second argument:
Considering the second equation in each of these pairs of equations, we see that scalars "float freely" within tensor products:
There is therefore no ambiguity in simply writing or alternatively or to refer to this vector.
Independence and tensor products for three or more systems
The notions of independence and tensor products generalize straightforwardly to three or more systems. If are systems having classical state sets respectively, then a probabilistic state of the combined system is a product state if the associated probability vector takes the form
for probability vectors describing probabilistic states of Here, the definition of the tensor product generalizes in a natural way: the vector
is defined by the equation
being true for every
A different, but equivalent, way to define the tensor product of three or more vectors is recursively in terms of tensor products of two vectors:
Similar to the tensor product of just two vectors, the tensor product of three or more vectors is linear in each of the arguments individually, assuming that all other arguments are fixed. In this case it is said that the tensor product of three or more vectors is multilinear.
Like in the case of two systems, we could say that the systems are independent when they are in a product state, but the term mutually independent is more precise. There happen to be other notions of independence for three or more systems, such as pairwise independence, that are both interesting and important — but not in the context of this course.
Generalizing the observation earlier concerning tensor products of standard basis vectors, for any positive integer and any classical states we have
Measurements of probabilistic states
Now let us move on to measurements of probabilistic states of multiple systems. By choosing to view multiple systems together as single systems, we immediately obtain a specification of how measurements must work for multiple systems — provided that all of the systems are measured.
For example, if the probabilistic state of two bits is described by the probability vector
then the outcome — meaning for the measurement of and for the measurement of — is obtained with probability and the outcome is also obtained with probability In each case we update the probability vector description of our knowledge accordingly, so that the probabilistic state becomes or respectively.
We could, however, choose to measure not every system, but instead just some of the systems. This will result in a measurement outcome for each system that gets measured, and will also (in general) affect our knowledge of the remaining systems that we didn't measure.
To explain how this works, we'll focus on the case of two systems, one of which is measured. The more general situation — in which some proper subset of three or more systems is measured — effectively reduces to the case of two systems when we view the systems that are measured collectively as if they form one system and the systems that are not measured as if they form a second system.
To be precise, let's suppose that and are systems whose classical state sets are and respectively, and that the two systems together are in some probabilistic state. We'll consider what happens when we measure just and do nothing to The situation where just is measured and nothing happens to is handled symmetrically.
First, we know that the probability to observe a particular classical state when just is measured must be consistent with the probabilities we would obtain under the assumption that was also measured. That is, we must have
This is the formula for the so-called reduced (or marginal) probabilistic state of alone.
This formula makes perfect sense at an intuitive level, in the sense that something very strange would have to happen for it to be wrong. If it were wrong, that would mean that measuring could somehow influence the probabilities associated with different outcomes of the measurement of irrespective of the actual outcome of the measurement of If happened to be in a distant location, such as somewhere in another galaxy for instance, this would allow for faster-than-light signaling — which we reject based on our understanding of physics. Another way to understand this comes from the interpretation of probability as reflecting a degree of belief. The mere fact that someone else might decide to look at cannot change the classical state of so without any information about what they did or didn't see, one's beliefs about the state of should not change as a result.
Now, given the assumption that only is measured and is not, there may still exist uncertainty about the classical state of For this reason, rather than updating our description of the probabilistic state of to for some selection of and we must update our description so that this uncertainty about is properly reflected.
The following conditional probability formula reflects this uncertainty.
Here, the expression denotes the probability that conditioned on (or given that) Technically speaking, this expression only makes sense if is nonzero, for if then we're dividing by zero and we obtain indeterminate form This is not a problem, though, because if the probability associated with is zero, then we'll never obtain as an outcome of a measurement of so we don't need to be concerned with this possibility.
To express these formulas in terms of probability vectors, consider a probability vector describing a joint probabilistic state of
Measuring alone yields each possible outcome with probability
The vector representing the probabilistic state of alone is therefore given by
Having obtained a particular outcome of the measurement of the probabilistic state of is updated according to the formula for conditional probabilities, so that it is represented by this probability vector:
In the event that the measurement of resulted in the classical state we therefore update our description of the probabilistic state of the joint system to
One way to think about this definition of is to see it as a normalization of the vector where we divide by the sum of the entries in this vector to obtain a probability vector. This normalization effectively accounts for a conditioning on the event that the measurement of has resulted in the outcome
For a specific example, suppose that classical state set of is the classical state set of is and the probabilistic state of is
Our goal will be to determine the probabilities of the two possible outcomes ( and ), and to calculate what the resulting probabilistic state of is for the two outcomes, assuming the system is measured.
Using the bilinearity of the tensor product, and specifically the fact that it is linear in the second argument, we may rewrite the vector as follows:
In words, what we've done is to isolate the distinct standard basis vectors for the first system (i.e., the one being measured), tensoring each with the linear combination of standard basis vectors for the second system we get by picking out the entries of the original vector that are consistent with the corresponding classical state of the first system. A moment's thought reveals that this is always possible, regardless of what vector we started with.
Having expressed our probability vector in this way, the effects of measuring the first system become easy to analyze. The probabilities of the two outcomes can be obtained by summing the probabilities in parentheses.
These probabilities sum to one, as expected — but this is a useful check on our calculations.
And now, the probabilistic state of conditioned on each possible outcome can be inferred by normalizing the vectors in parentheses. That is, we divide these vectors by the associated probabilities we just calculated, so that they become probability vectors.
Thus, conditioned on being the probabilistic state of becomes
and conditioned on the measurement of being the probabilistic state of becomes
Operations on probabilistic states
To conclude this discussion of classical information for multiple systems, we'll consider operations on multiple systems in probabilistic states. Following the same idea as before, we can view multiple systems collectively as single, compound systems, and then look to the previous lesson to see how this works.
Returning to the typical set-up where we have two systems and let us consider classical operations on the compound system Based on the previous lesson and the discussion above, we conclude that any such operation is represented by a stochastic matrix whose rows and columns are indexed by the Cartesian product
For example, suppose that and are bits, and consider an operation with the following description.
If then perform a NOT operation on
Otherwise do nothing.
This is a deterministic operation known as a controlled-NOT operation, where is the control bit that determines whether or not a NOT operation should be applied to the target bit Here is the matrix representation of this operation:
Its action on standard basis states is as follows.
If we were to exchange the roles of and taking to be the control bit and to be the target bit, then the matrix representation of the operation would become
and its action on standard basis states would be like this:
Another example is the operation having this description:
Perform one of the following two operations, each with probability
- Set to be equal to
- Set to be equal to
The matrix representation of this operation is as follows:
The action of this operation on standard basis vectors is as follows:
In these examples, we are simply viewing two systems together as a single system and proceeding as in the previous lesson.
The same thing can be done for any number of systems. For example, imagine that we have three bits, and we increment the three bits modulo — meaning that we think about the three bits as encoding a number between and using binary notation, add and then take the remainder after dividing by One way to express this operation is like this:
Another way to express it is as
assuming we've agreed that numbers from to inside of kets refer to the three-bit binary encodings of those numbers. A third option is to express this operation as a matrix.
Independent operations
Now suppose that we have multiple systems and we independently perform different operations on the systems separately.
For example, taking our usual set-up of two systems and having classical state sets and respectively, let us suppose that we perform one operation on and, completely independently, another operation on As we know from the previous lesson, these operations are represented by stochastic matrices — and to be precise, let us say that the operation on is represented by the matrix and the operation on is represented by the matrix Thus, the rows and columns of have indices that are placed in correspondence with the elements of and, likewise, the rows and columns of correspond to the elements of
A natural question to ask is this: if we view and together as a single, compound system what is the matrix that represents the combined action of the two operations on this compound system? To answer this question we must first introduce tensor products of matrices, which are similar to tensor products of vectors and are defined analogously.
Tensor products of matrices
The tensor product of the matrices
and
is the matrix
Equivalently, the tensor product of and is defined by the equation
being true for every selection of and
An alternative, but equivalent, way to describe is that it is the unique matrix that satisfies the equation
for every possible choice of vectors and assuming that the indices of correspond to the elements of and the indices of correspond to
Following the convention described previously for ordering the elements of Cartesian products, we can also write the tensor product of two matrices explicitly as follows:
Tensor products of three or more matrices are defined in an analogous way. If are matrices whose indices correspond to classical state sets then the tensor product is defined by the condition that
for every choice of classical states Alternatively, tensor products of three or more matrices can be defined recursively, in terms of tensor products of two matrices, similar to what we observed for vectors.
The tensor product of matrices is sometimes said to be multiplicative because the equation
is always true, for any choice of matrices and provided that the products make sense.
Independent operations (continued)
We can now answer the question asked previously: if is a probabilistic operation on is a probabilistic operation on and the two operations are performed independently, then the resulting operation on the compound system is the tensor product
So, for both probabilistic states and probabilistic operations, tensor products represent independence. If we have two systems and that are independently in the probabilistic states and then the compound system is in the probabilistic state and if we apply probabilistic operations and to the two systems independently, then the resulting action on the compound system is described by the operation
Let's take a look at an example, which recalls a probabilistic operation on a single bit from the previous lesson: if the classical state of the bit is it is left alone; and if the classical state of the bit is it is flipped to 0 with probability We observed that this operation is represented by the matrix
If this operation is performed on a bit and a NOT operation is (independently) performed on a second bit then the joint operation on the compound system has the matrix representation
By inspection, we see that this is a stochastic matrix. This will always be the case: the tensor product of two or more stochastic matrices is always stochastic.
A common situation that we encounter is one in which one operation is performed on one system and nothing is done to another. In such a case, exactly the same prescription is followed, bearing in mind that doing nothing is represented by the identity matrix. For example, resetting the bit to the state and doing nothing to yields the probabilistic (and in fact deterministic) operation on represented by the matrix