When dealing with quantum entanglement efficiently in quantum computing problems, it is not always necessary to represent all quantum states as state vectors. Depending on the problem, one can streamline quantum circuits and quantum circuit simulations by reducing the unnecessary entanglement of quantum states.
MPS (Matrix Product States)
By employing tensor networks, one can examine methods for adjusting quantum entanglement using Matrix Product States (MPS).
Copy
from quimb.tensor import *
p = MPS_rand_state(L=10, bond_dim=50)
p.show()
Typically, quantum states are represented as large vectors, as the name suggests. In tensor network representations, a single node with one arm represents these states.
However, quantum states can be handled in various representations, and the above description utilizes a one-dimensional model known as Matrix Product States (MPS). In MPS, adjacent quantum bits are connected in a single row. From the perspective of a state vector, quantum bits can be separated and represented by performing consecutive operations such as Singular Value Decomposition (SVD).
Between the quantum bits mentioned above, there exists a value known as the 'bond dimension,' which represents the degree of entanglement between adjacent quantum bits. A higher bond dimension brings the representation closer to the full state vector, but in cases of low quantum entanglement, reducing the bond dimension may not significantly affect accuracy and can help minimize inefficiencies.
MPO
The above applies to quantum states, but quantum gates themselves can also be represented similarly as Matrix Product Operators (MPO).
In this state, there are arms extending both upwards and downwards, allowing for the corresponding usage related to one-dimensional operations of connected quantum entities.
Creating MPS
MPS, also referred to as Tensor Train in machine learning, will be created. In this instance, we will explore its implementation using 'tensorly'.
Copy
pip install -U tensorly
Requirement already satisfied: tensorly in /opt/conda/lib/python3.10/site-packages (0.8.1)
Requirement already satisfied: numpy in /opt/conda/lib/python3.10/site-packages (from tensorly) (1.23.5)
Requirement already satisfied: scipy in /opt/conda/lib/python3.10/site-packages (from tensorly) (1.10.1)
Note: you may need to restart the kernel to use updated packages.
Let's start by importing the library.
Copy
import numpy as np
import tensorly as tl
from tensorly.decomposition import matrix_product_state
Create a tensor from numpy. This is a rank-3 tensor.
It may be slightly off, but I managed to reconstruct it. MPS and tensor networks have been covered in a few articles recently, so I encourage you to search for them and give it a try.
"MPS in quantum circuits"
MPS can be created not only in quantum computer simulators but also on actual quantum circuits. By stacking two-qubit gates in a stair-step fashion, entanglement can be generated between adjacent qubits, allowing the creation of MPS. Furthermore, increasing the number of qubits used allows for an increase in the bond dimension.