Quantum Information Theory
Fundamentals of quantum information theory covering state representations, entropy, fidelity, distance measures, and quantum channel representations. This guide connects the theoretical formalism to the classes and functions provided by pyqpanda3's quantum_info module.
Quantum State Representations
State Vectors
A pure quantum state of
where
Properties:
- Normalization:
- Global phase:
and represent the same physical state - Superposition: A state can be in a superposition of multiple basis states simultaneously
pyqpanda3's StateVector class represents pure states and provides:
- Construction from arrays, circuits, or computational basis states
- Evolution via quantum circuits:
sv.evolve(circuit) - Conversion to density matrix:
sv.get_density_matrix() - Purity computation:
sv.purity()
Density Matrices
A mixed quantum state is described by a density matrix (density operator):
where
Equivalent definition: A density matrix is any matrix
- Hermiticity:
- Positive semi-definiteness:
(all eigenvalues ) - Unit trace:
Bloch sphere (single qubit): Any single-qubit density matrix can be written as:
where
- Pure states:
(on the surface of the Bloch sphere) - Mixed states:
(inside the Bloch sphere) - Maximally mixed:
, (center of the sphere)
pyqpanda3's DensityMatrix class provides:
- Construction from matrices, state vectors, or circuits
- Evolution via quantum circuits:
dm.evolve(circuit); evolution via quantum channels: use the channel's ownchannel.evolve(dm)method - Purity:
dm.purity() - Conversion to state vector (if pure):
dm.to_statevector()
Pure vs. Mixed States
| Property | Pure State | Mixed State |
|---|---|---|
| Representation | ||
| Purity | ||
| Bloch vector | ||
| Idempotency | ||
| von Neumann entropy | ||
| Example |
Partial Trace and Reduced States
For a bipartite system
The reduced state
Separability: A state
Otherwise, the state is entangled.
Von Neumann Entropy
Definition
The von Neumann entropy of a quantum state
where
This is the quantum generalization of the Shannon entropy
Properties
1. Non-negativity:
with equality if and only if
2. Maximum entropy:
where
3. Invariance under unitaries:
Unitary evolution preserves entropy (information is conserved).
4. Concavity:
Mixing states increases entropy.
5. Subadditivity:
6. Strong subadditivity (the most powerful inequality):
Entanglement Entropy
For a pure bipartite state
where
Note that
Examples:
- Product state
: (no entanglement) - Bell state
: (maximally entangled, 1 ebit) - GHZ state
: (1 ebit for any bipartition)
Quantum Mutual Information
The quantum mutual information measures total correlations between two systems:
: and are uncorrelated ( ) : and are correlated (includes both classical and quantum correlations)
Conditional Entropy
The quantum conditional entropy:
Unlike the classical case, quantum conditional entropy can be negative:
indicates quantum entanglement - This negativity has operational meaning: it corresponds to quantum state merging (the ability to transfer quantum information using entanglement)
Quantum Fidelity
Definition
The fidelity between two quantum states
For pure states
For a pure state
Uhlmann's Theorem
The fidelity can be expressed in terms of purifications:
where
Properties
1. Symmetry:
2. Bounds:
: identical states ( ) : orthogonal states
3. Multiplicativity under tensor products:
4. Monotonicity under CPTP maps:
Quantum channels cannot decrease fidelity.
Bures Distance
The Bures distance is related to fidelity:
It is a proper metric on the space of density matrices, satisfying triangle inequality.
Distance Measures
pyqpanda3 provides three distance measures for comparing probability distributions and quantum states.
Hellinger Distance
The Hellinger distance between two discrete probability distributions
Properties:
- Symmetric:
- Related to the Bhattacharyya coefficient:
pyqpanda3 implementation:
from pyqpanda3.quantum_info import hellinger_distance
# Using integer keys
p = {0: 0.5, 1: 0.3, 2: 0.2}
q = {0: 0.4, 1: 0.4, 2: 0.2}
dist = hellinger_distance(p, q)
# Using string keys
p = {"00": 0.25, "01": 0.25, "10": 0.25, "11": 0.25}
q = {"00": 0.5, "01": 0.0, "10": 0.0, "11": 0.5}
dist = hellinger_distance(p, q)Hellinger Fidelity
The Hellinger fidelity is derived from the Hellinger distance:
Properties:
- Related to the Bhattacharyya coefficient:
pyqpanda3 implementation:
from pyqpanda3.quantum_info import hellinger_fidelity
p = {0: 0.5, 1: 0.5}
q = {0: 0.5, 1: 0.5}
fid = hellinger_fidelity(p, q) # 1.0 (identical)Kullback-Leibler (KL) Divergence
The KL divergence measures the information gain when using
Discrete distributions:
Continuous distributions:
Properties:
(Gibbs' inequality) (almost everywhere) - Not symmetric:
in general - Not a metric: Does not satisfy the triangle inequality
pyqpanda3 supports both discrete and continuous KL divergence:
from pyqpanda3.quantum_info import KL_divergence
# Discrete distributions (lists)
p = [0.5, 0.3, 0.2]
q = [0.4, 0.4, 0.2]
div = KL_divergence(p, q)
# Continuous distributions (functions)
import numpy as np
div = KL_divergence(
p_pdf=lambda x: np.exp(-x), # exponential
q_pdf=lambda x: np.exp(-x**2/2) / np.sqrt(2*np.pi), # Gaussian
x_start=0.0,
x_end=10.0,
dx=1e-4
)Trace Distance
The trace distance between two density matrices:
Properties:
- Proper metric (symmetric, triangle inequality)
- Related to the optimal probability of distinguishing
from :
- For qubits:
(half the Euclidean distance between Bloch vectors)
Comparison of Distance Measures
| Measure | Type | Symmetric? | Metric? | Range |
|---|---|---|---|---|
| Hellinger distance | Classical distributions | Yes | Yes | |
| Hellinger fidelity | Classical distributions | Yes | No | |
| KL divergence | Classical distributions | No | No | |
| Trace distance | Quantum states | Yes | Yes | |
| Fidelity | Quantum states | Yes | No | |
| Bures distance | Quantum states | Yes | Yes |
Relationships:
Quantum Channel Representations
A quantum channel (CPTP map) can be represented in several equivalent forms. pyqpanda3's quantum_info module provides five interconvertible representations.
Kraus Representation
The most physically intuitive representation — each Kraus operator
pyqpanda3 class: Kraus
Superoperator (Liouville) Representation
The channel is represented as a
The vectorization
where
pyqpanda3 class: SuperOp
Chi (Process Matrix) Representation
The channel is expanded in the normalized Pauli basis
The
pyqpanda3 class: Chi
Choi Matrix Representation
The Choi matrix is obtained by applying the channel to one half of a maximally entangled state:
where
Choi-Jamiolkowski isomorphism: There is a bijection between CPTP maps and positive semidefinite matrices
pyqpanda3 class: Choi
Pauli Transfer Matrix (PTM)
The PTM represents the channel in the Pauli basis:
where
Physical interpretation:
pyqpanda3 class: PTM
Conversion Relationships
All five representations encode the same information and can be freely converted:
In pyqpanda3, conversion is done by constructing one class from another:
from pyqpanda3.quantum_info import Kraus, Choi, SuperOp, Chi, PTM
# Create a channel from Kraus operators
kraus = Kraus([...])
# Convert to other representations
choi = Choi(kraus)
superop = SuperOp(kraus)
chi = Chi(kraus)
ptm = PTM(kraus)
# All representations can evolve quantum states
from pyqpanda3.quantum_info import DensityMatrix, StateVector
dm = DensityMatrix(...)
evolved = choi.evolve(dm) # Returns DensityMatrix
evolved = kraus.evolve(dm) # Same resultComparison of Representations
| Representation | Size | Real? | Best For |
|---|---|---|---|
| Kraus | No (complex) | Physical interpretation, noise models | |
| SuperOp | No (complex) | Composition of channels, matrix operations | |
| Chi | No (complex) | Process tomography | |
| Choi | No (complex) | Positive semidefiniteness check, channel distance | |
| PTM | Yes | Gate benchmarking, RB analysis |
Channel Composition
Channels compose via their representations:
Kraus: The composition
SuperOp:
PTM:
Choi:
Channel Distance and Fidelity
Diamond norm distance between two channels:
where the supremum is over all input dimensions
Process fidelity:
This measures how close a channel
Summary
See Also
- StateVector API — Pure state operations
- DensityMatrix API — Mixed state operations
- Quantum Channel API — Kraus, Chi, Choi, SuperOp, PTM
- Analysis Functions — Hellinger distance, fidelity, KL divergence
- Matrix API — General matrix operations
- Noise Model Theory — How noise channels affect quantum states
- Variational Algorithms — Using quantum information in VQAs