# Fundamentals of quantum computing: pure and mixed states

Recently, we talked about a way to visualize one-qubit states - the Bloch sphere. All pure states correspond to points on the surface of the Bloch sphere, and mixed points correspond to points inside it. In this publication, we will try to explain what the pure and mixed states really are.

## Articles from the cycle:

Quantum computing and the Q # language for beginners

Introduction to Quantum Computing

Quantum chains and valves - introductory course

Fundamentals of quantum computation: pure and mixed states

A rigorous mathematical explanation is given in M. Nielsen's book, I. Chang, "Quantum Information and Quantum Computing", in Section ???: "Ensembles of Quantum States", and also in these remarkable notes (and corresponding lecture notes) by Professor Leonard Ziusskind of Standford university.

## Pure states

A state is called pure, which can be represented by a single state vector | ψι>. From a practical point of view, this means that at any time we know (with a probability of 100%) that our system is in a state | ψι>. In other words, if the system is in a clean state, we have a complete picture of it and know exactly what state it is in.

Examples of pure states are | 0>, | 1>, , . They correspond to the following points on the surface of the Bloch sphere:

## Mixed states of

If there is no complete idea of ​​the state of the prepared system, then it is said that it is in a mixed state. Such a situation can be caused by a variety of reasons: for example, incorrect configuration of laboratory equipment or confusion of particles with an external system that is not available to us. However, if the system is in a mixed state, we can not be 100% sure whether it is in the clean state of or or in any other possible state. In this case, the state of the system is described by the probability distribution of all pure states in which it can be after a preparation with a non-zero probability.

Let's consider an example. Let's say our colleague Mary prepared qubits for our experiment. She tries to sabotage the work and does not tell us what condition each qubit is in, but we know that there are only three possible options: pure states . Therefore, our starting state must be described in the language of probability theory: . This combination of pure states is called a mixed state.

Let us know that Mary (for example) prepares the state twice as often as or . We can use this knowledge to describe the probabilities of possible states of our system at the beginning of the experiment. If we do not know exactly how Mary chooses the prepared states, then we must assume that they are all equally likely. And now it's time to talk about the density matrix (or density operator).

## The density operator, ρ

The density operator (ρ) can be used to represent a state of a system whose initial state is not known for certain. This operator is a generalization of the state vectors (which are used to record pure states). The density matrix for the pure state naturally degenerates into the state vector | ψι>. For those who are interested in this, some mathematical calculations are given below.

## A little bit of math

NOTE. It is assumed that the reader has basic concepts of vector and matrix algebra: external and internal product, orthogonality, etc. To get acquainted with them, it is recommended to refer to the book of M. Nielsen and I. Chang or to the Stendford lectures that are mentioned at the beginning of the article.

The density operator can be defined as

Here :

Is the probability that the system is in the state at the initial time. .

Element corresponds to the result of the outer product of the vector on itself (such a transformation is also called a projection operator).

n is the total number of possible states of the system (in our example there are three of them).

, as one would expect (the sum of the probabilities of all possible states is 1).

In our example, the density operator is expanded as follows:

If we substitute the probability values ​​from the example above, we get

This is the density matrix of our imaginary system! Not too difficult.

After we compute the density operator, to find the probability that the measurement of ρ will show some pure quantum state | ψ> is very simple: it is equal to <ψ | ρ | ψ> .

In the event that the state is clean (that is, initially the system can only be in one state), the following equality holds:

So we get the second, equivalent definition of the pure state: the state in which ρ = | ψ><ψ | (that is, with a density matrix consisting of a single projector) is pure.

We apply the density operator to our pure state vector:

As you can see, as a result, only | ψ> remains.

By analogy, the probability of detecting a system in some state | φ> is equal to P = <φ | ρ | φ> = | <φ | ψ> | ².

As we see, the rules for calculating probabilities for mixed states are reduced to rules for pure states, which we already know. Thus, all rules for mixed states are expressed in terms of rules for pure states, as stated earlier.