The pH of a solution is given by the formula:
\[
\text{pH} = -\log[H^+]
\]
Substitute the given value of \( [H^+] = 2 \times 10^{-4} \, \text{mol/L} \):
\[
\text{pH} = -\log(2 \times 10^{-4})
\]
Using logarithmic properties:
\[
\text{pH} = -\log(2) - \log(10^{-4}) = -0.3010 + 4 = 4.5
\]
Thus, the pH of the solution is \( 4.5 \).