There was a problem at the Winter 2019 Q# codeforces contest (that is now over), which I cannot find a mathematical solution for.
The problem goes like this: You are given 3 qubits that can be in one of the following states:
Build a function that determines in which of the 2 states are the 3 qubits.
My question is, how could you solve this problem in linear algebra (bra-kets notation) and the normal quantum logic gates? I figured out you have to somehow measure the coefficients, but I don't know quite how. If you could include a "code algorithm proof of concept" that would be great, but I am mainly interested in understanding the algebra part. After understanding it, implementing would be just a problem of translating the operations/gates.
If I got something wrong, please correct me. I am new-ish to the whole quantum computing scene.