Is there a concept of a "free Hilbert space on a set"? I am looking for a "good" definition of a Hilbert space with a distinct orthonormal basis (in the Hilbert space sense) such that each basis element corresponds to an element of a given set $X$. Before I explain my attempt for a definition of this, let me talk about something analogous.
Analogy:
There exists something analogous for vector spaces, namely the free vector space on the set $X$. This is a vector space $V(X)$ with a distinct basis such that every basis element corresponds to an element of $X$. More precisely, a free vector space on $X$ is a vector space $V(X)$, together with a map $i: X \rightarrow V(X)$ such that the following universal property is satisfied: For every vector space $W$ (over the same field) and every map $\phi: X \rightarrow W$, there is a unique linear map $\psi: V(X) \rightarrow W$ such that $\phi = \psi \circ i$. For such a free vector space over $X$, the set $i(X) = \{i(x) \mid x \in X\}$ is a basis of $V(X)$ such that each element of the basis corresponds to an element of $X$. I heard that one calls $V(X)$ the free vector space because $V(X)$ free object on $X$, but I don't fully understand this concept. 
Let's restrict to complex vector spaces. For a given set $X$, one can construct a free vector space on $X$ as follows: One takes the set $V(X)$ of functions $f: X \rightarrow \mathbb{C}$ with finite support, endowed with pointwise addition and scalar multiplication. This is a vector space with the Kronecker delta functions $\delta_x$ (which evaluate to 1 on $x$ and to zero elsewhere) as a basis. Then $V(X)$, together with the map $i: X \rightarrow V(X), \ x \mapsto \delta_x$ is a free vector space on $X$.
My attempt:
Inspired by the above construction of a free vector space on a set $X$, I want to define a free Hilbert space on $X$. Again, let's restrict to complex Hilbert spaces. For a given set $X$, let $\mathcal{H}(X)$ be the set of functions $f: X \rightarrow \mathbb{C}$ with countable support such that $\sum_{x \in \text{supp}(f)} \vert f(x) \vert^2 < \infty$, endowed with pointwise addition and scalar multiplication and the inner product $\langle f, g \rangle = \sum_{x \in \text{supp}(f) \cap \text{supp}(g)} f(x) \overline{g(x)}$. In other words, set $\mathcal{H}(X) := \ell^2(X)$. This is a Hilbert space where the Kronecker delta functions $\delta_x$ for $x \in X$ form an orthonormal basis. Let $i: X \rightarrow \mathcal{H}(X)$ be the map $x \mapsto \delta_x$.
My question:
Is this a "good" definition of a free Hilbert space on a set $X$? Does it satisfy a universal property analogous to the one for free vector spaces? Is this a "Hilbert space with a distinct orthonormal basis such that each basis element corresponds to an element of $X$"?
What makes me skeptical is the fact that I found a document on the functor $\ell^2$ in which it is said that "The important $\ell^2$–construction is in many ways the closest thing there is to a free Hilbert space" (page 1) but also "Lemma 4.8 showed that $\ell^2(X)$ is not the free Hilbert space on X, at least not in the categorically accepted meaning." What is this "categorically accepted meaning" and how does it relate to the universal property of the free vector space i mentioned above?
 A: Consider the category $\mathsf{Hilb}$ of Hilbert spaces and continuous linear maps between them. The free Hilbert space $H(X)$ on a set $X$ (in the sense of category theory) would have to satisfy the adjunction
$$\hom_\mathsf{Hilb}(H(X),K) \cong \hom_{\mathsf{Set}}(X,|K|),$$
where $K$ is a Hilbert space with underlying set $|K|$. Notice that $H(X)=\ell^2(X)$ for finite sets $X$. More precisely, we have for arbitrary sets $X$
$$\hom_\mathsf{Hilb}(\ell^2(X),K) = \{f \in \hom_{\mathsf{Set}}(X,|K|) : \sum_{x \in X} ||f(x)||^2 < \infty\}.$$
Now let $X$ be any infinite set. Assume that $H(X)$ exists. Let $e : X \to |H(X)|$ be the unit. For every map $f : X \to |K|$ with $K \in \mathsf{Hilb}$ there is a unique $\tilde{f} : H(X) \to K$ such that $\tilde{f}(e(x))=f(x)$ for all $x \in X$. If $C:=||\tilde{f}|| \in \mathbb{R}_{\geq 0}$, it follows $||f(x)|| \leq C ||e(x)||$. Certainly we may choose $f(x) \neq 0$, so that also $e(x) \neq 0$. Hence, if $g : X \to |K|$ is any map, then $g$ is bounded (consider $f(x):=g(x) \cdot ||e(x)||$). This is a contradiction (assume $\mathbb{N} \subseteq X$ and define $g(n):= n \cdot u$ for some unit vector $u$).
A: Here is the answer to the analogous question about Banach spaces. The same kind of argument as in Martin Brandenburg's answer shows that there is no free Banach space on a set if you think the morphisms in the category of Banach spaces are the continuous linear maps. 
However, there is a better choice of morphisms available: you can instead let the morphisms be the continuous linear maps of norm at most $1$. (See this blog post for a defense of this choice.) One of the many nice things about this choice of morphism is that an isomorphism in this category is an isometric isomorphism; in other words, this category really remembers the norm on a Banach space and not just the norm up to Lipschitz equivalence. It is also categorically extremely well-behaved: the corresponding category is complete, cocomplete, and has a symmetric monoidal structure, the Banach space tensor product, with respect to which it is closed monoidal. 
In this category there is such a thing as the free Banach space on a set $S$, and it turns out to be precisely $\ell^1(S)$ provided that you also modify the forgetful functor: the new forgetful functor sends a Banach space not to its underlying set but to the underlying set of its unit ball. (This is also $\text{Hom}(\mathbb{C}, -)$ where $\mathbb{C}$ is the monoidal unit for the Banach space tensor product.) 

Unfortunately, I don't think this argument can be adapted to the case of Hilbert spaces. There are a couple of different choices of morphism and forgetful functor you can try and I think none of them work. Potentially the real problem with Hilbert spaces is that they do not really form a category: they form a dagger category with involution given by the adjoint, and that structure really needs to be taken into account when thinking categorically about Hilbert spaces.
$\ell^2(S)$ can be thought of as satisfying a universal property, but it's not free on a collection of vectors: instead, it's free on a collection of orthonormal vectors. 
A: As made clear by Martin's answer, the issue is boundedness. I propose here a correction (on the Set side) so that there is indeed a free Hilbert space.
Let $\mathsf{WSet}$ be the category of weighted sets $(X,w)$, where $X$ is a set and $w: X \to \Bbb R_{\geq 0}$ is a function. A morphism $(X,w_X) \to (Y,w_Y)$ is a bounded-distortion function --- a function $f: X \to Y$ so that there exists a constant $C \in \Bbb R_{>0}$ so that $$w_Y(f(x)) \leq C w_X(x)$$ for all $x \in X$. This says $f$ can only increase weight by a bounded factor. 
(Note that this says that there is a forgetful functor $W_0: \mathsf{WSet} \to \mathsf{Set}$ given by taking the 0-weight elements. Its adjoint gives sends a set $X$ to the pair $(X,0)$ of $X$ with the zero weight.) 
Let $\mathsf{WSet}_0$ be the full subcategory of weighted sets which have exactly one point of weight zero. (If you like, you can think of this as being a strengthening of the notion of a pointed set.) We write $x_0$ for this basepoint.
Let's build the adjunction to $\mathsf{Hilb}$, the category of Hilbert spaces and bounded maps.
Now the forgetful functor $F:\mathsf{Hilb}\to \mathsf{WSet}_0$ is given by sending $(H, \langle \cdot, \cdot \rangle)$ to $(H, |\cdot|)$. (That is, we take the underlying set, with weight given by the norm.)
The adjoint map $U: \mathsf{WSet}_0 \to \mathsf{Hilb}$ is defined as follows. $U(X,w)$ is defined to be the completion of the pre-Hilbert space whose underlying vector space is $\Bbb R[X]/\Bbb R[x_0]$, the free vector space on $(X,x_0)$, where each pair of points $[x], [y]$ are orthogonal and $\langle [x], [x]\rangle = w(x)$. Here is where we need that the weight 0 set is a single point.
The adjunction is as follows. 
A map $U(X,w) \to V$ is sent to its underlying map at the level of weighted sets. This map has bounded distortion precisely because it is a map in the category of Hilbert spaces (that is, a bounded map). 
A bounded-distortion function $f: (X,w) \to F(V)$ is sent to the following bounded linear map $U(X,w) \to V$. First, the set-level map $X \to F(V)$ gives us a linear map $\Bbb R[f]: \Bbb R[X] \to V$ by linearity; because zero-weight elements are sent to zero-weight elements, we see that the zero-weight element $x_0$ is sent to $0 \in V$, so that our map factors through $\Bbb R[X]/\Bbb R[x_0]$. Lastly, because $w_V(f(x)) \leq Cw(x)$, this says precisely that on a basis of $\Bbb R[X]/\Bbb R[x_0]$, we have $$\|f(x)\|_V = w_V(f(x)) \leq Cw(x) = C\|[x]\|_{\Bbb R[X]}.$$ Because we have checked this on a basis, we see that $\Bbb R[f]$ is a bounded map (with norm bounded above by $C$). It thus extends to the completion. This extension is the map $U(X,w) \to V$.
It is not difficult to check that these are bijections, giving the desired adjunction. (If one only works with arbitrary maps, not bounded-distortion maps, this gives an adjunction with the 
A: This is not a answer but a comment about the construction of the free Hilbert space on a weighted set.

Because we have checked this on a basis, we see that ℝ[] is a bounded map (with norm bounded above by ). It thus extends to the completion.

It it not true. Think of the weighted set $(\mathbb{N},w)$ with $w(0)=0$ and $w(n)=1$ for all $n>0$, and consider $f\colon \mathbb{N}\to (\mathbb{C},|-|)$ given by $f(0)=0$ and $f(n)=1$ for all $n>1$. Then, $|f(n)|=1\leq w(n)$, $n\in \mathbb{N}^*$ and $|f(0)|=0\leq w(0)$. Whence $f$ is a morphism of weighted sets (with $C=1$). Now let $f_0$ be its unique linear extension from the free vector space on basis $\mathbb{N}^*$ (since the zero of the basis $\mathbb{N}$ is identified with the zero of the vector space) to $\mathbb{C}$. Let $\delta_n$ be the image of $n\in\mathbb{N}^*$ in the free vector space. So one has $f_0(\sum_{n\in \mathbb{N}^*}\alpha_n \delta_n)=\sum_{n\in\mathbb{N}^*}\alpha_n$ where $\alpha_n\in\mathbb{C}$ for all $n$ and there are only finitely many non-zero $\alpha_n$'s.
I claim that $f_0$ is not continuous. Let us assume the contrary: let $f_0^\sharp\colon \ell^2(\mathbb{N}^*)\to\mathbb{C}$ be the (unique) extension of $f_0$ by continuity. Then, $f_0^\sharp(\sum_{n\in\mathbb{N}^*}\frac{1}{n}\delta_n)=\sum_{n\in\mathbb{N}^*}\frac{1}{n}f_0^\sharp(\delta_n)=\sum_{n\in \mathbb{N}^*}\frac{1}{n}$ but $(\frac{1}{n})_{n\in\mathbb{N}^*}$ is not summable.
