  Quantum autoencoder is a quantum neural network model for compressing
information stored in quantum states. However, one needs to process information
stored in quantum circuits for many tasks in the emerging quantum information
technology. In this work, generalizing the ideas of classical and quantum
autoencoder, we introduce the model of Quantum Circuit AutoEncoder (QCAE) to
compress and encode information within quantum circuits. We provide a
comprehensive protocol for QCAE and design a variational quantum algorithm,
varQCAE, for its implementation. We theoretically analyze this model by
deriving conditions for lossless compression and establishing both upper and
lower bounds on its recovery fidelity. Finally, we apply varQCAE to three
practical tasks and numerical results show that it can effectively (1) compress
the information within quantum circuits, (2) detect anomalies in quantum
circuits, and (3) mitigate the depolarizing noise in quantum devices. This
suggests that our algorithm is potentially applicable to other information
processing tasks for quantum circuits.
