r/QuantumComputing • • 5d ago

Question Can quantum computers potentially be used for data compression?

Hello, I'm a layman when it comes to quantum computing. If I'm not mistaken then I believe quantum computers can find repeating patterns across large datasets.

I was wondering if we could this use this feature of quantum computers to greatly enhance data compression of regular data on the cloud (like videos, pictures, songs) by finding repeating patterns that would otherwise be too compute intensive for normal computers to find.

Maybe we could get future data compression closer to the Shannon Limit and cut the need for data racks? This would come at the expense of more classical computing power to decompress all the files, but normal computers are constantly improving. Or if this not feasible or possible then why so?

19 Upvotes

16 comments sorted by

26

u/Cryptizard Professor 5d ago

There are some theoretical works on quantum compression algorithms under certain conditions, but practically, no, there is no evidence that quantum computers would do better than the best classical compression algorithms.

7

u/RyzenFromFire 4d ago

In addition, a major challenge with respect to useful algorithms is actually getting data into the quantum computer. Basically you have to do gates in order to reconstruct the data from scratch. Which in this case means compressng any useful amount of data would already eat most of not all if your gate/time budget just getting the data in.

1

u/Dense_Tangerine_4988 4d ago

Isn't that what Quantum RAM is for? To get the classical data into qubits fast?

1

u/RyzenFromFire 4d ago

QRAM is qubits. It's a technique for storing arbitrary data in a way that works on quantum computers. You still have to implement it using gates. Think of it in this way: any data you want to put in, you need to compile a gate sequence to transform the all zero state into it.

1

u/RyzenFromFire 4d ago

I should clarify, when I say "QRAM is qubits", I mean that QRAM is a (family of) technique(s) that you implement on qubits. There is no magic device that allows you to load data into qubits "faster". If you want to understand why, look into control and readout of any particular qubit modality (e.g., superconducting, neutral atom).

With that said, some modalities (particularly superconducting) inherently run much faster than others, so in theory you could use them to "load data faster". But in practice you want to do your compute work on the fast qubits, and store data long term on the slow qubits. So that idea probably isn't really viable.

1

u/Dense_Tangerine_4988 4d ago

I see, as an optimist, I was really hoping this would be revolutionary for data storage, but alas.

2

u/Evesbyte403 5d ago

With my knowledge so far, find this comment agreeable

2

u/stu_pid_1 4d ago

Well I mean error correction is going to dcrew you right at the start there

7

u/claytonkb 4d ago edited 4d ago • Bravo

There is something called superdense coding which does not directly apply to your question but I'm sure you'll find it interesting.

Beyond pointing you to that, I can't answer on the quantum side, but I will offer some clarification on the classical side.

I was wondering if we could this use this feature of quantum computers to greatly enhance data compression of regular data on the cloud (like videos, pictures, songs) by finding repeating patterns that would otherwise be too compute intensive for normal computers to find.

Shannon's theory tells us the compression limit of a message on average (not in a particular case), and assuming some model of the underlying message distribution. The process of encoding/decoding is not computationally difficult, however, developing a good model of a distribution might be (and usually is). 3Blue1Brown just released a video explaining how an LLM can be used as a compression model (search "Compression is Intelligence") in exactly the way described by Shannon. Unlike a simplistic histogram-based model, however, an LLM can be vastly more efficient in its encodings, compressing very large pieces of text (e.g. the US Constitution) down to a vanishingly small number of bits. Thus, the real computational effort is stored in the model itself (e.g. the computation cycles invested during Transformer training), and encoding/decoding with that model is more of a book-keeping task.

Maybe we could get future data compression closer to the Shannon Limit and cut the need for data racks?

Arithmetic-coding is already ideal (achieves the Shannon limit). However, it's just book-keeping. The real challenge is building the model, such as the weights in a Transformer-based LLM.

This would come at the expense of more classical computing power to decompress all the files, but normal computers are constantly improving. Or if this not feasible or possible then why so?

As noted in another reply, QC by itself doesn't offer any improvement over classical, as the Shannon limit isn't dependent upon implementation -- it doesn't assume a classical computing implementation, it's just a bound that applies to any data transmission system. However, since you're thinking along the lines of using computation as a compression-resource, I will point you to another field of mathematics called algorithmic information theory.

Classical information theory looks at a message as a sample drawn from some given distribution q, and Shannon's limit applies to this kind of system. AIT, by contrast, looks at a message as an index into L_M, the language defined by a universal Turing machine M for all halting input programs, p, p', etc. In particular, for any given bit-string x, we are interested in finding a shortest program p s.t. M(p)=x. The length of p, written |p|, is called the Kolmogorov complexity, K(x) and measures the algorithmic information in x. K(x) is uncomputable, which means it is a problem which has no algorithm that solves it in computable time (whether on a classical or quantum computer).

A string that is compressed this way may be much shorter than the Shannon bound if it is highly structured. However, the two measures of information are related -- the Shannon entropy is the expected value of the algorithmic information. Thus, K(x) is generally close to log_2(x) (bounded above by it), just like the Shannon entropy, however, it can become arbitrarily close to zero, randomly, and it is bounded below only by the inverse of the busy-beaver function[1]. It's a truly fascinating function. If you want to learn more about this, search Solomonoff induction and the universal prior -- I personally find the univesral prior to be the most startling object in all of mathematics...

[1] -- I'm using the word "function" in a loose sense here

1

u/Dense_Tangerine_4988 4d ago

Ahhh, lossless compression using neural networks is something I've been interested in. The rest of you said is beyond my level of understanding not going to lie

1

u/interactionlessbomb 2d ago

is partially curious. Why you particularly believe the universal prior M is the most startling object in maths as a whole?

You know this already, but what it does is give a probability to bitstrings that the specified UTM ("Universal Turing machine") U, U(p) prints x* that is strings starting with x, on random programs as input p. That doesn't appear really startling on the face of it.

1

u/claytonkb 2d ago edited 2d ago

is partially curious. Why you particularly believe the universal prior M is the most startling object in maths as a whole?

In a sentence: because the shadow of the universal prior is cast across all* other mathematical objects.

* -- certainly any object in L_u, the language of a universal Turing machine, which practically includes all of mathematics by the Church-Turing thesis.

a probability to bitstrings that the specified UTM ("Universal Turing machine") U, U(p) prints x* that is strings starting with x, on random programs as input p. That doesn't appear really startling on the face of it.

In brief, the (relative) independence of the universal prior from choice of Turing-machine is what makes it so mind-blowing. Let K_M(x) be the Kolmogorov complexity of string x (ignoring prefix-coding issues for simplicity) relative to Turing-machine M. For any two Turing machines M and M', there is some constant c s.t. K_M(x) - K_M'(x) < c for all x. This is the invariance theorem. The constant c can be thought of as a "compiler constant" or "simulation constant". The Solomonoff prior, in turn, is defined in terms of K(x). Thus, the prior has the same invariance property... it is the "same shape" regardless of which M you choose to start with. This means that your choice of computing abstraction (Turing machines, Lambda calculus, Post machines, etc.) is indifferent in respect to the universal prior, since you could simulate any of them on some M' and K_M'(x) will be at most some fixed-constant c away from K_M(x). This is what I mean by saying that it casts a shadow across all other mathematical objects -- the shape of the universal prior is "baked in" to all other mathematical objects. One could argue that it's "just" K(x) looked at from a different angle, but I think this is a distinction without a difference -- to my mind, the universal prior demonstrates just how profound the Church-Turing thesis actually is.

But that's just the part that is most interesting to me personally. For a more robust explanation of the implications of the universal prior, I recommend the following interview of Marcus Hutter at this timestamp. The whole interview is great, but this is the part where he explains the fascinating structure of Solomonoff prediction, and its wider consequences (starting with a brief introduction of K(x)). The Solomonoff predictor (which uses the universal prior to make predictions) is the ideal model for any form of learning, not only by deduction, but including even physical sciences or any kind of inference task. It learns any novel distribution faster than any computable learner. The universal prior essentially exhausts everything we can possibly mean by the term "cause and effect". Every causal process is learned/predicted by the Solomonoff predictor as good or better than any other predictor (subject to the same information constraints, i.e. without hints). Thus, every "why-because" relationship is embedded somewhere in the universal prior; it is itself the ultimate "because".

The fact that the universal prior is uncomputable is an objection sometimes raised against its importance, as though the prior is a topic of applied math -- it is not, it is pure math. Thus, the fact that it is non-constructive does not detract from its conceptual value. Solomonoff's prior solves the induction problem[1] -- it explains why we feel like the future should be like the past, or why an ordered sequence should continue onward. This "should" essentially boils down to probability in length-weighted hypothesis-space. And the universal prior makes the previous sentence completely formal/objective. There's no wiggle-room here, there is no room for philosophical quandaries or subjective opinions. If you posit any sort of why-because explanation for anything (logic, mathematics, physics, exotic/fictitious systems), its shadow is already buried somewhere in the universal prior. To me, that is startling. In some sense, the answer to Conway's puzzle (why does the Monster group exist?), is because of the universal prior. It is the "because" behind every other why-because... at least, in respect to formal systems...

[1] -- at least, modulo a Cartesian demon

1

u/daniel_hanna 4d ago

interesting to think about

1

u/PainterSingle2417 4d ago

When you are talking about compression, there are limits. I have learned about Shannon entropy the hard way trying to recreate video and image compression.

If you are interested in compression watch 3blue1browns new video 

1

u/Responsible_Sea78 4d ago

Some video can be compressed better if you play it backwards. That takes a LOT of memory, not a strong suite for QC's.

1

u/aPhysics_Nerd 2d ago

Yes. It will be a topic at IAS in December.