jcmgray / quimb

A python library for quantum information and many-body calculations including tensor networks.
http://quimb.readthedocs.io
Other
455 stars 107 forks source link

Measuring of quantum state of a many-body quantum system in computational basis #103

Closed shadibeh closed 2 years ago

shadibeh commented 2 years ago

Hi every one.

I would like to measure a quantum state consisted of a large number of spins (around 300 spins) in computational basis. So, the simplest way to do that is to find all the spin configurations in computational basis and find the squared inner product of each possible configuration and the quantum state to find the probability.

However, it requires large memory and takes long time. Would you please let me know if there is any approach in quimb to do it faster. Thanks

jcmgray commented 2 years ago

Hi @shadibeh

However, it requires large memory and takes long time.

Yes 2^300 ~ 10^90 is a very large number!

You don't specify what representation you have of your quantum state? but assuming it is e.g. a tensor network representation, then one performs this generally by computing a series of conditioned marginal probability distributions and sampling from these in a chain. See for example the quimb docs here

shadibeh commented 2 years ago

Thank you very much for the explanations. The links were very helpful.

Thanks