What it does
Our project predicts how long a quantum circuit will take to run on a simulator before the job is launched. It takes an OpenQASM circuit and simulator threshold as input and estimates the runtime, while also identifying jobs that are likely to time out.
These predictions can help with scheduling jobs, planning compute capacity, flagging expensive circuits, and avoiding wasted resources. For jobs predicted to time out, the system returns the 4-hour runtime cap rather than attempting to predict an exact duration.
How we built it
We trained and evaluated our models using 532 circuit files and 1,497 labeled runs, including 1,464 completed runs and 33 timeouts. We experimented with several approaches, including Gaussian fitting, Graph Transformers, k-Nearest Neighbors, ExtraTrees, regression models, and a mock simulator paired with a neural network.
Our final approach uses a two-stage ExtraTrees + regression architecture. We extract 121 structural features from each circuit, classify the job as fast, regular, or likely to timeout, and then use the appropriate regression model to predict runtime on a logarithmic scale. This approach also allows us to reuse extracted circuit features across different simulator thresholds.
Challenges we ran into
One of our biggest challenges was the limited number of long-running examples in our dataset. Most circuits completed relatively quickly, while only 33 runs timed out, making extremely long runtimes more difficult to predict accurately.
We also had to balance catching timeouts against generating false alarms. Our model correctly identified 27 of 33 timeouts, missed 6 timeouts, and flagged 14 completed runs as potential timeouts. Additionally, our data came from a single simulator environment, limiting how confidently the model can generalize to different hardware and simulator configurations.
Accomplishments that we're proud of
We built a complete pipeline from raw quantum circuit → feature extraction → classification → runtime prediction and tested multiple machine-learning approaches before selecting our final architecture. The system can make predictions quickly, with feature extraction and prediction taking only a few seconds overall.
We're also proud that our timeout classifier correctly identified 27 of the 33 observed timeouts. We created a system that combines classification and specialized regression models, allowing different models to handle different types of quantum circuits.
What we learned
We learned that runtime prediction is not simply a standard regression problem. Runtime distributions are highly uneven, and a small number of very long jobs can have a major impact on model performance. Classifying jobs before predicting their runtime allowed us to better handle these different cases.
We also learned that the quality and diversity of the training data are just as important as the model architecture. More long-running and timeout examples would help us improve predictions, while additional simulator environments would help us understand how well the model generalizes.
What's next for Hit the Quant
Our next steps will be to experiment with different combinations of models to improve runtime predictions, classify jobs based on model strengths and routing it to the respective models, and testing our model with a larger dataset.
Built With
- python
- pytorch
- scikit-learn
- xgboost