PELLINI, RICCARDO
ING - Scuola di Ingegneria Industriale e dell'Informazione
3-apr-2025
2023/2024
L'obiettivo di questo lavoro è permettere la generazione di circuiti quantistici attraverso rappresentazioni apprese in maniera automatica che preservino la semantica dei circuiti stessi. Le strategie attualmente disponibili basate su matrici unitarie o statevector risultano impraticabili su larga scala a causa della crescita esponenziale della loro dimensione con il numero di qubit. Per superare questa limitazione, proponiamo un approccio alternativo che sfrutta le Graph Neural Networks (GNN) e il Contrastive Learning (CL) per apprendere embedding compatti ed espressivi di circuiti quantistici. Tali embedding possono essere impiegati per tasks come classificazione, ottimizzazione e design di circuiti. Nel nostro metodo, i circuiti quantistici sono modellati come grafi, in cui i nodi rappresentano i gate quantistici e gli archi catturano la connettività tra i qubit e le interazioni tra i gate. Introduciamo un nuovo framework di CL per l'apprendimento self-supervised, applicando trasformazioni per generare viste equivalenti dello stesso circuito. A tal fine, costruiamo un ampio dataset di oltre 800 circuiti quantistici non equivalenti tra di loro, con un numero di qubit variabile tra 3 e 18 e una profondità del circuito fissata in funzione del numero di qubit. Gli embedding appresi vengono valutati mediante un protocollo di linear evaluation, basato su un classificatore lineare, con l'obiettivo di analizzare quanto efficacemente conservino l’informazione contenuta nella struttura del circuito. I risultati sperimentali mostrano che embedding di dimensione maggiore migliorano le prestazioni del protocollo di linear evaluation, raggiungendo un'elevata accuratezza con una dimensionalità significativamente inferiore rispetto a quella dello statevector o della matrice unitaria, le quali scalano rispettivamente come $\mathcal{O}(2^n)$ e $\mathcal{O}(4^n)$. Inoltre, un'analisi sull'incertezza del classificatore evidenzia che l'aumento della dimensione dell'embedding non solo migliora l'accuratezza della valutazione, ma aumenta anche la sicurezza nelle predizioni, rendendo il modello più robusto alla crescente complessità dei circuiti. Questo lavoro introduce un framework scalabile e flessibile per la rappresentazione di circuiti quantistici, combinando calcolo quantistico e apprendimento automatico. I nostri risultati forniscono indicazioni sui compromessi tra dimensione e qualità degli embedding appresi, ponendo le basi per tecniche più avanzate di generazione automatica di circuiti quantistici.
The goal of this work is to enable the automatic generation of quantum circuits through learned representations that preserve circuit semantics. Traditional approaches relying on unitary matrices or statevectors for analysis are impractical for large-scale applications due to their exponential scaling with the number of qubits. Therefore, we propose an alternative method that leverages Graph Neural Networks (GNNs) and Contrastive Learning (CL) to learn compact and expressive embeddings of quantum circuits. These embeddings have the potential to allow for efficient downstream tasks such as classification, optimization, and circuit design. In this work, quantum circuits are represented as graphs, where nodes correspond to quantum gates and edges capture qubit connectivity and gate interactions. A novel CL framework is introduced to learn representations of the circuits in a self-supervised manner, incorporating domain-specific transformations to generate equivalent views of the same circuit. To allow this, an extensive dataset of over 800 non-equivalent quantum circuits is constructed, with a range of qubits going from 3 to 18, and a dynamic depth range based on qubits count. The learned embeddings are tested using a linear evaluation which relies on a linear classifier: with this protocol, we aim at analyzing how effectively the embeddings store information on the circuit structure. Experimental results show that larger embeddings improve the quality of the linear evaluation protocol, achieving high accuracy with a dimensionality significantly smaller than that of the statevector or unitary matrix, respectively scaling as $\mathcal{O}(2^n)$ and $\mathcal{O}(4^n)$. Further analysis on the uncertainty of the linear classifier used in the linear evaluation reveals that increased embedding size not only improves the accuracy of the linear evaluation protocol, but also the confidence in predictions, being more resilient to increasingly complex circuits. By bridging quantum computing and machine learning, this work introduces a scalable and flexible framework for quantum circuit representation. Our findings provide valuable insights into the trade-offs between the size and the quality of the learnt embeddings, offering a foundation for more advanced techniques of automatic generation of quantum circuits.