Stuck with A.5.1

Hi, I’m unsure what I’m doing wrong because the coding part should be easy but apparently I get the wrong results.

qml.broadcast(qml.Hadamard,“single”,[0,n_bits-1])
qml.QubitUnitary(oracle_matrix(combo),range(n_bits))
qml.broadcast(qml.Hadamard,“single”,[0,n_bits-1])
return qml.probs(wires=range(n_bits))

This should apply a Hadamard to every wire and interact with the oracle but it throws a “Incorrect: your probability distribution doesn’t look quite right.” at me. Is it something obvoious I overlooked ?

Hello @Cap_Cap,

For qml.broadcast, the wires argument needs to include all the wires. In the code, you’ve only specified the first and last wires. Let me know if that fix helps!

Cheers,

Alvaro