I was doing a course on Quantum Computing. There was a question in problem set. Which is given below (Question No.5)
Here the parity function is defined as(As per the instructor):
$$y_i = 1-2x_i$$
$$Parity(y) = \prod_{i=0}^{n-1} y_i$$
An example would be lets take a binary string $x = 1010110110$ the Parity function would give $1$ since even number of ones, otherwise $-1$ if odd number of ones.
Also when asking parity of functions its actually asking the parity of the bit string acquired after pluging in the all the input value of the n-bit function. For example lets take the option number 3
$$f:\{0,1^n\} \mapsto \{0,1\}$$
$$A\ constant\ function f({x}) = 1$$
Let take $n=4$, For it, all the possible input values $(x)$ a function can take are from $0$ to $15$ and for every value the functional output is $1$.
Hence a we need to calculate the parity of $1111111111111111$ (16 ones) which is $1$
Now my question is ,The option two ($2$), is it Correct? does it always give $1$ (even) as output ? According to the answers of the quiz, it is showing it is correct, but is it? I've run some test on n=4, n=5, unfortunately both are unsatisfying the answer here.
Thank you.