tensorflow/quantum

An open-source Python framework for hybrid quantum-classical machine learning.

Python

2,197

888 commits

updated Oct 13, 2026

See the code

README

TensorFlow Quantum logo

High-performance Python framework for hybrid quantum-classical machine learning

Licensed under the Apache 2.0
license Compatible with Python versions 3.10 and
higher TensorFlow Quantum project on
PyPI

Features – Installation – Quick Start – Getting help – Citing TFQ – Contact

Features

TensorFlow Quantum (TFQ) is a Python framework for hybrid quantum-classical machine learning focused on modeling quantum data. It provides users with the tools they need to interleave quantum algorithms and logic designed in Cirq with the powerful and performant ML tools from TensorFlow. Here are some of TFQ's features:

  • Integrates with Cirq for writing quantum circuit definitions
  • Integrates with qsim for running quantum circuit simulations
  • Uses Keras to provide high-level abstractions for quantum machine learning constructs
  • Provides an extensible system for automatic differentiation of quantum circuits
  • Offers many methods for computing gradients, including parameter shift and adjoint methods
  • Implements operations as C++ TensorFlow Ops, making them 1st-class citizens in the TF compute graph
  • Harnesses TensorFlow’s computational machinery to provide exceptional performance and scalability

TensorFlow Quantum empowers quantum algorithms and machine learning researchers to pursue questions whose answers can only be obtained through fast simulation of many millions of moderately-sized circuits. It has already been instrumental in enabling ground-breaking research in QML by providing a seamless workflow for leveraging Google’s quantum computing offerings.

Installation

Please see the installation instructions in the documentation.

Compatibility: At this time, TensorFlow Quantum is built and tested on Linux with the following systems and software:

  • Python 3.10–3.12
  • TensorFlow 2.19.1
  • TF-Keras 2.19.0
  • NumPy 2.0
  • Cirq 1.5.0

Quick start

Guides and tutorials for TensorFlow Quantum are available online at the TensorFlow.org web site.

Documentation for TensorFlow Quantum, including tutorials and API documentation, can be found online at the TensorFlow.org web site.

All of the examples can be found in GitHub in the form of Python notebook tutorials

Getting help

Please report bugs or feature requests using the TensorFlow Quantum issue tracker on GitHub.

There is also a Stack Overflow tag for TensorFlow Quantum that you can use for more general TFQ-related discussions.

Citing TensorFlow Quantum

When publishing articles or otherwise writing about TensorFlow Quantum, please cite the paper "TensorFlow Quantum: A Software Framework for Quantum Machine Learning" (2020) and include information about the version of TFQ you are using.

@misc{broughton2021tensorflowquantum,
      title={TensorFlow Quantum: A Software Framework for Quantum Machine Learning},
      author={Michael Broughton and Guillaume Verdon and Trevor McCourt
      and Antonio J. Martinez and Jae Hyeon Yoo and Sergei V. Isakov
      and Philip Massey and Ramin Halavati and Murphy Yuezhen Niu
      and Alexander Zlokapa and Evan Peters and Owen Lockwood and Andrea Skolik
      and Sofiene Jerbi and Vedran Dunjko and Martin Leib and Michael Streif
      and David Von Dollen and Hongxiang Chen and Shuxiang Cao and Roeland Wiersema
      and Hsin-Yuan Huang and Jarrod R. McClean and Ryan Babbush and Sergio Boixo
      and Dave Bacon and Alan K. Ho and Hartmut Neven and Masoud Mohseni},
      year={2021},
      eprint={2003.02989},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      doi={10.48550/arXiv.2003.02989},
      url={https://arxiv.org/abs/2003.02989},
}

Contact

For any questions or concerns not addressed here, please email quantum-oss-maintainers@google.com.

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

Copyright 2020 Google LLC.

algorithms
api
cirq
google
google-quantum
machine-learning
machine-learning-algorithms
machine-learning-library
nisq
python
qml
quantum
quantum-algorithms
quantum-computing
quantum-information
quantum-machine-learning
quantum-programming
quantum-simulation
sdk
tensorflow

tensorflow/quantum

An open-source Python framework for hybrid quantum-classical machine learning.

Python

2,197

888 commits

updated Oct 13, 2026

See the code

README

TensorFlow Quantum logo

High-performance Python framework for hybrid quantum-classical machine learning

Licensed under the Apache 2.0
license Compatible with Python versions 3.10 and
higher TensorFlow Quantum project on
PyPI

Features – Installation – Quick Start – Getting help – Citing TFQ – Contact

Features

TensorFlow Quantum (TFQ) is a Python framework for hybrid quantum-classical machine learning focused on modeling quantum data. It provides users with the tools they need to interleave quantum algorithms and logic designed in Cirq with the powerful and performant ML tools from TensorFlow. Here are some of TFQ's features:

  • Integrates with Cirq for writing quantum circuit definitions
  • Integrates with qsim for running quantum circuit simulations
  • Uses Keras to provide high-level abstractions for quantum machine learning constructs
  • Provides an extensible system for automatic differentiation of quantum circuits
  • Offers many methods for computing gradients, including parameter shift and adjoint methods
  • Implements operations as C++ TensorFlow Ops, making them 1st-class citizens in the TF compute graph
  • Harnesses TensorFlow’s computational machinery to provide exceptional performance and scalability

TensorFlow Quantum empowers quantum algorithms and machine learning researchers to pursue questions whose answers can only be obtained through fast simulation of many millions of moderately-sized circuits. It has already been instrumental in enabling ground-breaking research in QML by providing a seamless workflow for leveraging Google’s quantum computing offerings.

Installation

Please see the installation instructions in the documentation.

Compatibility: At this time, TensorFlow Quantum is built and tested on Linux with the following systems and software:

  • Python 3.10–3.12
  • TensorFlow 2.19.1
  • TF-Keras 2.19.0
  • NumPy 2.0
  • Cirq 1.5.0

Quick start

Guides and tutorials for TensorFlow Quantum are available online at the TensorFlow.org web site.

Documentation for TensorFlow Quantum, including tutorials and API documentation, can be found online at the TensorFlow.org web site.

All of the examples can be found in GitHub in the form of Python notebook tutorials

Getting help

Please report bugs or feature requests using the TensorFlow Quantum issue tracker on GitHub.

There is also a Stack Overflow tag for TensorFlow Quantum that you can use for more general TFQ-related discussions.

Citing TensorFlow Quantum

When publishing articles or otherwise writing about TensorFlow Quantum, please cite the paper "TensorFlow Quantum: A Software Framework for Quantum Machine Learning" (2020) and include information about the version of TFQ you are using.

@misc{broughton2021tensorflowquantum,
      title={TensorFlow Quantum: A Software Framework for Quantum Machine Learning},
      author={Michael Broughton and Guillaume Verdon and Trevor McCourt
      and Antonio J. Martinez and Jae Hyeon Yoo and Sergei V. Isakov
      and Philip Massey and Ramin Halavati and Murphy Yuezhen Niu
      and Alexander Zlokapa and Evan Peters and Owen Lockwood and Andrea Skolik
      and Sofiene Jerbi and Vedran Dunjko and Martin Leib and Michael Streif
      and David Von Dollen and Hongxiang Chen and Shuxiang Cao and Roeland Wiersema
      and Hsin-Yuan Huang and Jarrod R. McClean and Ryan Babbush and Sergio Boixo
      and Dave Bacon and Alan K. Ho and Hartmut Neven and Masoud Mohseni},
      year={2021},
      eprint={2003.02989},
      archivePrefix={arXiv},
      primaryClass={quant-ph},
      doi={10.48550/arXiv.2003.02989},
      url={https://arxiv.org/abs/2003.02989},
}

Contact

For any questions or concerns not addressed here, please email quantum-oss-maintainers@google.com.

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

Copyright 2020 Google LLC.

algorithms
api
cirq
google
google-quantum
machine-learning
machine-learning-algorithms
machine-learning-library
nisq
python
qml
quantum
quantum-algorithms
quantum-computing
quantum-information
quantum-machine-learning
quantum-programming
quantum-simulation
sdk
tensorflow

Project health

Overall

6.1/10

Maintained

5/10

Code review

9/10
OpenSSF Scorecard

Latest release

0.7.6 · Feb 18, 2026

Releases this year

3

Significant stargazers

Lukas Geiger

304 followers · starred Mar 2020

Delgermurun

215 followers · starred Mar 2020

Cheng Xing

21 followers · starred Apr 2021

Chris

98 followers · starred Feb 2026