  We present a novel approach to quantum algorithms, by taking advantage of
modular values, i.e., complex and unbounded quantities resulting from specific
post-selected measurement scenarios. Our focus is on the problem of
ascertaining whether a given function acting on a set of binary values is
constant (uniformly yielding outputs of either all 0 or all 1), or balanced (a
situation wherein half of the outputs are 0 and the other half are 1). Such
problem can be solved by relying on the Deutsch-Jozsa algorithm. The proposed
method, relying on the use of modular values, provides a high number of degrees
of freedom for optimizing the new algorithm inspired from the Deutsch-Jozsa
one. In particular, we explore meticulously the choices of the pre- and
post-selected states. We eventually test the novel theoretical algorithm on a
quantum computing platform. While the outcomes are currently not on par with
the conventional approach, they nevertheless shed light on potential for future
improvements, especially with less-optimized algorithms. We are thus confidend
that the proposed proof of concept could prove its validity in bridging quantum
algorithms and modular values research fields.
