Why quantum circuit in deep learning?

  1. Can anybody explain to me why people start using the quantum circuit in the end of pre-trained models of deep learning?
  2. Do you know any advantages of using quantum circuit in the end of
    the deep learning model?

For example, you can see the ants bees classification problem where people use 4-qubit quantum circuit in the end of the resnet model.
I even myself used the densenet121 model + 4-qubit quantum circuit for a medical application where the accuracy of only densenet121 is greater than densenet121+quantum circuit.

Hi @Akshat_Suwalka, welcome to the forum, and thanks for the question!

Right now quantum computing is in the NISQ era. This means devices are available, but not powerful enough to outcompete classical methods (especially on tasks that they have been highly tuned for, e.g., image processing).

To answer your question of “why?”, it is because we are currently very much in an exploratory phase, trying to gather as much useful knowledge as possible, in order to find the best (potential) uses for quantum computers in the near-term.

In other words, we are trying to really understand how quantum computers and classical computers work together in hybrid models. The only way we can do that is to try out many ideas, see which work and which don’t, and distill the essence of where quantum computers can provide an advantage.

1 Like

Thank you @nathan !

The quantum circuit use in the deep learning models(like adding the quantum circuit at final layers of classical deep learning models) are specific to the problem with a good reason or people just use Hadarmard gate , Rx,Ry,Rz gates and CNOT gates randomly ?

Please correct me if i am wrong. What i think is that people just use this gate in some order like first H gate and then few Rx,Ry,Rz gate and add in between or any other side the CNOT gate bcz the main parameter are the rotation gate Rx,Ry,Rz so they are the one who would be trained, so then people check that ok accuracy is poor so just change(like doing the experiment that we do by adding CNN or neural networks in deep learning) to get better accuracies.
Or they really made quantum circuit logically?


Hi @Akshat_Suwalka,

In QML, We still haven’t arrived at the “canonical” model to use for our circuits. The circuits you will see typically do have some similar structures though:

  • parametrized gates on every wire (these are what let the circuit become trainable)
  • CNOTs (or some other entangling gates); these are what lead to—combined with the local rotatoins—the nonclassical nature
  • sometimes you might see hadamards, but they are less common in QML than in regular QC, simply because the rotations serve the same role (creating superpositions)
1 Like

So to answer your question. The “reason” you see these kinds of circuits is because they are expressive enough to be hard to simulate classically (assuming enough qubits), but also highly parametrized (to allow trainability)

1 Like

Thank you @nathan for clearing my doubts:smile: