Extending a function from $\mathbb{Q}$ to the upper half plane $\mathbb{H}\cup\mathbb{Q}\cup\{i\infty\}$ Define the extended upper half plane $$\overline{\mathbb{H}}:=\{z\in\mathbb{C}: \mathrm{Im}(z)>0\} \cup \mathbb{Q} \cup \{i\infty\}.$$
To what extent can an arbitrary function on the rationals $f:\mathbb{Q}\to\mathbb{C}$ be analytically continued to $\overline{\mathbb{H}}$? Do there exist nice/interesting examples $f:\mathbb{Q}\to\mathbb{C}$ with nice/interesting extensions $\overline{f}:\overline{\mathbb{H}}\to\mathbb{C}$? I am particularly interested in functions $f:\mathbb{Q}\to\mathbb{N}$ with combinatorial significance.
Edit: The kinds of functions $f:\mathbb{Q}\to\mathbb{N}$ I have in mind would certainly not have a nice extension to the real line. But hopefully they could still be extended to $\overline{\mathbb{H}}$.
 A: Let $D(\tau) = \Delta(\tau)/q = \prod_{n=1}^\infty (1-q^n)^{24} = 1 - 24q + 252q^2 + \cdots$, where $q = e^{2 \pi i \tau}$.  This is a holomorphic function on $\mathbb{H}$ that takes the value 0 at all rational cusps and 1 at infinity (in the sense of radial limits).  Therefore, any finitely supported function $f$ on $\mathbb{Q}$ can be extended using linear combinations of $D(\frac{a \tau + b}{c\tau + d})$, as $\left(\begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \right)$ ranges over a choice of elements of $SL_2(\mathbb{Z})$ such that the set of rationals $a/c$ cover the support of $f$.
For functions with infinite support, I do not have an answer.  You may be able to obtain a normally convergent sum by choosing an order on the cusps, using suitably increasing powers of $D$, or employing cusp forms of higher level.
A: The first thing is to clarify what you mean by 'extend'. You cannot mean 'extend continuously' (in an unrestricted limit) - indeed, your functions $\mathbb{Q}\to\mathbb{Z}$ would then have to be continuous themselves, hence locally constant. But then your extending function would have a constant angular limit on some interval of the real line, which is impossible.
Hence I will assume that you want to extend in such a way that the angular limit at every point in $\mathbb{Q}$ exists and agrees with the function you started with. But then any function can be continued in such a manner, and in a largely arbitrary way.
Indeed, simply let $T$ be a collection of straight vertical segments $I_q$, one for each rational $q$, ending at $q$ and having length tending to zero as the denominator tends to infinity. Let $h:T\to\mathbb{C}$ be the function defined by $h(z)=f(q)$ for $z\in I_q$.  
By Arakeljan's theorem, you can approximate $h$ by an analytic function $\overline{f}$ in the upper half-plane, up to an arbitrary positive continuous error function $\varepsilon:T\to (0,\infty)$ (say $\varepsilon(z)=\operatorname{Im}(z)$). (You may think this requires Nersesjan's theorem, but in the case of sets with empty interior, it follows from Arakeljan's theorem, using a trick also due to Arakeljan, essentially applying the theorem twice.)
Of course we would not expect this extension to have 'nice/interesting properties', since it is so arbitrary.
A: Changing the question slightly, one could put a linear combination of Dirac delta distribution at rational points (or others), and "extend" by computing Poisson integrals, or, more generally, as Koranyi and Helgason and others have done, take a complex power of the Poisson kernel and "integrate" against that. (Waveform) Eisenstein series can be produced this way, for example.
Easier examples of distributional boundary values are perhaps those on the disk, with Euclidean Laplacian rather than $U(1,1)$-invariant one... and either way this set-up lends itself to computing Fourier coefficients on the boundary of a boundary distribution.
Unsurprisingly, for convergence, parameters have to be pushed into a suitable half-plane (etc.) and then one must investigate analytic continuation of the Fourier coefficients, as well as analytic continuation of the whole.
The analytic continuation issue is already illustrated on the circle identified with $[0,1]$, with sum of multiples of Dirac deltas at rational numbers $p/q$ in lowest terms, with coefficient $1/q^s$. This warm-up exercise is written-up as one of the two examples in at http://www.math.umn.edu/~garrett/m/fun/mero_contn.pdf
Thus, one might imagine that an integer-valued function on $\mathbb Q$ might be deformed by a sort of "Hecke summation" with an auxiliary parameter $s$, form the linear combination of Dirac deltas, form the generalized Poisson integral, try to analytically continue. 
A: Well, if you transform $\mathbb{H}$ to the unit disk, you are in the well studied domain of Poisson extension.
