  We describe algorithms to obtain an approximate classical description of a
$d$-dimensional quantum state when given access to a unitary (and its inverse)
that prepares it. For pure states we characterize the query complexity for
$\ell_q$-norm error up to logarithmic factors. As a special case, we show that
it takes $\widetilde{\Theta}(d/\varepsilon)$ applications of the unitaries to
obtain an $\varepsilon$-$\ell_2$-approximation of the state. For mixed states
we consider a similar model, where the unitary prepares a purification of the
state. In this model we give an efficient algorithm for obtaining Schatten
$q$-norm estimates of a rank-$r$ mixed state, giving query upper bounds that
are close to optimal. In particular, we show that a trace-norm ($q=1$) estimate
can be obtained with $\widetilde{\mathcal{O}}(dr/\varepsilon)$ queries. This
improves (assuming our stronger input model) the $\varepsilon$-dependence over
the algorithm of Haah et al.\ (2017) that uses a joint measurement on
$\widetilde{\mathcal{O}}(dr/\varepsilon^2)$ copies of the state. To our
knowledge, the most sample-efficient results for pure-state tomography come
from setting the rank to $1$ in generic mixed-state tomography algorithms,
which can be computationally demanding. We describe sample-optimal algorithms
for pure states that are easy and fast to implement. Along the way we show that
an $\ell_\infty$-norm estimate of a normalized vector induces a (slightly
worse) $\ell_q$-norm estimate for that vector, without losing a
dimension-dependent factor in the precision. We also develop an unbiased and
symmetric version of phase estimation, where the probability distribution of
the estimate is centered around the true value. Finally, we give an efficient
method for estimating multiple expectation values, improving over the recent
result by Huggins et al.\ (2021) when the measurement operators do not fully
overlap.
