  In this article we investigate how we can employ the structure of
combinatorial objects like Hadamard matrices and weighing matrices to device
new quantum algorithms. We show how the properties of a weighing matrix can be
used to construct a problem for which the quantum query complexity is
ignificantly lower than the classical one. It is pointed out that this scheme
captures both Bernstein & Vazirani's inner-product protocol, as well as
Grover's search algorithm.
  In the second part of the article we consider Paley's construction of
Hadamard matrices, which relies on the properties of quadratic characters over
finite fields. We design a query problem that uses the Legendre symbol chi
(which indicates if an element of a finite field F_q is a quadratic residue or
not). It is shown how for a shifted Legendre function f_s(i)=chi(i+s), the
unknown s in F_q can be obtained exactly with only two quantum calls to f_s.
This is in sharp contrast with the observation that any classical,
probabilistic procedure requires more than log(q) + log((1-e)/2) queries to
solve the same problem.
