Number and phase operators in superconductors It is stated in many texts that the number operator $N$ which counts the number of Cooper pairs and the phase operator $\phi$ which counts the superconducting order parameter's phase $\text{Arg}(\Delta)=\phi$ are canonically conjugate and thus satisfy
\begin{equation}
N = -i\frac{\partial}{\partial \phi} \iff \phi = i\frac{\partial}{\partial N}
\end{equation}
This makes sense when one looks at the BCS ground state
\begin{equation}
|BCS\rangle = \prod_k (u_k+v_kc^\dagger_{k\uparrow}c^\dagger_{-k\downarrow})|0\rangle
\end{equation}
and since $u^*_kv_k=|u_k||v_k|e^{i\phi}$ this can be written as
\begin{align}
|BCS\rangle &= \prod_k (|u_k|+|v_k|e^{i\phi}c^\dagger_{k\uparrow}c^\dagger_{-k\downarrow})|0\rangle
\end{align}
up to some irrelevant global phase.
We see that every Cooper pair comes with a phase $e^{i\phi}$ so differentiating with respect to $\phi$ gives the same result as counting the number of Cooper pairs.
Due to this well-defined phase $\phi$, $|BCS \rangle$ is a coherent superposition of states with different particle number, and there does not have a well defined $N$. But now let's consider what happens when we project the BCS state on a the subspace with fixed particle number $N$ as explained in https://canvas.harvard.edu/courses/79258/files/folder/Problem%20Sets?preview=12301649. We find that
\begin{equation}
|BCS_N\rangle\equiv \int_0^{2\pi} \frac{d\phi}{2\pi} e^{-iN\phi} |BCS\rangle = C \bigg(\sum_k \frac{|v_k|}{|u_k|} c^\dagger_{k\uparrow}c^\dagger_{-k\downarrow}\bigg)^N |0\rangle
\end{equation}
which looks a lot like a BEC state formed by $N$ Cooper pairs.
This state clearly has $N$ cooper pairs. However when I use the definition $N = -i\frac{\partial}{\partial \phi}$, since there is no $\phi$ dependence in this state (it got integrated out) I am expected to get $N=0$?!
So what's wrong with this reasoning?
 A: The identification of $N$ with $-i\partial_\phi$ is mathematicaly inconsistent as $N$ cannot take negative values. As a consequence it is not surprising that there are some paradoxes.
For example, from $[\phi, \hat N]=i$ we can derive an uncertainly relation $\Delta N \Delta \phi\ge 1/2$, but when $\Delta N$ is small (zero in your fixed number state)  this implies  $\Delta \phi>2\pi$, which is not possible as $\phi$ is an angle with bounded range.
A: It is useful to first review the physics of a quantum planar rotor. Consider the Hilbert space spanned by $|N\rangle$. They are eigenstates of the number operator $\hat{N}|{N}\rangle=N|{N}\rangle$. The phase eigenstates are defined as $|\phi\rangle=\sum_N e^{iN\phi}|N\rangle$. The $|\phi\rangle$'s also form an orthonormal basis. The meaning of $N=-i\partial_\phi$ is that for a given state written in the $|\phi\rangle$ basis:
$$
|\psi\rangle=\int_0^{2\pi}d\phi\, \psi(\phi)|\phi\rangle
$$
We have
$$
\hat{N}|\psi\rangle=\int_0^{2\pi}d\phi\, \Big(-i\partial_\phi\psi(\phi)\Big)|\phi\rangle
$$
Now, the BCS case is not really like a rotor, since $N$ can not be negative. In this case, it is better to think of $N$ as measuring the deviation from the average number of Cooper pairs, which is supposed to be huge, and approximately consider the range $N$ to be all integers.
