TITLE: Does (the ideal class of) the different of a number field have a canonical square root?
QUESTION [37 upvotes]: A theorem of Hecke (discussed in this question)
shows that if $L$ is a number field, then the image of the
different $\mathcal D_L$ in the ideal class group of $L$ is a square.
Hecke's proof, and all other proofs that I know, establish this essentially by
evaluating all quadratic ideal class characters on $\mathcal D_L$ and showing
that the result is trivial; thus they show that the image of $\mathcal D_L$
is trivial in the ideal class group mod squares, but don't actually exhibit a square root
of $\mathcal D_L$ in the ideal class group.
Is there any known construction (in general, or in some interesting cases) of an ideal
whose square can be shown to be equivalent (in the ideal class group) to $\mathcal D_L$.
Note: One can ask an analogous question when one replaces the rings of integers by
Hecke algebras acting on spaces of modular forms, and then in some situations I know
that the answer is yes.  (See this paper.)  This gives me some hope that there might be a construction in
this arithmetic context too.  (The parallel between Hecke's context (i.e. the number
field setting) and the Hecke algebra setting is something I learnt from Dick Gross.)
Added: Unknown's very interesting comment below seems to show that the answer is "no",
if one interprets "canonical" in a reasonable way.   In light of this,  I am going to ask another question which is a tightening of this one. 
On second thought: Perhaps I will ask a follow-up question at some point, but I think I need more time to reflect on it.  In the meantime, I wonder if there is more that one can say about this question, if not in general, then in some interesting cases.

REPLY [9 votes]: Recently the following was explained to me by Melanie Wood.  (What follows is a summary of some results from her preprint here; see in particular the discussion at the top of page 3.)
If $f$ is a primitive irreducible binary $n$-ic form with coefficients in $\mathbb Z$, then we can consider the locus $S_f$ in $\mathbb P^1_{\mathbb Z}$ that $f$ cuts out.  This will be finite over $\mathbb Z$, and hence is equal to Spec $R$, where $R = H^0(S_f, \mathcal O)$.  The finite $\mathbb Z$-algebra $R$ will be an order in a number field of degree $n$. Not all orders in all number fields arise this way (if $n >3$), but certainly some do!
Now it turns out that restriction of $\mathcal O(n-2)$ to $S_f$ (which is an invertible sheaf on $S_f$, and hence gives an ideal class of $R$) is canonically isomorphic to the inverse different of $R$, and hence if $n$ is even then we can consider the restriction to $S_f$ of $\mathcal O((n-2)/2)$, and so obtain a square root of the inverse different of $R$.
As is explained in the above linked preprint, $R$ alone does not suffice to determine $f$; rather $f$ is determined by $R$ together with some extra ideal-theoretic strucure. So (as far as I know) this construction of the square root does not depend on $R$ alone, but on extra data.
Nevertheless, it gives a very interesting answer to my question in those cases where it applies.