Inspiration

Designing quantum algorithms remains a highly specialized and time-consuming process. While large language models can generate code, they often struggle with the combinatorial search required to discover genuinely novel quantum algorithms or optimize existing ones. Inspired by DeepMind’s FunSearch, AlphaEvolve, and recent advances in agentic AI, we wanted to build a system that combines LLM reasoning with evolutionary search to automatically discover high-performing quantum algorithms. Our goal was to make quantum algorithm discovery more accessible while accelerating research in quantum machine learning and quantum computing.

What it does

QFunSearch is an AI-powered quantum algorithm discovery framework. Users specify a quantum computing task—such as circuit synthesis, quantum optimization, quantum machine learning, or Hamiltonian simulation—and the system automatically searches for improved algorithms in stock market. Rather than generating a single solution, QFunSearch iteratively proposes, evaluates, and refines candidate implementations. Each candidate is executed or simulated, scored against task-specific metrics (such as fidelity, gate count, circuit depth, runtime, or resource cost), and fed back into the search loop. The system continuously evolves stronger solutions while maintaining a searchable history of previous discoveries.

How we built it

We built QFunSearch as a modular multi-agent system consisting of:

  • LLM Search Agent for proposing new algorithmic ideas and code mutations.
  • Evaluator Agent that executes quantum circuits using simulators and benchmarks their performance.
  • Evolution Engine that selects promising candidates, performs mutations and recombination, and maintains an evolving population.
  • Memory Module that stores successful patterns, reusable subroutines, and previous search trajectories.
  • Benchmark Suite supporting common quantum computing tasks and objective functions.

The framework integrates modern LLMs with quantum computing libraries such as Qiskit and PennyLane, enabling rapid iteration between reasoning, implementation, and evaluation.

Challenges we ran into

One of the biggest challenges was balancing exploration and exploitation. Pure LLM generation often converged prematurely to similar solutions, while excessive random mutations produced invalid quantum circuits.

Another challenge was evaluating candidate algorithms efficiently. Quantum simulation becomes increasingly expensive as circuit size grows, so we needed caching strategies and parallel evaluation to keep the search practical.

Prompt engineering was also surprisingly important—small changes in how we instructed the LLM significantly affected the diversity and quality of generated algorithms.

Accomplishments that we're proud of

We’re proud of building a fully automated search pipeline that can continuously improve quantum algorithms without manual intervention.

Some highlights include:

  • Developing an end-to-end evolutionary search framework for quantum algorithm discovery.
  • Successfully integrating LLM reasoning with automated benchmarking.
  • Designing a modular architecture that can easily support new quantum tasks and hardware backends.
  • Creating a reusable research platform that can serve both educational and research purposes.

More importantly, the project demonstrates that agentic AI can move beyond code generation into genuine scientific discovery.

What we learned

This project reinforced that LLMs are most powerful when paired with structured search rather than used as standalone generators.

We also learned that good evaluation functions are just as important as good generation models. The quality of the search depends heavily on meaningful performance metrics and efficient benchmarking.

Finally, building autonomous research systems requires careful orchestration of reasoning, memory, evaluation, and optimization—not simply larger language models.

What's next for qfunsearch

Our roadmap includes several exciting directions:

  • Support real quantum hardware alongside simulators.
  • Expand the benchmark library to include quantum chemistry, error correction, and quantum optimization problems.
  • Incorporate reinforcement learning to guide search policies.
  • Build a distributed search framework that scales across multiple GPUs and compute clusters.
  • Enable collaborative search where multiple specialized AI agents explore different regions of the algorithm space simultaneously.
  • Open-source the framework so researchers can contribute new search strategies, benchmarks, and quantum backends.

Ultimately, we envision QFunSearch becoming an autonomous research assistant that helps scientists discover the next generation of quantum algorithms faster than ever before.

Built With

  • llm
  • quantum
Share this project:

Updates