Consider a very simple double well model. We neglect the shape of the well and a particle only has two possible states: in the left well or the right well. Using creation operators, the two sates are \(a_L^\dagger|0\rangle\) and \(a_R^\dagger|0\rangle\) , where \(|0\rangle\) is the vacuum state. If we have $2N$ particles, then all the Fork states are $$|n, 2N-n\rangle = \frac{{a_L^\dagger}^n {a_R^\dagger}^{2N-n}}{\sqrt{n!(2N-n)!}}|0\rangle,\: n=0,1,\ldots,2N.$$
Next, let us see what happens when the operator \(a_L^\dagger a_R\) hits on the ket: $$a_L^\dagger a_R |n, 2N-n\rangle = \sqrt{(n+1)(2N-n)}|n+1, 2N-n-1\rangle.$$ one particle is moved from the right well to the left well and the “length” of the state vector is also changed because of the boson enhancement.
On the other hand, let us consider a spin-$N$ particle. It has $2N+1$ spin eigenstates: $$|N,m\rangle_s,\: m=-N,\ldots,N.$$
We also have the ladder operator $S_+$ which increase the $z$ component of spin by $\hbar$: $$\frac{S_+}{\hbar}|N, m\rangle_s = \sqrt{(N+m+1)(N-m)}|N, m+1\rangle_s$$
By taking the following map, $$|n, 2N-n\rangle \mapsto |N,n-N\rangle_s$$
we will find that the two equations above have the same structure. Thus we know \(a_L^\dagger a_R\) is just like the ladder operator \(S_+\) in the spin system. Similarly, their Hermintian conjugates, \(a_R^\dagger a_L\) and \(S_-\) , have the similar relationship.
Now we can construct \(S_x\) and \(S_y\) for the double well system. Since \(S_x = \frac{S_+ + S_-}{2}\) and \(S_y = \frac{S_+ - S_-}{2i}\) in the spin system, we thus have the following map
$$\dfrac{S_x}{\hbar} \mapsto \dfrac{1}{2}(a_L^\dagger a_R + a_R^\dagger a_L)$$ $$\dfrac{S_y}{\hbar} \mapsto \dfrac{1}{2i}(a_L^\dagger a_R - a_R^\dagger a_L)$$Finally, since $$S_z|N, n-N\rangle_s = (n-N)|N,n-N\rangle_s = \frac{n-(2N-n)}{2}|N, n-N\rangle_s,$$ we can map \(S_z\) to \(\frac{1}{2}(n_L-n_R)=\frac{1}{2}(a_L^\dagger a_L - a_R^\dagger a_R)\) . Those conclusions still hold if \(N\) is an integer or a half-integer.
After established this map, we can consider the Bose–Hubbard model. Assuming there are no interactions between the particles and this double well is perfectly symmetric, the Hamiltonian is then $$H=-J(a_L^\dagger a_R + a_R^\dagger a_L)$$ Now we see this is equivalent to putting a spin-$N$ particle in a magnetic field \(\mathbf B = \frac{4Jm}{g\hbar q}\mathbf e_x\) .