tensorcircuit icon indicating copy to clipboard operation
tensorcircuit copied to clipboard

Add QCNN blocks

Open royess opened this issue 1 year ago • 3 comments

Issue Description

I think it will be great if we have blocks to easily construct QCNN, which is a special but important category of quantum neural networks requiring mid-circuit measurements.

Proposed Solution

The key component of QCNN is a "pooling" layer, which includes measurement and a conditional gate on the measurement outcome. And I suppose we can easily implement QCNN by using cond_measure and conditional_gate, described in the white paper tutorials.

Additional References

  • Paper: https://www.nature.com/articles/s41567-019-0648-8
  • Codes in tensorflowquantum: https://www.tensorflow.org/quantum/tutorials/qcnn

royess avatar Jul 17 '22 08:07 royess

Besides, I am reproducing QCNN for my research. So I am interested in contributing when I finish it.

royess avatar Jul 17 '22 08:07 royess

Besides, I am reproducing QCNN for my research. So I am interested in contributing when I finish it.

Great! I can think of two ways to make this contribution. 1. as a template function for qcnn in /tensorcircuit/templates/block.py 2. as a integrated Jupyter tutorial on QCNN in /docs/source/tutorial

refraction-ray avatar Jul 17 '22 09:07 refraction-ray

I suddenly realized that tensorcircuit is perfectly suitable for QCNN implementation as the effective depth of QCNN is rather low and thus we can hopefully simulating training QCNN made of a lot of qubits。

Reversely, also very suitable for mera type circuit (qubits getting more in time direction, eg see https://arxiv.org/pdf/2210.15053.pdf)

refraction-ray avatar Oct 27 '22 13:10 refraction-ray