Generation correlated four-mode states in cavity QED