In quantum mechanics, probabilities for the outcomes of experiments made upon a system are calculated from the
quantum state describing that system. Each physical system is associated with a
vector space, or more specifically a
Hilbert space. The
dimension of the Hilbert space may be infinite, as it is for the space of
square-integrable functions on a line, which is used to define the quantum physics of a continuous degree of freedom. Alternatively, the Hilbert space may be finite-dimensional, as occurs for
spin degrees of freedom. A density operator, the mathematical representation of a quantum state, is a
positive semi-definite,
self-adjoint operator of
trace one acting on the Hilbert space of the system. A density operator that is a rank-1 projection is known as a
pure quantum state, and all quantum states that are not pure are designated
mixed. Pure states are also known as
wavefunctions. Assigning a pure state to a quantum system implies certainty about the outcome of some measurement on that system. The
state space of a quantum system is the set of all states, pure and mixed, that can be assigned to it. For any system, the state space is a
convex set: Any mixed state can be written as a
convex combination of pure states, though
not in a unique way. The prototypical example of a finite-dimensional Hilbert space is a
qubit, a quantum system whose Hilbert space is 2-dimensional. An arbitrary state for a qubit can be written as a linear combination of the
Pauli matrices, which provide a basis for 2 \times 2 self-adjoint matrices: \rho = \tfrac{1}{2}\left(I + r_x \sigma_x + r_y \sigma_y + r_z \sigma_z\right), where the real numbers (r_x, r_y, r_z) are the coordinates of a point within the
unit ball and \sigma_x = \begin{pmatrix} 0&1\\ 1&0 \end{pmatrix}, \quad \sigma_y = \begin{pmatrix} 0&-i\\ i&0 \end{pmatrix}, \quad \sigma_z = \begin{pmatrix} 1&0\\ 0&-1 \end{pmatrix} . In classical probability and statistics, the
expected (or expectation) value of a
random variable is the
mean of the possible values that random variable can take, weighted by the respective probabilities of those outcomes. The corresponding concept in quantum physics is the expectation value of an
observable. Physically measurable quantities are represented mathematically by
self-adjoint operators that act on the Hilbert space associated with a quantum system. The expectation value of an observable is the
Hilbert–Schmidt inner product of the operator representing that observable and the density operator: \langle A \rangle = \operatorname{tr}(A \rho). The
von Neumann entropy, named after
John von Neumann, quantifies the extent to which a state is mixed. It extends the concept of
Gibbs entropy from classical statistical mechanics to quantum statistical mechanics, and it is the quantum counterpart of the
Shannon entropy from classical
information theory. For a quantum-mechanical system described by a
density matrix , the von Neumann entropy is S = - \operatorname{tr}(\rho \ln \rho), where \operatorname{tr} denotes the
trace and \operatorname{ln} denotes the
matrix version of the
natural logarithm. If the density matrix is written in a basis of its
eigenvectors |1\rangle, |2\rangle, |3\rangle, \dots as \rho = \sum_j \eta_j \left| j \right\rang \left\lang j \right| , then the von Neumann entropy is merely S = -\sum_j \eta_j \ln \eta_j . In this form,
S can be seen as the Shannon entropy of the eigenvalues, reinterpreted as probabilities. The von Neumann entropy vanishes when \rho is a pure state. In the Bloch sphere picture, this occurs when the point (r_x, r_y, r_z) lies on the surface of the unit ball. The von Neumann entropy attains its maximum value when \rho is the
maximally mixed state, which for the case of a qubit is given by r_x = r_y = r_z = 0. The von Neumann entropy and quantities based upon it are widely used in the study of
quantum entanglement. ==Thermodynamic ensembles==