  The pairwise entanglement of an arbitrary atomic pair randomly extracted from
a laser-driven dense multiqubit sample in the presence of quantum dissipation
due to spontaneous emission is considered. The dipole-dipole interaction
between the particles shifts the laser-qubit resonance frequency and
consequently modifies the quantum entanglement. By means of an appropriate
tuning of the laser frequency, one can optimize the entanglement in this
system. For large ensembles, the maximum entanglement occurs near the laser
parameters where the steady-state sample exhibits phase transition phenomena.
