Let's fix a universal gate set comprising of a Hadamard gate and a Toffoli gate. Consider an $n$ qubit quantum circuit $U_{x}$, made up of gates from that universal set, applied to initial state $|0^{n} \rangle$.
The transition amplitude $\langle 0^{n}| U_x |0^{n} \rangle$ can be written as
\begin{equation} \langle 0^{n}| U_x |0^{n} \rangle = \frac{f - g}{\sqrt{2^{h}}}, \end{equation} where $h$ is the number of Hadamard gates and $f$ and $g$ are two #P functions. This equivalence is proven in https://arxiv.org/abs/quant-ph/0408129 (equation 6).
Let's say that we are given an efficient classical description of $U_x$ and we want to estimate this transition amplitude classically, upto inverse polynomial additive error. We do not care whether our estimated value preserves the sign of the original output amplitude.
A naive way to estimate the transition amplitude classically, given an efficient description of the circuit $U_{x}$ as the input, would be to estimate $f$ and $g$ individually, upto inverse polynomial additive error. Something like this is hinted in Section V of the paper linked.
But don't we need oracle access to the formulas corresponding to $f$ and $g$ (ie, two Boolean/3SAT formulas such that $f$ is the number of solutions for one, and $g$ is the number of solutions for the other) to individually estimate $f$ and $g$ respectively (upto an inverse polynomial additive error)?
Can we efficiently get a description of these two corresponding Boolean formulas just from the description of the quantum circuit $U_x$ given to us as input (and hence, not need oracle access to these formulas in the input)?