  Classical Monte Carlo algorithms can theoretically be sped up on a quantum
computer by employing amplitude estimation (AE). To realize this, an efficient
implementation of state-dependent functions is crucial. We develop a
straightforward approach based on pretraining parameterized quantum circuits,
and show how they can be transformed into their conditional variant, making
them usable as a subroutine in an AE algorithm. To identify a suitable circuit,
we propose a genetic optimization approach that combines variable ansatzes and
data encoding. We apply our algorithm to the problem of pricing financial
derivatives. At the expense of a costly pretraining process, this results in a
quantum circuit implementing the derivatives' payoff function more efficiently
than previously existing quantum algorithms. In particular, we compare the
performance for European vanilla and basket options.
