QuantumControlled U gate

I'm reading about quantum circuits.

I've just read about CNOT gate and after that, I read about the controlled U gate.

Can someone please clarify what is the difference between the two circuits below? The first one is the controlled-Hadamard gate (c-H). But what is the second one?! What is the difference between the matrix of the second and the first?

What I'm guessing is that the first one is going to be controlled by the first compound qubit, and the second by the second compound qubit, is that right?!

Thanks!

1 Answer

The first gate embodies the unitary transform:\begin{align}|00\rangle &\mapsto |00\rangle,\\ |01\rangle &\mapsto |01\rangle,\\ |10\rangle &\mapsto \sqrt{\frac12}|10\rangle + \sqrt{\frac12}|11\rangle,\\ |11\rangle &\mapsto \sqrt{\frac12}|10\rangle - \sqrt{\frac12}|11\rangle.\end{align}That is, it is a Hadamard gate on the second qubit conditioned on the first qubit being $|1\rangle.$ The second gate embodies the unitary transform, \begin{align}|00\rangle &\mapsto |00\rangle,\\ |01\rangle &\mapsto \sqrt{\frac12}|01\rangle + \sqrt{\frac12}|11\rangle,\\ |10\rangle &\mapsto |10\rangle,\\ |11\rangle &\mapsto \sqrt{\frac12}|01\rangle - \sqrt{\frac12}|11\rangle.\end{align}That is, it is a Hadamard gate on the first qubit conditioned on the second qubit being $|1\rangle.$

• Perfect, I was guessing that, but wasn't sure! Thanks, mate. – Bruno Reis Sep 11 '17 at 22:11