Matrix-product states (MPS
)#
The matrix-product state is an efficient representation of composite quantum systems that reconstructs the total wavefunction from the contraction of three-legged tensors.
If \(\Psi\) is a quantum state with N components, a MPS representation would look as follows
Here, the \(i_n\) are indices labelling the quantum states of the respective subsystems, while the \(\alpha_n\) are integer indices connecting (correlating) neigboring quantum systems. The former are usually labeled the “physical” indices, while the latter are declared “virtual” indices.
In SeeMPS, matrix-product states are represented by the class MPS
. The
instances of this class keep a sequence (list) of these three-legged tensors,
as well as other information, such as accumulated errors in this representation.
Such matrix-product states can be mutated, they can be added, rescaled,
renormalized, or they can be subject to quantum operations, such as gates
or the computation of observables.
Creation#
Matrix product states can be created by supplying the tensors that form the state, and in the case of small wavefunctions, they can be reconstructed directly from the state vector of the composite quantum state. In addition to this, we offer some functions to create convenience states
|
MPS (Matrix Product State) class. |
|
Create a matrix-product state from a state vector. |
|
Create a matrix-product state from a tensor that represents a composite quantum system. |
|
Create an |
|
|
|
Create a product state |
|
Create a random state with N elements of dimension d and bond dimension D. |
|
|
Simple operations#
Matrix product states can be combined with each other and transformed:
An MPS a can be rescaled by a number n * a
An MPS can be conjugated a.conj()
Two MPS a and b can be added, producing an
MPSSum
(see MPS combination (MPSSum)).The wavefunctions of two states can be multiplied element-wise a * b in an unphysical transformation.
Observables#
The interest of MPS lays in its simple algebraic structure, which not only involves a subexponential number of parameters, but also enables some operations with a polynomial cost. One such operation is the computation of expected values of local operators such as
As sketched below, the expectation value is recovered from the contraction of a quasi-1D structure, with a contraction cost \(O(N D^4)\) that is linear in the number of components, and polynomial on the bond dimension D and the physical dimension d of each tensor.
The following functions provide access to single- and two-body expectation values in a convenient way.
Compute the scalar product between matrix product states \(\langle\xi|\psi\rangle\). |
|
|
Norm-2 \(\Vert{\psi}\Vert^2\) of this MPS. |
Norm-2 squared \(\Vert{\psi}\Vert^2\) of this MPS. |
|
|
Compute the expectation value \(\langle\psi|O_i|\psi\rangle\) of an operator O acting on the i-th site |
|
Compute the expectation value \(\langle\psi|O_i Q_j|\psi\rangle\) of two operators O and Q acting on the i-th and j-th subsystems. |
|
Vector of expectation values \(v_i = \langle\psi|O_i|\psi\rangle\) of local operators acting on individual sites of the MPS. |