Hadamard gate with two inputs in the circuit for the BB84 protocol?

2

I am reading the book "Quantum Computing verstehen" by Matthias Homeister.

At the moment i'm having a look at the BB84 protocol (which is described in kind of an abstract way).

In this chapter a quantum circuit is shown, describing how Alice creates and sends a qubit and how Bob measures it.

Now Alice qubit-creation step is described as:

$$\text{1. generate a random classical bit } a \text{ and initialize the qubit } | x \rangle \gets |a\rangle$$

$$\text{2. generate a second random classical bit } a' \text{ . If } a'=1 \text{ apply the Hadamard matrix to }|a\rangle$$

I'm wondering how to interpret this Hadamard-gate with two inputs, since i havent seen it with two inputs before. Is it supposed to apply the Hadamard matrix only if the second input is 1?

1

Has the book covered controlled gates yet? See this wiki subsection.

– Rammus – 2020-05-27T09:09:15.833

"Quantum Computing verstehen" means "To understand Quantum Computing" (German). – peterh - Reinstate Monica – 2020-05-27T09:53:52.757

@Rammus I had a look at that wiki article and went back to my book to look for "controlled gates", and they actually briefly cover it. Thanks alot for the tip, sometimes i'm just missing a keyword to google for :) – FelRPI – 2020-05-27T12:56:31.913

The figure is quite confused: the controlled H is fed with a classical bit and controlled by a classical bit, but produces a quantum state. – Michele Amoretti – 2020-05-27T13:11:54.423

FelRPI No problem, congratulations on working it out :). @Oldville The classical bit is presumably encoded into a qubit in the compuataional basis via $a \mapsto |a\rangle$. – Rammus – 2020-05-27T13:17:27.260

This is an example of a controlled gate. It means that the gate is applied to the target qubit (the one with the gate on) when the control qubit (the one with the small circle on) is 1. Another example of a gate like this you might have seen is the CNOT gate, that applies an x gate to the target qubit when the control is 1. This gate works in exactly the same way, only that it applies the h gate instead of the x gate.