October 19, 2024

Conv Layer in Qiskit

As we can see in Qiskit page(https://qiskit-community.github.io/qiskit-machine-learning/tutorials/11_quantum_convolutional_neural_networks.html), below Unitary transform is used as convolution layer in QCNN.

\begin{align}
U = (A_1 \otimes A_2) \cdot N(\alpha, \beta, \gamma) \cdot (A_3 \otimes A_4)\\
where \space {A_j} \in U(2)\\
N(\alpha, \beta, \gamma) = \exp(i[\alpha \sigma_x \sigma_x + \beta \sigma_y \sigma_y + \gamma \sigma_z \sigma_z])\\

\end{align}

This is actually from https://arxiv.org/abs/quant-ph/0308006

Every Unitary degrees of 4 can be represented as (1), and also, if U ∈ SU(4), we can choose all operations Aj in (1) from SU(2). In this case, there are 15 parameters on this circuit. But the page is NOT using the formula directly, it is using below parameters are used for the operation,

\begin{align}
\gamma = \frac{\pi}{2} - 2\lambda \\
\beta = 2\phi - \frac{\pi}{2} \\
\gamma = \frac{\pi}{2} - 2\lambda
\end{align}

The below circuit is actually used as convolution layer on this Qiskit page example(https://qiskit-community.github.io/qiskit-machine-learning/locale/ja_JP/tutorials/11_quantum_convolutional_neural_networks.html#7.-%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE).

Therefore this unitary is applied to 2 qubits, this operation should be repeated 3 times in order to convolute 4×4 pixels.

[1] Cong, I., Choi, S. & Lukin, M.D. Quantum convolutional neural networks. Nat. Phys. 15, 1273–1278 (2019). https://doi.org/10.1038/s41567-019-0648-8

[2] IBM Convolutional Neural Networks https://www.ibm.com/cloud/learn/convolutional-neural-networks

[3] Vatan, Farrokh, and Colin Williams. “Optimal quantum circuits for general two-qubit gates.” Physical Review A 69.3 (2004): 032315.[16]: