
A New Approach to Multiplication Opens the Door to Better Quantum Computers - kristianp
https://www.quantamagazine.org/a-new-approach-to-multiplication-opens-the-door-to-better-quantum-computers-20190424/
======
Strilanc
I wrote the paper that this article is describing [1], and can answer
questions.

The paper is probably more approachable than you think. Basically I rewrite
code like `let intermediate_value = recursive_call(...)` into code like
`output += recursive_call(...)`, which allows you to make recursive calls in a
way that avoids ever storing the intermediate value. That's important in
contexts where you can't simply discard information, namely quantum computing.

[1]: [https://arxiv.org/abs/1904.07356](https://arxiv.org/abs/1904.07356)

~~~
olliej
How do you deal with reversibility? I assume that is the hard bit, as tail
recursion is not new (and I would have assumed been the first thing picked up
if it was easy)

~~~
Strilanc
It's not really tail recursion, it's just similar in that you get the
recursion into a particular form in order to enable an optimization that
avoids the need for intermediation.

For tail recursion, that form is the last thing executed in a recursive method
should be "return recursive_call(...)". It allows you to tell the sub-call to
give its result directly to the current method's caller, avoiding the need for
the current method to act as an intermediary bouncing the result from its
callee to its caller.

In this paper the special form is "output += recursive_call(...)", where
output is a mutable reference to the location where the result should be
stored. This also allows the current method to avoid acting as an intermediary
between its callee and its caller, since the callee will take a mutable
reference to (a subsection of) the output and directly mutate it.

~~~
robert_tweed
If I'm understanding you correctly (and I haven't RTFA yet, sorry) this is a
bit like Operational Transform, allowing you to run some or all steps in
parallel and achieve eventual-consistency. As opposed to TCO, which is simply
restating recursion as iteration, but still requires the operations to run in
sequence.

~~~
Strilanc
The thing I'm describing doesn't allow the steps to run in parallel. In fact
it prevents it, because each of the three recursive calls require exclusive
access to overlapping regions of the output.

------
samdung
Vedic math for the win: [http://mathlearners.com/vedic-
mathematics/multiplication-in-...](http://mathlearners.com/vedic-
mathematics/multiplication-in-vedic-mathematics/)

~~~
polar
One should clarify that techniques such as these which are described as
_Vedic_ seemingly have nothing to do with Indian mathematics of the Vedic
period.

[https://en.wikipedia.org/wiki/Vedic_Mathematics_(book)](https://en.wikipedia.org/wiki/Vedic_Mathematics_\(book\))

[https://en.wikipedia.org/wiki/Indian_mathematics#Vedic_perio...](https://en.wikipedia.org/wiki/Indian_mathematics#Vedic_period)

------
angel_j
I learned to do multiplication in my head in a similar way, except I'd usually
split on a multiples of 10 for simplicity.

For 25x63, I would go: 60 _10_ 2+3 _10_ 2+5 _60+5_ 3

~~~
Strilanc
That's schoolbook multiplication. It has quadratic complexity in the number of
digits.

------
adamnemecek
I hate to repeat myself, but analog quantum computers are the future. Digital
quantum computers are dead on arrival.

~~~
ThePhysicist
“Digital” quantum gates on superconducting quantum processors are implemented
by changing the system Hamiltonian (by e.g. changing the magnetic flux through
the qubit Josephson junction loop or driving the qubits with microwave
radiation), so in that sense those quantum processors are analog. Most current
quantum algorithms require a series of discrete operations to be performed
(e.g. the Grover search is basically a for loop that executes a phase-encoding
search function and a diffusion operator in each step), so they require a
specific gate set to run them. That said researchers also used superconducting
quantum processors to simulate other quantum systems using an analog approach,
which is often more efficient than using a digital approach (so-called Trotter
based quantum simulation), so both techniques are relevant I’d say.

~~~
adamnemecek
> Most current quantum algorithms require a series of discrete operations to
> be performed

Ok so what?

[https://en.wikipedia.org/wiki/Continuous-
variable_quantum_in...](https://en.wikipedia.org/wiki/Continuous-
variable_quantum_information)

~~~
ThePhysicist
That means that an analog quantum computer will not give you much advantage
when running e.g. Grover search if there’s not a more efficient implementation
using a continuous variable approach (which to my knowledge isn’t), so it is
not even clear how analog quantum computers could replace the gate-based
approach there.

~~~
adamnemecek
Like, I'm not particularly married to Grover's algorithm or any other gate
based algorithm. Throw them all out of the window for all I care.

