Variational Quantum Circuit Depth

Hello,

I am looking to determine the depth of a quantum circuit in Pennylane for my VQC.

  • How can I calculate the circuit depth within Pennylane?
  • Based on the depth, how can I tell if the circuit is considered short, moderate, or long? Is there a general range for each category?
  • What other essential metrics or information about my quantum circuit can I extract from Pennylane?

Thank you

Hi @yousrabou !

You can use qml.specs to find lots of information, including depth. Depth is contained within the ‘resources’ key, so make sure to look at the Usage Details section to see some code examples.

What is considered short, moderate, or long will depend a lot on what you’re trying to do. For example different types of hardware have different ranges for what’s considered short or long for their systems. While some people are focusing on what you can do with quantum computers now, many people are focusing on what you will be able to do with quantum computers in the medium and long term. In practice if you’re using simulators you’ll eventually run out of memory, and it will be a combination of number of gates and depth which will be the limiting factor. A lot of research is going on at the moment on how to make algorithms for simulations that we cannot even run at the moment. You can think of hundreds of qubits and millions or billions of gates for this kind of research. So the short answer is “it depends”, but I hope this gave you some insight onto why.

1 Like