3

I am new to quantum computing. I want to find out the circuit depth of the following circuit.

In the circuit, one $\mathcal{ADD}$ operator has 154 CNOT gates and 216 Toffoli gates. The $\mathcal{RL}$ does not have any gate inside it. It is a rotation operator.enter image description here

If I assume the $\mathcal{ADD}$ operator as a gate itself, then is the depth 9 as for register $|d\rangle$ it is 9 ? Also if I consider the CNOT gates and Toffoli gates, what will be the depth of the circuit ?

I am having hard time understand the full depth of the circuit. Can anyone please help or guide me how to do would have been of great help. Thank you.

Mark Spinelli
  • 15,378
  • 3
  • 26
  • 83
hiren_garai
  • 131
  • 3

2 Answers2

2

Typically, depth is a property of the full circuit. Writing the circuit as a product of some native gate set, you can collect the gates that can be executed in parallel and count how many of these factors remain in sequence. To be precise, write $$U = \prod_{a=1}^D \bigotimes_i U_{i,a},$$ where $U_{i,a}$ is a local gate from some gate set. The minimal number $D$ of factors is called depth. If I understand correctly, in your example the operations $\mathcal{ADD}$ and $\mathcal{RL}$ are not native, but themselves have a certain depth. So you might want to add the depths of all operations in sequence (which in your particular case seem to be all operations) to get the depth of the circuit.

If you know that you only need register $d$ in the end (say you only measure an observable with support on those qubits), there is some justification for dropping the last two operations in your circuit, which indeed reduces the depth. But in general, you have to count them too.

Refik Mansuroglu
  • 782
  • 2
  • 18
1

Here's a related link

There are 6 gates on the wire of regsiter $|d \rangle$:

  1. first $CNOT_{a,d}$
  2. $RL_{16}$
  3. first $ADD_{c,b}$
  4. second $CNOT_{a,d}$
  5. $RL_{8}$
  6. second $ADD_{c,d}$

The first $CNOT_{a,d}$ needs to wait until $ADD_{a,b}$ is done, hence 1 step is added. Also, the second $CNOT_{a,d}$ needs to wait until $CNOT_{c,b}$, $RL_{12}$ and $ADD_{a,b}$ are done, hence 3 steps are added.

That leads to the depth of 10 (=6+1+3) for $|d \rangle$.

Since there are 2 gates, $CNOT_{c,b}$ and $RL_{7}$, after the second $ADD_{c,d}$, the circuit depth becomes 12(=10+2).

taketoshi kinoshita
  • 1,249
  • 1
  • 2
  • 11