QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.
https://yaoquantum.org
Other
910 stars 118 forks source link

Quantum circuit from MPS #487

Open sajjan02purdue opened 8 months ago

sajjan02purdue commented 8 months ago

Hi, I am a regular user of ITensor new to Yao. I am wondering if the package has the functionality of producing an approximate quantum circuit of one and two qubit gates given an MPS (may be imported from ITensor etc from a DMRG calculation). There are couple of papers along that line that has been published in recent years like

https://arxiv.org/abs/2209.00595

https://journals.aps.org/pra/abstract/10.1103/PhysRevA.101.032310

I want to use Yao for a similar purpose, so I was wondering if there is inherent support for doing that here. Any help will be appreciated.

GiggleLiu commented 8 months ago

Hi, the short answer is no inherent support for doing that.

The strategy of converting an MPS to a quantum circuit can be straight-forward. You just first canonicalize the MPS, and then compile each unitary to a quantum circuit. However, compiling generic n-qubit unitary to a quantum circuit is very inefficient, which requires exponential many gates. A straight-forward approach is:

  1. decompose a unitary gate into a sequence of two-level unitary gates, which is basically a multi-control unitary gate.
  2. decompose a multi-control unitary gate into basic gates.

Alternatively, you could use the variational approach to approximate the gate. For example, the following paper used Yao and the code is available on Github: https://journals.aps.org/prresearch/abstract/10.1103/PhysRevResearch.1.023025