I would like to find an approximate, contiguous function $f(x, a)$ that approaches a unit square from a quarter unit circle according to an approaching factor $a$ :
$$ f(x,a)\approx\left\{ \begin{array}{ll} 1-\sqrt {1-x^2}\quad if\;a=0 \\ 0\qquad\qquad\qquad if\;a=1\land x<1 \\ x=1\qquad\qquad if\;a=1\land x=1 \end{array} \right. $$ $$\{x \, \epsilon \, \mathbb{R} : x \ge 0 \, \land x \le1\}$$
For example, in the image below $a=0.5$, meaning that $f(x)$ falls on the midpoint of the line between the unit circle and the unit square as $\theta$ sweeps from $0$ to $\pi \over 2$.
Approaching a unit square from a unit circle
$f(x)$ does not need to be defined at $a=0 \, \lor a=1$.
The Fernández–Guasti squircle smoothly interpolates between a circle at $a=0$ and a square at $a=1$: $$x^2+y^2-a^2x^2y^2=1$$ An explicit expression for $y$ is easily obtained: $$y=\sqrt{\frac{1-x^2}{1-a^2x^2}}$$ So $1-\sqrt{\frac{1-x^2}{1-a^2x^2}}$ satisfies your requirements.