TITLE: When are Galois representations with open image attached to elliptic curves?
QUESTION [7 upvotes]: Let $K$ be a number field with absolute Galois group $G_K$. 
Let  $\rho:G_K \rightarrow GL_2(\hat{\mathbb{Z}})$ be a Galois representation such that the image of $\rho$ is open in $GL_2(\hat{\mathbb{Z}})$, and the determinant of $\rho$ is cyclotomic i.e. $\det \circ \rho = \chi$ where $\chi$ is the cyclotomic character.
Then under what conditions does $\rho$ come from the Galois representation on the Tate module of an elliptic curve?

REPLY [3 votes]: You have to assume that all the local Galois representations are compatible. Even then the representation can come from an automorphic form (as pointed out in the comments). In the case when $K=\mathbb{Q}$, David Zywina has computed all the possible indices of the image of $\rho$ (the result is a little more elaborate) in "On the possible images of the mod l representations associated to elliptic curves over $\mathbb{Q}$".