  We consider the problem of testing and learning quantum $k$-juntas: $n$-qubit
unitary matrices which act non-trivially on just $k$ of the $n$ qubits and as
the identity on the rest. As our main algorithmic results, we give (a) a
$\widetilde{O}(\sqrt{k})$-query quantum algorithm that can distinguish quantum
$k$-juntas from unitary matrices that are "far" from every quantum $k$-junta;
and (b) a $O(4^k)$-query algorithm to learn quantum $k$-juntas. We complement
our upper bounds for testing quantum $k$-juntas and learning quantum $k$-juntas
with near-matching lower bounds of $\Omega(\sqrt{k})$ and
$\Omega(\frac{4^k}{k})$, respectively. Our techniques are Fourier-analytic and
make use of a notion of influence of qubits on unitaries.
