Live data from Hacker News

Tofolli gates are all you need

johndcook.com

41–45 of 45 posts

Re: Tofolli gates are all you need

#41

> any Boolean function can be computed reversibly This only holds because the system returns its raw (a, b) inputs unchanged. It doesn't seem like a useful property. Of course we can "reverse any function" if we store the inputs! Reversing here just means yielding back the inputs.

> Reversing here just means yielding back the inputs. Not quite I think - the example gate they give has (a,b,c) as input and it doesn't return c. So it's not yielding all the inputs back. Furthermore: if you always returned all the inputs, and also computed other values, the outputs from the gates would be strictly increasing in size, so you wouldn't be able to use a finite set of gates to build a computer of arbitr…

Another way to put it: each step in a reversible process must be a bijection, or "information-preserving". The naive way to do that is to return the entire input as part of the result, but that's missing the point.

Re: Tofolli gates are all you need

#43

Earlier quoted context omitted.

> Actually this is true whichever interpretation you take In the Copenhagen interpretation the collapse of the wave function explicitly violates unitarity (and thus reversibility).

(This is way beyond my area of expertise so excuse me that this might be a stupid idea.) I assume the following happens: while a (small) subsystem is in "pure state" (in quantum coherence), no information flows out of this subsystem. Then, when measuring, information flows out and other information flows in, which disturbs the pure state. This collapses of the wave function (quantum decoherence). For all practical pu…

Yes, I think that's a stance many physicists take these days. Unfortunately, it's not verifiable. And we also don't have any clue how gravity (which does become relevant at our scales) would fit into this picture.

Re: Tofolli gates are all you need

#44
post #42

Related, my favorite paper title of all time, "Robust Soldier Crab Ball Gate" [1], demonstrating how soldier crabs can perform functionally complete reversible computations. [1] https://arxiv.org/abs/1204.1749

I'm waiting for Tannhauser gates. Just don't come too close to them if you're in a troopship.

Re: Tofolli gates are all you need

#45

Earlier quoted context omitted.

Could you really do general compression in this language? I was under the impression that the output is always the same size or larger than the input.

Yes you can do compression, if the text is compressible. The playground [1] has a "run length encoding" example. Maybe you meant sorting. You can implement sorting algorithms, as long as you store the information which entries were swapped. (To "unsort" the entries when running in reverse). So, an array that is already sorted doesn't need much additional information; one that is unsorted will require a lot of "undo"…

He meant lossy compression
Post reply on HN