When can one find a canonically conjugate operator? Suppose one is given a self-adjoint operator $A$ acting on an infinite dimensional separable Hilbert space $\mathcal{H}$. Under what conditions can one find an operator $B$ such that $[A,B] = i$? And if this is possible, how does one construct $B$?
For simplicity, assume that $H \simeq L_2(\mathbb{R})$ and that $A = A(X,P)$ is a function of the position operator $X$ and momentum operator $P$.
What I ultimately want to know is the following. Given a self-adjoint operator $A(X,P)$, by Stone’s theorem we know that $A(X,P)$ generates a one-parameter unitary group $U(t) = e^{-iA(X,P) t}$. What I want to know is if there is a self-adjoint operator (observable) $B(X,P)$, such that $U(t)$ generates translations of $B(X,P)$. And how to find $B(X,P)$ given $A(X,P)$. I know the the condition for $A(X,P)$ to generate translations of $B(X,P)$ is that these operators must satisfy the canonical commutation relation $[A,B] = i$, and hence the reason for phrasing the question as I did. This is analogous to how $P$ generates translations in $X$, that is, $e^{-i Px} \left|x_0\right\rangle = \left|x+x_0\right\rangle$.
 A: There is a conjugate operator if and only if there is a unitary operator $U$ such that $UAU^\dagger = X$. This is a consequence of the Stone-von Neumann theorem - all representations of the canonical commutation relations are unitarily equivalent.
A: This isn't a full answer, but I think the physical essence of the problem can be better grasped by considering the classical analogue of OP's question:
Q: When does a classical observable, $A$, have a conjugate observable?
First a bit of background on classical Hamiltonian mechanics [1]. On the phase space $T^*M=\{(q,p)\}$ (the co-tangent bundle of some configuration space $M=\{q\}$), observables are taken to be the real-valued, smooth, single-valued functions defined globally on phase space. (The emphasized adjectives will be important for us.) Each observable $A(q,p)$ defines a Hamiltonian flow $\Phi^A_t$ on phase space (via Hamilton's equations with Hamiltonian $A$). Along the integral curves of this flow, the value of any observable $B(q,p)$ changes as
\begin{equation}\tag{1}\label{eq1}
\dot B=\{A,B\},
\end{equation}
where $\{\cdot,\cdot\}$ denotes the Poisson bracket. A pair of observables $A,B$ for which $\{A,B\} = 1$ identically are said to be conjugate to each other. In this case $A$ is also said to be “the” generator of translations in $B$ (and vice versa); because, by \eqref{eq1}, the value of $B$ changes monotonically at unit rate along the integral curves of the flow $\Phi^A_t$.
Returning to question Q. The key is to consider the flow lines of $\Phi^A_t$. Suppose there existed a flow line $\gamma$ that closed on itself (as would happen, e.g. in the vicinity of any local extrema of $A$). Then $A$ could not have a conjugate observable $B$; because by going once around $\gamma$ the value of $B$ would have to increase by a finite amount equal to the period of the orbit ($\Delta B=\oint_\gamma \{A,B\}dt=\oint_\gamma 1dt=T_\gamma>0$), so $B$ would have to be either discontinuous or multi-valued; and hence not an observable. More generally: $A$ has no conjugate observable if $\Phi^A_t$ has any integral curves bound to a finite-volume region of phase space. (Hint: use the Poincaré recurrence theorem and a similar argument as above.)
Notice that for an observable $A$ which fails to have a conjugate observable, it is still possible to speak of a locally-defined conjugate “quantity”, $B$, which satisfies $\{A,B\}=1$ but fails to satisfy the stringent definition of a bona fide observable. (This much is guaranteed by the Carathéodory-Jacobi-Lie theorem [2].) This is illustrated on the 2D phase space $T^*\mathbb{R}$ by the observable $I=\frac12(q^2 +p^2)$ (the Hamiltonian for the simple harmonic oscillator); whose conjugate quantity $φ=\arg(q+ip)$ (the phase of oscillation for the sho) either fails to be globally continuous, or else fails to be single-valued (depending on one’s choice of definition). A similar example, this time on the 6D phase space $T^*\mathbb R^3$, is $L_z=xp_y-yp_x$ (the $z$-component of angular momentum), whose conjugate quantity $\theta=\arg(x+iy)$ suffers from the same affliction.
Returning to OP's question regarding quantum observables: I'd just like to point out a link between classical observables, $A$, whose values become quantized (discretized) upon quantization, and those for which the flow $\Phi^A_t$ has closed orbits—that is, in view of the above: a link between quantum observables with discrete spectra and observables lacking a conjugate. The link is easiest to see in the case of classical observables that are completely integrable (as in the Liouville-Arnold theorem [1]). On the one hand, such observables admit action-angle coordinates; so the flow consists entirely of closed orbits. On the other hand, by the Einstein–Brillouin–Keller method of "old quantum theory", the quantum observable's spectrum is discrete.
[1] V. I. Arnol’d, Mathematical methods of classical mechanics, 2nd ed. (Springer-Verlag, 1982).
[2] P. Libermann and C.-M. Marle, Symplectic geometry and analytical mechanics, Vol. 35 (Springer Science & Business Media, 2012).
