Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2020/ii/paper-3/15c/b/i/solution

Starting from , the first layer of Hadamard gates gives
The Boolean quantum oracle then gives
Using the Walsh-Hadamard transform identity
the final state is

New to topics? Read the docs here!