  We present a general phase matching condition for the quantum search
algorithm with arbitrary unitary transformation and arbitrary phase rotations.
We show by an explicit expression that the phase matching condition depends
both on the unitary transformation U and the initial state. Assuming that the
initial amplitude distribution is an arbitrary superposition sin\theta_0 |1> +
cos\theta_0 e^{i\delta} |2> with |1> = {1 / sin\beta} \sum_k |\tau_k>
<\tau_k|U|0> and |2> = {1 / cos\beta} \sum_{i \ne \tau}|i> <i|U|0>, where
|\tau_k> is a marked state and \sin\beta = \sqrt{\sum_k|U_{\tau_k 0}|^2} is
determined by the matrix elements of unitary transformation U between |\tau_k>
and the |0> state, then the general phase matching condition is tan{\theta / 2}
[cos 2\beta + tan\theta_0 cos\delta sin 2\beta]= tan{\phi / 2} [1-tan\theta_0
sin\delta sin 2\beta tan{\theta / 2}], where \theta and \phi are the phase
rotation angles for |0> and |\tau_k>, respectively. This generalizes previous
conclusions in which the dependence of phase matching condition on $U$ and the
initial state has been disguised. We show that several phase conditions
previously discussed in the literature are special cases of this general one,
which clarifies the question of which condition should be regarded as exact.
