Working towards polynomial time for Q function evaluation rather than 2^n by evaluating the null space of the q matrix