  We introduce a theoretical scheme to prepare a pure Bell singlet state of two
bosonic qubits, in a way that is robust under the action of arbitrary local
noise. Focusing on a photonic platform, the proposed procedure employs passive
optical devices and a polarization-insensitive, non-absorbing, parity check
detector in an iterative process which achieves determinism asymptotically with
the number of repetitions. Distributing the photons over two distinct spatial
modes, we further show that the elements of the related basis composed of
maximally entangled states can be divided in two groups according to an
equivalence based on passive optical transformations. We demonstrate that the
parity check detector can be used to connect the two sets of states. We thus
conclude that the proposed protocol can be employed to prepare any pure state
of two bosons which are maximally entangled in either the internal degree of
freedom (Bell states) or the spatial mode (NOON states).
