qiboteam / qibo

A framework for quantum computing
https://qibo.science
Apache License 2.0
288 stars 59 forks source link

Outputs for autoencoder examples #575

Open dcmesh opened 2 years ago

dcmesh commented 2 years ago

Hello, I'm doing some survey research into quantum autoencoders, and I was running simulations with both the QAE and EF_QAE versions (the ones in qibo/examples/EF_QAE). However, I saw that your examples don't appear to have a decoder portion of the circuit to reconstruct the image from the quantum state. I was wondering if you could provide the steps you used to generate Figure 7 in "Quantum autoencoders with enhanced data encoding".

Any help would be greatly appreciated.

bpcarlos commented 2 years ago

@dcmesh The encoder reduces the initial space with n+k qubits, to a reduced (latent) space with n qubits, where k are the so-called trash qubits. Once you have trained the encoder, you can simply create a circuit with n+k+k qubits and then run the encoder on the first n+k qubits. Finally, you initialize the other k qubits on the 0 state and run U^\dagger (being U the action of the encoder) on the latent qubits n and the new k initialized qubits. Now by simply measuring those qubits, you can obtain Fig. 7.