  We propose a method to deterministically prepare a desired quantum state in a
one-dimensional (1D) continuum by a shaped photon pulse. This method is based
on time-reverse of the quantum emission process. We show that the desired
quantum state such as Dicke or timed-Dicke state can be successfully prepared
with very high fidelity even if the dissipation to the environment is
nonnegligible and the pulse shaping is not perfect. We also show that large
quantum entanglement between emitters can be created by just a single photon
pulse. This method is experimentally feasible in 1D waveguide-QED or
circuit-QED system.
