There was a problem at the Winter 2019 Q# codeforces contest, which I cannot find a mathematical solution for. It goes like this:
You are given 3 qubits that can be in one of the following states: $$|\psi_0\rangle=\frac{1}{\sqrt 3}\left(|100\rangle+\omega|010\rangle+\omega^2|001\rangle\right)$$ or $$|\psi_1\rangle=\frac{1}{\sqrt 3}\left(|100\rangle+\omega^2|010\rangle+\omega|001\rangle\right)$$ where $\omega=e^{2iπ/3}$. 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.