TITLE: What is the obstruction for a local set of models of a curve to come from a global model?
QUESTION [5 upvotes]: If $X_{\mathbb{Q}}$ is a curve over $\mathbb{Q}$, we get a curve $X_{\mathbb{Q}_p}$ over $\mathbb{Q}_p$ for every prime $p$.
My question is about the reverse process. Say we are given curves $X_{\mathbb{Q} _ p}$ for every $p$ such that $X_ { \bar {\mathbb{Q}} _ p} \cong X_ {\bar{ \mathbb{Q}} _ q}$ for any two primes $p$ and $q$ (where the isomorphism is as schemes; alternatively, they are isomorphic when base-changed to an algebraically closed field that contains both $\mathbb{Q}_p$ and $\mathbb{Q} _ q$). Then is there a nice way to describe the obstruction for these models to come from a global curve $X_{\mathbb{Q}}$ over $\mathbb{Q}$?

REPLY [2 votes]: I think the following interpretation of your question is false for cardinality reasons.  It occurred to me before I saw Donu's answer but seems to have a similar flavour. 
I will say that two curves over a field are twists of each other if they become isomorphic over an algebraic closure.
Interpretation. Fix a curve $C$ over $\mathbf{Q}$.  For every place $v$ of $\mathbf{Q}$, let $X_v$ be an arbitrary (random) twist of $C_v$.  Does there exist a curve $D$ over $\mathbf{Q}$ such that $D_v$ is isomorphic to $X_v$ for every $v$ ?
In genus $0$, not every such family can come from a conic over $\mathbf{Q}$, as Felipe has remarked.
In genus $g>0$, if we start with a hyperelliptic curve $C$, then we get uncountably many families $(X_v)_v$ by taking random quadratic twists at each place $v$.  All these families satisfy your hypotheses, and some cannot come from the countably many genus-$g$ curves over $\mathbf{Q}$. 
Examples.  Suppose we have an elliptic curve $E$ over $\mathbf{Q}$ which is the only curve in its isogeny class, and assume moreover that Ш$(E)$ is trivial.  It follow that if a genus-$1$ curve $C$ is such that its jacobian $J$ is isomorphic to $E$ almost everywhere locally, then $J$ is $\mathbf{Q}$-isogenous to $E$, and hence $\mathbf{Q}$-isomorphic to $E$, and hence $C$ is isomorphic to $E$ (because Ш$(E)$ is trivial).
Construct the family $(X_v)_v$ by taking $X_v=E_v$ for every place $v\neq2$ of $\mathbf{Q}$, and perversely take $X_2$ to be a quadratic twist of $E_2$, so that $X_2$ and $E_2$ are not $\mathbf{Q}_2$-isomorphic.
If there were a genus-$1$ curve $C$ such that $C_v$ is $\mathbf{Q}_v$-isomorphic to $X_v$ at every $v$, then $C$ would have to be $\mathbf{Q}$-isomorphic to $E$ (by the choice of $E$, as explained above), which is impossible because they are not  $\mathbf{Q}_2$-isomorphic.
It remains to find such an $E$.  I'm sure this can be done by looking at the tables made by Cremona and Stein.  Could someone please confirm this hunch ?