We apply the complex Langevin method (CLM) to overcome the sign problem
in 4D SU(2) gauge theory with a theta term extending our previous
work on the 2D U(1) case. The topology freezing problem can be solved
by using open boundary conditions in all spatial directions, and the
criterion for justifying the CLM is satisfied even for large $\theta$
as far as the lattice spacing is sufficiently small. However, we find
that the CP symmetry at $\theta=\pi$ remains to be broken explicitly
even in the continuum and infinite-volume limits due to the chosen
boundary conditions.
In particular, this prevents us from investigating
the interesting phase structures suggested by the 't Hooft anomaly
matching condition. We also try the so-called subvolume method, which
turns out to have a similar problem. We therefore discuss a new technique
within the CLM, which enables us to circumvent the topology freezing
problem without changing the boundary conditions.