I read that there are two major ways of simulating quantum circuits - State Vector Simulation and Tensor Network Simulation. But Qiskti provides a backend to simulate state-vectors and a backend for density matrix simulations.

Is there a difference between density matrix simulations and tensor network simulations ?

Does density matrix simulations also scale polynomially with the number of qubits ?


1 Answer 1


A state vector on $n$ qubits is a $2^n$ complex number representing a system in a pure state. A density matrix on $n$ qubits is a $2^n$ by $2^n$ matrix representing a system in a mixed state. Mixed states are the more general description of a quantum system, they handle situations, for example, when you have a classical statistical ensemble of pure states. Often, however, you only need to deal with pure states, for example if you have closed system and don't do any measurements on the system.

Different simulators will differ on whether they simulate cases where the system is a pure state and systems where there is a mixed state. Because mixed states are more general, there are places where you have to used mixed state simulation, but, for example for simulating a quantum circuit without the measurement, you really just need the pure state.

Tensor networks are different concept altogether. Tensor networks are different ways to represent the objects like pure states (a $2^n$ vector of complex numbers) or mixed states (a $2^n$ by $2^n$ matrix of complex numbers). Tensor networks can also be used to represent objects besides states (pure or mixed), for example they can be used to represent unitary evolution operators, aka quantum gates.

What are these tensor networks? A tensor is a generalization of a vector or a matrix to an object that is indexed by $r$ different indices (so a vector has one index $v_i$, a matrix has two $m_{i,j}$, and a tensor may have more indices like $t_{i,j,k,l}$). Tensor networks are a set of tensors along with a way to "contract" the tensors. It's easiest to just write a simple example. A tensor network representation of a matrix $m_{i,j}$ might be $$m_{i,j} = \sum_{k,l} a_{i,k} b_{k,l} c_{l,j}$$ The thing on the left is a matrix, and we are expressing it as a sum (contracting indices) over a product of three tensors. Tensor network methods use this sort of thing to represent states and unitaries and other quantum linear algebraic structures.

When people talk about a pure state simulator, they tend to be refering to a simulator that just keeps the pure state in memory. When people talk about a tensor network simulator, it could be a pure or mixed state simulator, it just refers to the internal representation used for the states.

As for scaling, none of the simulations scale generally polynomially with $n$. Tensor network methods, however, often have some tunable dimension (the dimension of that index that was summed over above) and for constant tunable dimension, the scaling can be polynomial. However, this often only works for simulating some particular states and not all states (so great when this works, not so great when it doesn't).

  • $\begingroup$ So, is this statement wrong, "When simulating with tensor networks, the complexity of simulating the circuit grows polynomial-ly with the number of qubits but the trade-off is that it scales exponentially with the circuit depth." ? $\endgroup$ Jul 7, 2022 at 20:04
  • $\begingroup$ I depends exactly on the way in which the tensor network is used, but in many cases yes this is true. For example the starting state of most circuits, something like all $|0\rangle$ states is usually has a very small tensor network representation. Then as the simulation goes forward the size of that tensor network will grow, and eventually it may grow too fast to achieve accurate approximate simulation. $\endgroup$
    – dabacon
    Jul 11, 2022 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.