Inspiration
I've always found compression to be an interesting topic, and I was curious if it could enable holding data like video that normally quantum computers today would be far too small for.
What it does
This works with 32x32 black and white videos. I haven't build the encoder yet, but the decoder runs on a quantum computer (right now just a simulator) and takes the compressed video, and then generates a superposition of all (x, y, t) coordinates where the pixel (x, y) at time t is white. This is then measured to get a random pixel from a random frame. Since you normally run a quantum computer with thousands of shots, you can extract thousands of these.
How I built it
The compression is done by treating the image as a volume in the three dimensions (x, y, t), and subdividing it into axis-aligned boxes of varying sizes. The quantum computer first generates a state with one qubit per box, where only one of them is |1> (they are all entangled). Then, a few extra qubits are used to shift the between them, allowing large boxes to be more likely to be chosen than small ones.
With this weighted box-index state, CX gates are used to create the top-left-start of the chosen box, and the height-width-duration is in another superposition of all possible offsets for that box, using CH gates. These are added with a CDKM adder (built into qiskit). The result is qubits representing (x, y, t), entangled together, in a superposition of every white pixel.
Challenges we ran into
Dealing with the weighting was incredibly complicated, since you need to ensure only one is on. Additionally, this is also my first real quantum project, and getting used to quantum computing isn't easy.
Accomplishments that we're proud of
I'm proud that I finally got the decoder working in just a few days, especially considering my lack of experience.
What we learned
I learned all about different quantum gates, and phase kickback after it ruined by master plan. I also learned to think more carefully about the gates I'm using. I at one point wrote up a plan using a controlled-n-Hadamard gate that seemed fine but would have expanded to tens of thousands of CX gates.
What's next for Quantum Video Compresssion
Built With
- qiskit
Log in or sign up for Devpost to join the conversation.