Suppose I have the vacuum state $|0>$ without loss of generality for quantum electrodynamics (with topological term proportional to $E B$) with the following additional feature:

The Hamiltonian $H(t) = H_{matter}(t) + \int_M d^3x (\frac{1}{2}(E^2+B^2) + \theta EB)$ is defined only within the region $M \subset \mathbb{R}^{3}$ and on the $N$ covering sets $G_i \subset \mathbb{R}^{3}-M,i \in \{1,\dots,N\}$ this operator does not exist. Therefore, $H$ must act on states $|0,G_1,\dots,G_N;t>$ which have these covering sets as an additional degree of freedom that form an orthogonal basis in Hilbert space; an inner product is one if the product is formed between two equal states and 0 otherwise.

Now one can try to construct the path integral; the derivation of the path integral for quantum electrodynamics is straightforward, but one encounters with inner products $<0,G_1',\dots,G_N';t+dt|0,G_1,\dots,G_N;t>$. The inner product should be defined such that the set of all space topologies is generalized to spacetime topologies. For simplicity one can say that this inner product is a constant $a$ (can be determined by normalization) if there exist morphisms $M(G_i,G_j')$ that lie on intersections $G_i \cap G_j'$ (because one can define a functor from intersections in category of sets to chart transition morphisms in category of manifolds) for all $i\in \{1,\dots,N\}$ **while** **$G_j'$ is in 4-dimensional neighorhood of $G_i$** and zero otherwise. Finally, (normalization factor $a$ can be absorbed into the integral measure) one would obtain the generalized path integral:

$Z = \int \mathcal{D}[G_i^*(t_n)] \dots \int \mathcal{D}[G_i(t_1)] \int \mathcal{D}[A_\mu] \int \mathcal{D}[\psi] e^{iS_{QED}} \mathbb{1}_{Consistency}$

Here, $\mathbb{1}_{Consistency}$ is the indicator function that satisfies above consistency conditions.

Questions:

- Does a theory like this exist in research literature?

- Makes such a theory, a sum over topologies, sense?

- Can the "sum over topologies" also be defined on algebraic varieties or other topological spaces?