Quantum electrodynamics of excitons in a cavity is shown to be relevant to quantum operations. We present a theory of an integrable solid-state quantum controlled-phase gate for generating entanglement of two photons using a coupled nanodot-microcavity-fiber structure. A conditional phase shift of O(π/10) is calculated to be the consequence of the giant optical nonlinearity keyed by the excitons in the cavities. Structural design and active control, such as electromagnetic induced transparency and pulse shaping, optimize the quantum efficiency of the gate operation.PACS numbers: 78.67. Hc, 42.50.Pq, 03.67.Mn, 42.50.Hz Semiconductor nanodot plays a key role in nanoscience as has been demonstrated by the electrical control of transport [1] and the optical control of quantum operations [2]. Following the study of quantum electrodynamics of atoms in cavity (CQED) [3], effort is underway in the study of CQED of excitons in nanodots [4]. We report here the results of a theoretical study of excitons in CQED as illustrated by the proposal of a solid state controlled phase gate which entangles two photons.Entangled photon pairs are the main stay of quantum information processing [5] and the controlled gate which conditions the dynamics of one photon on the state of the other also enables a key logic operation for quantum computation. There are two approaches to realize such gates: (1) linear optics with projective measurements [6] and (2) nonlinear optics at the discrete photon level. The logic gate working with few-photon nonlinear optics requires impractical interaction length (e.g. several meters) in conventional Kerr media [7]. To obtain giant optical nonlinearity for a two-photon logic gate, novel schemes have been demonstrated, e.g. the atom-cavity QED [8], or proposed, e.g. slow light in a coherently prepared atomic gas exhibiting electromagnetically induced transparency (EIT) [9].The relevance of excitons in CQED is strengthened by the recent advances in solid state photonics and optoelectronics. We expect that the localization of the optical excitations would lead to ready integration of the solid state cavity devices with extant devices. Advances relevant to our proposal in semiconductor quantum devices include single photon sources operating at room temperature [10,11],high-Q microsheres and their coupling to nanodots [4] and to fibers [12], and photonic lattice waveguides and cavities [13,14].The qubit in our scheme is represented by two polarization states of a photon. In a quantum controlled phase gate, a two-photon state acquires a phaseshift conditional to their polarization configuration. The arrangement of our proposed device is given in Fig. 1(a). Two photons traveling along two optical fibers receive their interaction by coupling to two silicon microsphere cavities which are joined by a doped nanodot. The dot provides in theory[15] a strong third-order optical nonlinearity which is essential for a controlled interaction between two photons. Two cavities of different resonant frequencies are needed ...