Quantum circuits
Download the slides for this lesson.
Open the YouTube video for this lesson in a separate window.
Introduction
This lesson introduces the quantum circuit model of computation, which provides a standard way to describe quantum computations. It also introduces a few important mathematical concepts, including inner products between vectors, the notions of orthogonality and orthonormality, and projections and projective measurements, which generalize standard basis measurements. Through these concepts, we'll derive fundamental limitations on quantum information, including the no-cloning theorem and the impossibility to perfectly discriminate non-orthogonal quantum states.
Circuits
In computer science, circuits are models of computation in which information is carried by wires through a network of gates, which represent operations on the information carried by the wires. Quantum circuits are a specific model of computation based on this more general concept.
Although the word "circuit" often refers to a circular path, circular paths aren't actually allowed in the circuit models of computation that are most commonly studied. That is to say, we usually consider acyclic circuits when we're thinking about circuits as computational models. Quantum circuits follow this pattern; a quantum circuit represents a finite sequence of operations that cannot contain feedback loops.
Boolean circuits
Here is an example of a (classical) Boolean circuit, where the wires carry binary values and the gates represent Boolean logic operations:
The flow of information along the wires goes from left to right: the wires on the left-hand side of the figure labeled and are input bits, which can each be set to whatever binary value we choose, and the wire on the right-hand side is the output. The intermediate wires take whatever values are determined by the gates, which are evaluated from left to right.
The gates are AND gates (labeled ), OR gates (labeled ), and NOT gates (labeled ). The functions computed by these gates will likely be familiar to many readers, but here they are represented by tables of values:
The two small, solid circles on the wires just to the right of the names and represent fanout operations, which simply create a copy of whatever value is carried on the wire on which they appear, allowing this value to be input into multiple gates. Fanout operations are not always considered to be gates in the classical setting; sometimes they're treated as if they're "free" in some sense. When Boolean circuits are converted into equivalent quantum circuits, however, we do need to classify fanout operations explicitly as gates to handle and account for them correctly.
Here's the same circuit illustrated in a style more common in electrical engineering, which uses conventional symbols for the AND, OR, and NOT gates:
We won't use this style or these particular gate symbols further, but we will use different symbols to represent gates in quantum circuits, which we'll explain as we encounter them.
The particular circuit in this example computes the exclusive-OR (or XOR for short), which is denoted by the symbol :
In the next diagram we consider just one choice for the inputs: and Each wire is labeled by value it carries so you can follow the operations. The output value is in this case, which is the correct value for the XOR:
The other three possible input settings can be checked in a similar way.
Other types of circuits
As was suggested above, the notion of a circuit in computer science is very general. For example, circuits whose wires carry values other than and are sometimes analyzed, as are gates representing different choices of operations.
In arithmetic circuits, for instance, the wires may carry integer values while the gates represent arithmetic operations, such as addition and multiplication. The following figure depicts an arithmetic circuit that takes two variable input values ( and ) as well as a third input set to the value The values carried by the wires, as functions of the values and are shown in the figure.
We can also consider circuits that incorporate randomness, such as ones where gates represent probabilistic operations.
Quantum circuits
In the quantum circuit model, wires represent qubits and gates represent operations on these qubits. We'll focus for now on operations we've encountered so far, namely unitary operations and standard basis measurements. As we learn about other sorts of quantum operations and measurements, we can enhance our model accordingly.
Here's a simple example of a quantum circuit:
In this circuit, we have a single qubit named which is represented by the horizontal line, and a sequence of gates representing unitary operations on this qubit. Just like in the examples above, the flow of information goes from left to right — so the first operation performed is a Hadamard operation, the second is an operation, the third is another Hadamard operation, and the final operation is a operation. Applying the entire circuit therefore applies the composition of these operations, to the qubit
Sometimes we may wish to explicitly indicate the input or output states of circuits. For example, if we apply the operation to the state we obtain the state This can be indicated as follows:
Quantum circuits often start out with all qubits initialized to as we have in this case, but there are also situations where the input qubits are initially set to different states.
Now let's see how we can specify this circuit in Qiskit. We'll start with a version check along with the imports needed for the remainder of the lesson.
Output:
1.3.1
No output produced
We've seen some of these imports in the two previous lessons, but others are new. For now, let's just highlight that we will be using the Aer simulator to simulate quantum circuits.
To begin, we can build the circuit above as follows, by defining a quantum circuit with one qubit and sequentially adding gates from left to right.
Output:
The default names for qubits in Qiskit are etc., and when there's just a single qubit, like in our example, the default name is rather than If we wish to choose our own name we can do this using the
Output:
Here's another example of a quantum circuit, this time with two qubits:
As always, the gate labeled refers to a Hadamard operation, while the second gate is a controlled-NOT operation: the solid circle represents the control qubit and the circle resembling the symbol denotes the target qubit.
Before examining this circuit in greater detail and explaining what it does, it is imperative that we first clarify how qubits are ordered in quantum circuits. This connects with the convention that Qiskit uses for naming and ordering systems that was mentioned briefly in the previous lesson.
Qiskit's qubit ordering convention for circuits
In Qiskit, the topmost qubit in a circuit diagram has index and corresponds to the rightmost position in a tuple of qubits (or in a string, Cartesian product, or tensor product corresponding to this tuple). The second-from-top qubit has index and corresponds to the position second-from-right in a tuple, and so on, down to the bottommost qubit, which has the highest index, and corresponds to the leftmost position in a tuple.
In particular, Qiskit's default names for the qubits in an -qubit circuit are represented by the -tuple with being the qubit on the top and on the bottom in quantum circuit diagrams.
Please be aware that this is a reversal of a more common convention for ordering qubits in circuits, and is a frequent source of confusion. Further information on this ordering convention can be found on the Bit-ordering in Qiskit documentation page.
Although we sometimes deviate from the specific default names used for qubits by Qiskit, we will always follow the ordering convention described above when interpreting circuit diagrams throughout this course. Thus, our interpretation of the circuit above is that it describes an operation on a pair of qubits If the input to the circuit is a quantum state for instance, then this means that the lower qubit starts in the state and the upper qubit starts in the state
To understand what the circuit does, we can go from left to right through its operations.
The first operation is a Hadamard operation on :
When applying a gate to a single qubit like this, nothing happens to the other qubits (which is just one other qubit in this case). Nothing happening is equivalent to the identity operation being performed. The dotted rectangle in the figure above therefore represents this operation:
Note that the identity matrix is on the left of the tensor product and is on the right, which is consistent with Qiskit's ordering convention.
The second operation is the controlled-NOT operation, where is the control and is the target:
The controlled-NOT gate's action on standard basis states is as follows:
Given that we order the qubits as with being on the bottom and being on the top of our circuit, the matrix representation of the controlled-NOT gate is this:
The unitary operation implemented by the entire circuit, which we'll give the name is the composition of the operations:
In particular, recalling our notation for the Bell states,
we find that
This circuit therefore gives us a way to create the state if we run it on two qubits initialized to More generally, it provides us with a way to convert the standard basis to the Bell basis. (Note that, while it is not important for this example, the phase factor on the last state, could be eliminated if we wanted by making a small addition to the circuit. For instance, we could add a controlled- gate at the beginning, which is similar to a controlled-NOT gate except that a operation is applied to the target qubit rather than a NOT operation when the control is set to Alternatively, we could add a swap gate at the end. Either choice eliminates the minus sign without affecting the circuit's action on the other three standard basis states.)
Let's create the circuit in Qiskit and check that our calculations are correct.
Output:
In general, quantum circuits can contain any number of qubit wires. We may also include classical bit wires, which are indicated by double lines, like in this example:
Here we have a Hadamard gate and a controlled-NOT gate on two qubits and just like in the previous example. We also have two classical bits, and as well as two measurement gates. The measurement gates represent standard basis measurements: the qubits are changed into their post-measurement states, while the measurement outcomes are overwritten onto the classical bits to which the arrows point.
Here's an implementation of this circuit using Qiskit:
Output:
The circuit can be simulated using the Aer simulator like this:
Output:
It's often convenient to depict a measurement as a gate that takes a qubit as input and outputs a classical bit (as opposed to outputting the qubit in its post-measurement state and writing the result to a separate classical bit). This means the measured qubit has been discarded and can safely be ignored thereafter, its state having changed into or depending upon the measurement outcome.
For example, the following circuit diagram represents the same process as the one in the previous diagram, but where we disregard and after measuring them:
As the course continues, we'll see more examples of quantum circuits, which are usually more complicated than the simple examples above. Here are some examples of symbols used to denote gates that commonly appear in circuit diagrams:
Single-qubit gates are generally shown as squares with a letter indicating which operation it is, like this:
Not gates (or, equivlently, gates) are also sometimes denoted by a circle around a plus sign:
Swap gates are denoted as follows:
Controlled-gates, meaning gates that describe controlled-unitary operations, are denoted by a filled-in circle (indicating the control) connected by a vertical line to whatever operation is being controlled. For instance, controlled-NOT gates, controlled-controlled-NOT (or Toffoli) gates, and controlled-swap (Fredkin) gates are denoted like this:
Arbitrary unitary operations on multiple qubits may be viewed as gates. They are depicted by rectangles labeled by the name of the unitary operation. For instance, here is a depiction of an (unspecified) unitary operation as a gate, along with a controlled version of this gate:
Inner products, orthonormality, and projections
To better prepare ourselves to explore the capabilities and limitations of quantum circuits, we now introduce some additional mathematical concepts — namely the inner product between vectors (and its connection to the Euclidean norm), the notions of orthogonality and orthonormality for sets of vectors, and projection matrices, which will allow us to introduce a handy generalization of standard basis measurements.
Inner products
Recall from the Single systems lesson that, when we use the Dirac notation to refer to an arbitrary column vector as a ket, such as
the corresponding bra vector is the conjugate transpose of this vector:
Alternatively, if we have some classical state set in mind, and we express a column vector as a ket, such as
then the corresponding row (or bra) vector is the conjugate transpose
We also observed that the product of a bra vector and a ket vector, viewed as matrices either having a single row or a single column, results in a scalar. Specifically, if we have two (column) vectors
so that the row vector is as in equation then
Alternatively, if we have two column vectors that we have written as
so that is the row vector we find that
where the last equality follows from the observation that and for classical states and satisfying
The value is called the inner product between the vectors and Inner products are critically important in quantum information and computation — we would not get far in understanding quantum information at a mathematical level without them.
Let us now collect together some basic facts about inner products of vectors.
Relationship to the Euclidean norm. The inner product of any vector
with itself is
Thus, the Euclidean norm of a vector may alternatively be expressed as
Notice that the Euclidean norm of a vector must always be a nonnegative real number. Moreover, the only way the Euclidean norm of a vector can be equal to zero is if every one of the entries is equal to zero, which is to say that the vector is the zero vector.
We can summarize these observations like this: for every vector we have
with if and only if This property of the inner product is sometimes referred to as positive definiteness.
Conjugate symmetry. For any two vectors
we have
and therefore
Linearity in the second argument (and conjugate linearity in the first). Let us suppose that and are vectors and and are complex numbers. If we define a new vector
then
That is to say, the inner product is linear in the second argument. This can be verified either through the formulas above or simply by noting that matrix multiplication is linear in each argument (and specifically in the second argument).
Combining this fact with conjugate symmetry reveals that the inner product is conjugate linear in the first argument. That is, if and are vectors and and are complex numbers, and we define
then
The Cauchy–Schwarz inequality. For every choice of vectors and having the same number of entries, we have
This is an incredibly handy inequality that gets used quite extensively in quantum information (and in many other fields of study).
Orthogonal and orthonormal sets
Two vectors and are said to be orthogonal if their inner product is zero:
Geometrically, we can think about orthogonal vectors as vectors at right angles to each other.
A set of vectors is called an orthogonal set if every vector in the set is orthogonal to every other vector in the set. That is, this set is orthogonal if
for all choices of for which
A set of vectors is called an orthonormal set if it is an orthogonal set and, in addition, every vector in the set is a unit vector. Alternatively, this set is an orthonormal set if we have
for all choices of
Finally, a set is an orthonormal basis if, in addition to being an orthonormal set, it forms a basis. This is equivalent to being an orthonormal set and being equal to the dimension of the space from which are drawn.
For example, for any classical state set the set of all standard basis vectors
is an orthonormal basis. The set is an orthonormal basis for the -dimensional space corresponding to a single qubit, and the Bell basis is an orthonormal basis for the -dimensional space corresponding to two qubits.
Extending orthonormal sets to orthonormal bases
Suppose that are vectors that live in an -dimensional space, and assume moreover that is an orthonormal set. Orthonormal sets are always linearly independent sets, so these vectors necessarily span a subspace of dimension From this we conclude that because the dimension of the subspace spanned by these vectors cannot be larger than the dimension of the entire space from which they're drawn.
If it is the case that then it is always possible to choose an additional vectors so that forms an orthonormal basis. A procedure known as the Gram–Schmidt orthogonalization process can be used to construct these vectors.
Orthonormal sets and unitary matrices
Orthonormal sets of vectors are closely connected with unitary matrices. One way to express this connection is to say that the following three statements are logically equivalent (meaning that they are all true or all false) for any choice of a square matrix :
- The matrix is unitary (i.e., ).
- The rows of form an orthonormal set.
- The columns of form an orthonormal set.
This equivalence is actually pretty straightforward when we think about how matrix multiplication and the conjugate transpose work. Suppose, for instance, that we have a matrix like this:
The conjugate transpose of looks like this:
Multiplying the two matrices, with the conjugate transpose on the left-hand side, gives us this matrix:
If we form three vectors from the columns of
then we can alternatively express the product above as follows:
Referring to the equation we now see that the condition that this matrix is equal to the identity matrix is equivalent to the orthonormality of the set This argument generalizes to unitary matrices of any size. The fact that the rows of a matrix form an orthonormal basis if and only if the matrix is unitary then follows from the fact that a matrix is unitary if and only if its transpose is unitary.
Given the equivalence described above, together with the fact that every orthonormal set can be extended to form an orthonormal basis, we conclude the following useful fact: Given any orthonormal set of vectors drawn from an -dimensional space, there exists a unitary matrix whose first columns are the vectors Pictorially, we can always find a unitary matrix having this form:
Here, the last columns are filled in with any choice of vectors that make an orthonormal basis.
Projections and projective measurements
Projection matrices
A square matrix is called a projection if it satisfies two properties:
Matrices that satisfy the first condition — that they are equal to their own conjugate transpose — are called Hermitian matrices, and matrices that satisfy the second condition — that squaring them leaves them unchanged — are called idempotent matrices.
As a word of caution, the word projection is sometimes used to refer to any matrix that satisfies just the second condition but not necessarily the first, and when this is done the term orthogonal projection is typically used to refer to matrices satisfying both properties. In the context of quantum information and computation, however, terms projection and projection matrix more typically refer to matrices satisfying both conditions.
An example of a projection is the matrix
for any unit vector We can see that this matrix is Hermitian as follows:
Here, to obtain the second equality, we have used the formula
which is always true, for any two matrices and for which the product makes sense.
To see that the matrix in is idempotent, we can use the assumption that is a unit vector, so that it satisfies Thus, we have
More generally, if is any orthonormal set of vectors, then the matrix
is a projection. Specifically, we have
and
where the orthonormality of implies the second-to-last equality.
In fact, this exhausts all of the possibilities; every projection can be written in the form for some choice of an orthonormal set (Technically speaking, the zero matrix which is a projection, is a special case. To fit it into the general form (5) we must allow the possibility that the sum is empty, resulting in the zero matrix.)
Projective measurements
The notion of a measurement of a quantum system is more general than just standard basis measurements. Projective measurements are measurements that are described by a collection of projections whose sum is equal to the identity matrix. In symbols, a collection of projection matrices describes a projective measurement if
When such a measurement is performed on a system while it is in some state two things happen:
For each the outcome of the measurement is with probability equal to
For whichever outcome the measurement produces, the state of becomes
We can also choose outcomes other than for projective measurements if we wish. More generally, for any finite and nonempty set if we have a collection of projection matrices
that satisfies the condition
then this collection describes a projective measurement whose possible outcomes coincide with the set where the rules are the same as before:
For each the outcome of the measurement is with probability equal to
For whichever outcome the measurement produces, the state of becomes
For example, standard basis measurements are equivalent to projective measurements, where is the set of classical states of whatever system we're talking about and our set of projection matrices is
Another example of a projective measurement, this time on two qubits is given by the set where
If we have multiple systems that are jointly in some quantum state and a projective measurement is performed on just one of the systems, the action is similar to what we had for standard basis measurements — and in fact we can now describe this action in much simpler terms than we could before. To be precise, let us suppose that we have two systems in a quantum state and a projective measurement described by a collection is performed on the system while nothing is done to Doing this is then equivalent to performing the projective measurement described by the collection
on the joint system Each measurement outcome results with probability
and conditioned on the result appearing, the state of the joint system becomes
Implementing projective measurements using standard basis measurements
Arbitrary projective measurements can be implemented using unitary operations, standard basis measurements, and an extra workspace system, as will now be explained.
Let us suppose that is a system and is a projective measurement on We can easily generalize this discussion to projective measurements having different sets of outcomes, but in the interest of convenience and simplicity we will assume the set of possible outcomes for our measurement is Let us note explicitly that is not necessarily equal to the number of classical states of — we'll let be the number of classical states of which means that each matrix is an projection matrix. Because we assume that represents a projective measurement, it is necessarily the case that
Our goal is to perform a process that has the same effect as performing this projective measurement on but to do this using only unitary operations and standard basis measurements.
We will make use of an extra workspace system to do this, and specifically we'll take the classical state set of to be which is the same as the set of outcomes of the projective measurement. The idea is that we will perform a standard basis measurement on and interpret the outcome of this measurement as being equivalent to the outcome of the projective measurement on We'll need to assume that is initialized to some fixed state, which we'll choose to be (Any other choice of fixed quantum state vector could be made to work, but choosing makes the explanation to follow much simpler.)
Of course, in order for a standard basis measurement of to tell us anything about we will need to allow and to interact somehow before measuring by performing a unitary operation on the system First consider this matrix:
Expressed explicitly as a so-called block matrix, which is essentially a matrix of matrices that we interpret as a single, larger matrix, looks like this:
Here, each represents an matrix filled entirely with zeros, so that the entire matrix is an matrix.
Now, is certainly not a unitary matrix (unless in which case giving in this trivial case) because unitary matrices cannot have any columns (or rows) that are entirely unitary matrices have columns that form orthonormal bases, and the all-zero vector is not a unit vector. However, it is the case that the first columns of are orthonormal, and we get this from the assumption that is a measurement. To verify this claim, notice that for each column number of is as follows.
Note that here we're numbering the columns starting from column Taking the inner product of column with column when gives
which is what we needed to show.
Thus, because the first columns of the matrix are orthonormal, we can replace all of the remaining zero entries by some different choice of complex number entries so that the entire matrix is unitary:
If we're given the matrices we can compute suitable matrices to fill in for the blocks marked in the equation — using the Gram–Schmidt process — but it does not matter specifically what these matrices are for the sake of this discussion.
Finally we can describe the measurement process: we first perform on the joint system and then measure with respect to a standard basis measurement. For an arbitrary state of we obtain the state
where the first equality follows from the fact that and agree on their first columns. When we perform a projective measurement on we obtain each outcome with probability
in which case the state of becomes
Thus, stores a copy of the measurement outcome and changes precisely as it would had the projective measurement described by been performed directly on
Limitations on quantum information
Despite sharing a common underlying mathematical structure, quantum and classical information have key differences. As a result, there are many examples of tasks that quantum information allows but classical information does not. Before exploring some of these examples, however, we'll take note of some important limitations on quantum information. Understanding things quantum information can't do helps us identify the things it can do.
Irrelevance of global phases
The first limitation we'll cover — which is really more of a slight degeneracy in the way that quantum states are represented by quantum state vectors, as opposed to an actual limitation — concerns the notion of a global phase.
What we mean by a global phase is this. Let and be unit vectors representing quantum states of some system, and suppose that there exists a complex number on the unit circle, meaning that or alternatively for some real number such that
The vectors and are then said to differ by a global phase. We also sometimes refer to as a global phase, although this is context-dependent; any number on the unit circle can be thought of as a global phase when multiplied to a unit vector.
Consider what happens when a system is in one of the two quantum states and and the system undergoes a standard basis measurement. In the first case, in which the system is in the state the probability of measuring any classical state is
In the second case, in which the system is in the state the probability of measuring any classical state is
because That is, the probability of an outcome appearing is the same for both states.
Now consider what happens when we apply an arbitrary unitary operation to both states. In the first case, in which the initial state is the state becomes
and in the second case, in which the initial state is it becomes
That is, the two resulting states still differ by the same global phase
Consequently, two quantum states and that differ by a global phase are completely indistinguishable; no matter what operation, or sequence of operations, we apply to the two states, they will always differ by a global phase, and performing a standard basis measurement will produce outcomes with precisely the same probabilities as the other. For this reason, two quantum state vectors that differ by a global phase are considered to be equivalent, and are effectively viewed as being the same state.
For example, the quantum states
differ by a global phase (which is in this example), and are therefore considered to be the same state.
On the other hand, the quantum states
do not differ by a global phase. Although the only difference between the two states is that a plus sign turns into a minus sign, this is not a global phase difference, it is a relative phase difference because it does not affect every vector entry, but only a proper subset of the entries. This is consistent with what we have already observed previously, which is that the states and can be discriminated perfectly. In particular, performing a Hadamard operation and then measuring yields outcome probabilities as follows:
No-cloning theorem
The no-cloning theorem shows it is impossible to create a perfect copy of an unknown quantum state.
Theorem (No-cloning theorem). Let be a classical state set having at least two elements, and let and be systems sharing the same classical state set There does not exist a quantum state of and a unitary operation on the pair such that for every state of
That is, there is no way to initialize the system (to any state whatsoever) and perform a unitary operation on the joint system so that the effect is for the state of to be cloned — resulting in being in the state
The proof of this theorem is actually quite simple: it boils down to the observation that the mapping
is not linear in
In particular, because has at least two elements, we may choose with If there did exist a quantum state of and a unitary operation on the pair for which for every quantum state of then it would be the case that
By linearity, meaning specifically the linearity of the tensor product in the first argument and the linearity of matrix-vector multiplication in the second (vector) argument, we must therefore have
However, the requirement that for every quantum state demands that
Therefore there cannot exist a state and a unitary operation for which for every quantum state vector
A few remarks concerning the no-cloning theorem are in order. The first one is that the statement of the no-cloning theorem above is absolute, in the sense that it states that perfect cloning is impossible — but it does not say anything about possibly cloning with limited accuracy, where we might succeed in producing an approximate clone (with respect to some way of measuring how similar two different quantum states might be). There are, in fact, statements of the no-cloning theorem that place limitations on approximate cloning, as well as methods to achieve approximate cloning with limited accuracy.
The second remark is that the no-cloning theorem is a statement about the impossibility of cloning an arbitrary state In contrast, we can easily create a clone of any standard basis state, for instance. For example, we can clone a qubit standard basis state using a controlled-NOT operation:
While there is no difficulty in creating a clone of a standard basis state, this does not contradict the no-cloning theorem — this approach of using a controlled-NOT gate would not succeed in creating a clone of the state for instance.
One final remark about the no-cloning theorem is that it really isn't unique to quantum information — it's also impossible to clone an arbitrary probabilistic state using a classical (deterministic or probabilistic) process. This is pretty intuitive. Imagine someone hands you a system in some probabilistic state, but you're not sure what that probabilistic state is. For example, maybe they randomly generated a number between and but they didn't tell you how they generated that number. There's certainly no physical process through which you can obtain two independent copies of that same probabilistic state: all you have in your hands is a number between and and there just isn't enough information present for you to somehow reconstruct the probabilities for all of the other outcomes to appear. Mathematically speaking, a version of the no-cloning theorem for probabilistic states can be proved in exactly the same way as the regular no-cloning theorem (for quantum states). That is, cloning an arbitrary probabilistic state is a non-linear process, so it cannot possibly be represented by a stochastic matrix.
Non-orthogonal states cannot be perfectly discriminated
For the final limitation to be covered in this lesson, we'll show that if we have two quantum states and that are not orthogonal, which means that then it's impossible to discriminate them (or, in other words, to tell them apart) perfectly. In fact, we'll show something logically equivalent: if we do have a way to discriminate two states perfectly, without any error, then they must be orthogonal.
We will restrict our attention to quantum circuits that consist of any number of unitary gates, followed by a single standard basis measurement of the top qubit. What we require of a quantum circuit, to say that it perfectly discriminates the states and is that the measurement always yields the value for one of the two states and always yields for the other state. To be precise, we shall assume that we have a quantum circuit that operates as the following diagrams suggest:
The box labeled denotes the unitary operation representing the combined action of all of the unitary gates in our circuit, but not including the final measurement. There is no loss of generality in assuming that the measurement outputs for and for the analysis would not differ fundamentally if these output values were reversed.
Notice that, in addition to the qubits that initially store either or the circuit is free to make use of any number of additional workspace qubits. These qubits are initially each set to the state — so their combined state is denoted in the figures — and these qubits can be used by the circuit in any way that might be beneficial. It is very common to make use of workspace qubits in quantum circuits like this.
Now, consider what happens when we run our circuit on the state (along with the initialized workspace qubits). The resulting state, immediately prior to the measurement being performed, can be written as
for two vectors and that correspond to all of the qubits except the top qubit. In general, for such a state the probabilities that a measurement of the top qubit yields the outcomes and are as follows:
Because our circuit always outputs for the state it must be that and so
Multiplying both sides of this equation by yields this equation:
Reasoning similarly for in place of we conclude that
for some vector and therefore
Now let us take the inner product of the vectors represented by the equations and starting with the representations on the right-hand side of each equation. We have
so the inner product of the vector with the vector is
Here we have used the fact that as well as the fact that the inner product of tensor products is the product of the inner products:
for any choices of these vectors (assuming and have the same number of entries and and have the same number of entries, so that it makes sense to form the inner products and ). Notice that the value of the inner product is irrelevant because it is multiplied by
Finally, taking the inner product of the vectors on the left-hand sides of the equations and must result in the same zero value that we've already calculated, so
We have therefore concluded what we wanted, which is that and are orthogonal:
It is possible, by the way, to perfectly discriminate any two states that are orthogonal, which is the converse to the statement we just proved. Suppose that the two states to be discriminated are and where We can then perfectly discriminate these states by performing the projective measurement described by these matrices, for instance:
For the state the first outcome is always obtained:
And, for the state the second outcome is always obtained:
Was this page helpful?