Let $ABCD$ be a unit square. A hyperbola has its foci at the midpoints of $\overline{AB}$ and $\overline{CD},$ and passes through all the vertices of the square. Compute the distance between the two vertices of the hyperbola.
Let $M$ and $N$ be the midpoints of $\overline{AB}$ and $\overline{CD},$ respectively. Then the hyperbola is the set of all points $P$ such that \[\left| PM - PN \right| = 2a,\]and $2a$ is the distance between the two vertices of the hyperbola. To find the value of $2a,$ we set $P = A,$ so that \[2a = |AM - AN| = \left| \frac12 - \frac{\sqrt5}2\right| = \boxed{\frac{\sqrt5-1}{2}}.\][asy]
void axes(real x0, real x1, real y0, real y1)
{
	draw((x0,0)--(x1,0),EndArrow);
    draw((0,y0)--(0,y1),EndArrow);
    label("$x$",(x1,0),E);
    label("$y$",(0,y1),N);
    for (int i=floor(x0)+1; i<x1; ++i)
    	draw((i,.1)--(i,-.1));
    for (int i=floor(y0)+1; i<y1; ++i)
    	draw((.1,i)--(-.1,i));
}
path[] yh(real a, real b, real h, real k, real x0, real x1, bool upper=true, bool lower=true, pen color=black)
{
	real f(real x) { return k + a / b * sqrt(b^2 + (x-h)^2); }
    real g(real x) { return k - a / b * sqrt(b^2 + (x-h)^2); }
    if (upper) { draw(graph(f, x0, x1),color,  Arrows); }
    if (lower) { draw(graph(g, x0, x1),color,  Arrows); }
    path [] arr = {graph(f, x0, x1), graph(g, x0, x1)};
    return arr;
}
void xh(real a, real b, real h, real k, real y0, real y1, bool right=true, bool left=true, pen color=black)
{
	path [] arr = yh(a, b, k, h, y0, y1, false, false);
    if (right) draw(reflect((0,0),(1,1))*arr[0],color,  Arrows);
    if (left) draw(reflect((0,0),(1,1))*arr[1],color,  Arrows);
}
void e(real a, real b, real h, real k)
{
	draw(shift((h,k))*scale(a,b)*unitcircle);
}
size(8cm);
real a = (sqrt(5)-1)/2, c=1, b = sqrt(c^2-a^2);
yh(a,b,0,0,-2,2);
draw((-1,1)--(-1,-1)--(1,-1)--(1,1)--cycle);
dot("$A$",(-1,1),NNE);
dot("$B$",(1,1),NNW);
dot("$C$",(1,-1),SSW);
dot("$D$",(-1,-1),SSE);
dot("$M$",(0,1),N);
dot("$N$",(0,-1),S);
dot((0,(sqrt(5)-1)/2)^^(0,-(sqrt(5)-1)/2));
draw((0,-1)--(-1,1),dotted);
[/asy]