tqsd / QuNetSim

A quantum network simulation framework.
https://tqsd.github.io/QuNetSim/
MIT License
118 stars 52 forks source link

examples: add a second generation repeater #162

Open atomgardner opened 1 year ago

atomgardner commented 1 year ago

The idealized quantum repeater from https://arxiv.org/pdf/0809.3629.pdf is modelled with three repeater stations.

fixes: #91


This doesn't generalize to additional nodes easily, and there is no QEC. It is very much a unitaryHACK ;)

stephendiadamo commented 1 year ago

Although a very good attempt, unfortunately the second generation quantum repeater does implement some form of entanglement distillation. I would consider this implementation a first gen quantum repeater... I'll leave this open for now, in case you'd like to add that part in, even though the hack has finished.

nathanshammah commented 1 year ago

@atomgardner you have time until June 20th.

atomgardner commented 1 year ago

@stephendiadamo, I'm probably misreading figure one in https://arxiv.org/pdf/1509.08435.pdf.

Are you talking about the HEG? that it should implement something like the nested purification protocol from https://arxiv.org/pdf/quant-ph/9803056.pdf, rather than generating epr pairs locally and sending?

Miscellaneously, https://arxiv.org/pdf/1509.08435.pdf justifies dropping the QEC for a 2nd gen repeater since op errors here are essentially impossible.

stephendiadamo commented 1 year ago

@atomgardner In https://arxiv.org/pdf/1509.08435.pdf, I'm referring to the quantum error correction step for the 2G repeater. Essentially, for this issue I'd imagine there would be an entanglement distribution step followed by an entanglement distillation/purification step. The entanglement can still come from the sender rather than a central node, but there should be something more than just the distribution step.

atomgardner commented 1 year ago

@stephendiadamo! This is clearer to me now. I have the CX teleportation working with repetition codes, and the repeater working! Let me tidy up the code organization. Are repetition codes sufficient?

@nathanshammah thanks for the time extension but I was never gonna make it :)

atomgardner commented 1 year ago

@stephendiadamo, took me a while to realize there's an easy way to generalize to an arbitrary number of intermediate nodes.

How's this looking?

stephendiadamo commented 1 year ago

@atomgardner

Thanks a lot for the efforts. I'll have a close look in the next couple of days and will send my feedback.

atomgardner commented 1 year ago

@stephendiadamo, I can give this patch a polish if the code is difficult to follow. Let me know.

stephendiadamo commented 1 year ago

Hi @atomgardner, the code looks fine. Sorry for the delay. I'll check it today.

atomgardner commented 1 year ago

If I understand correctly, it transmits a bell pair encoded via a repetition code and performs a correction step to distill entanglement? Is that the remote CNOT part?

I don't think there's any entanglement distillation happening. The paper I followed (https://arxiv.org/pdf/0809.3629.pdf) talks about performing state distillation when preparing the memory qubits—the encoded |+> and |0>—but that is not necessary here, since we can build the encoded states perfectly.

The remote CNOT is used to establish the local encoded Bell pairs shared between neighbouring nodes.

If you like, you can also create this as an example that we can add to the docs. You can check out some other examples and see if that's something you're in interested to do. Basically just walking through the steps with explanation and showing some code along the way.

Oh, this could be fun. I'll add it to my queue :+1: