Hi! I just went through your QAOA tutorial. Very helpful! I have two questions that I’m grappling with:

- Looking at the circuit drawing for the approximate time evolution, it looks there are two Hadamard gates in row acting on qubit 0.

Is that right? If so, then isn’t two Hadamards is equal to the identity? If so, then does PennyLane remove inefficiencies like this? I.e., if I create a circuit, can I get PennyLane to find and remove (or replace) inefficient gates? Just curious.

- The example (Minimum Covering Vertex) uses a depth of n = 2. In general, how do you select a depth value in QAOA?

Trial and error?

The largest value that your quantum computer allows without the errors getting too big due to large circuit depth?

The largest value that your optimization process can handle (i.e., the largest set of γ, α parameters that it can manage)?

Something else?

Thanks!

Damian