  We present a Dicke state preparation scheme which uses global control of $N$
spin qubits: our scheme is based on the standard phase estimation algorithm,
which estimates the eigenvalue of a unitary operator. The scheme prepares a
Dicke state non-deterministically by collectively coupling the spins to an
ancilla qubit via a $ZZ$-interaction, using $\ceil*{\log_2 N} + 1$ ancilla
qubit measurements. The preparation of such Dicke states can be useful if the
spins in the ensemble are used for magnetic sensing: we discuss a possible
realization using an ensemble of electronic spins located at diamond
Nitrogen-Vacancy (NV) centers coupled to a single superconducting flux qubit.
We also analyze the effect of noise and limitations in our scheme.
