TensorFlow Quantum
Stay organized with collections
Save and categorize content based on your preferences.
TensorFlow Quantum (TFQ) is a Python framework for
quantum machine learning. As an application framework, TFQ allows
quantum algorithm researchers and ML application researchers to leverage
Google’s quantum computing frameworks, all from within TensorFlow.
TensorFlow Quantum focuses on quantum data and building hybrid
quantum-classical models. It provides tools to interleave quantum algorithms
and logic designed in
Cirq with
TensorFlow. A basic understanding of quantum computing is required to
effectively use TensorFlow Quantum.
To get started with TensorFlow Quantum, see the install guide and
read through some of the runnable
notebook tutorials.
Design
TensorFlow Quantum implements the components needed to integrate TensorFlow with
quantum computing hardware. To that end, TensorFlow Quantum introduces two
datatype primitives:
- Quantum circuit —This represents a Cirq-defined quantum circuit within
TensorFlow. Create batches of circuits of varying size, similar to batches of
different real-valued datapoints.
- Pauli sum —Represent linear combinations of tensor products of Pauli
operators defined in Cirq. Like circuits, create batches of operators of
varying size.
Using these primitives to represent quantum circuits, TensorFlow Quantum
provides the following operations:
- Sample from output distributions of batches of circuits.
- Calculate the expectation value of batches of Pauli sums on batches of
circuits. TFQ implements backpropagation-compatible gradient calculation.
- Simulate batches of circuits and states. While inspecting all quantum state
amplitudes directly throughout a quantum circuit is inefficient at scale in
the real world, state simulation can help researchers understand how a quantum
circuit maps states to a near exact level of precision.
Read more about the TensorFlow Quantum implementation in the
design guide.
Report issues
Report bugs or feature requests using the
TensorFlow Quantum issue tracker.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[],null,["# TensorFlow Quantum\n\n\u003cbr /\u003e\n\nTensorFlow Quantum (TFQ) is a Python framework for\n[quantum machine learning](/quantum/concepts). As an application framework, TFQ allows\nquantum algorithm researchers and ML application researchers to leverage\nGoogle's quantum computing frameworks, all from within TensorFlow.\n\nTensorFlow Quantum focuses on *quantum data* and building *hybrid\nquantum-classical models* . It provides tools to interleave quantum algorithms\nand logic designed in\n[Cirq](https://github.com/quantumlib/Cirq) with\nTensorFlow. A basic understanding of quantum computing is required to\neffectively use TensorFlow Quantum.\n\nTo get started with TensorFlow Quantum, see the [install guide](/quantum/install) and\nread through some of the runnable\n[notebook tutorials](./tutorials/hello_many_worlds).\n\nDesign\n------\n\nTensorFlow Quantum implements the components needed to integrate TensorFlow with\nquantum computing hardware. To that end, TensorFlow Quantum introduces two\ndatatype primitives:\n\n- *Quantum circuit* ---This represents a Cirq-defined quantum circuit within TensorFlow. Create batches of circuits of varying size, similar to batches of different real-valued datapoints.\n- *Pauli sum* ---Represent linear combinations of tensor products of Pauli operators defined in Cirq. Like circuits, create batches of operators of varying size.\n\nUsing these primitives to represent quantum circuits, TensorFlow Quantum\nprovides the following operations:\n\n- Sample from output distributions of batches of circuits.\n- Calculate the expectation value of batches of Pauli sums on batches of circuits. TFQ implements backpropagation-compatible gradient calculation.\n- Simulate batches of circuits and states. While inspecting all quantum state amplitudes directly throughout a quantum circuit is inefficient at scale in the real world, state simulation can help researchers understand how a quantum circuit maps states to a near exact level of precision.\n\nRead more about the TensorFlow Quantum implementation in the\n[design guide](/quantum/design).\n\nReport issues\n-------------\n\nReport bugs or feature requests using the\n[TensorFlow Quantum issue tracker](https://github.com/tensorflow/quantum/issues)."]]