tensorcircuit
tensorcircuit copied to clipboard
Add QCNN blocks
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
Besides, I am reproducing QCNN for my research. So I am interested in contributing when I finish it.
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
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)