# Frequently Asked Questions

Get **quick answers** to your most burning questions.

## What is PennyLane?

PennyLane is a

**software framework for differentiable quantum programming**, similar to TensorFlow and PyTorch for classical computation. It facilitates the training of variational quantum circuits.## Does PennyLane work with hardware?

Yes, PennyLane can be used to optimize quantum circuits running on hardware. Simply choose a hardware backend as your device. You can find all available backends in the plugins section.

## Can I use PennyLane with PyTorch/TensorFlow?

Yes, PennyLane integrates with PyTorch and TensorFlow. More information can be found in the documentation.

## What distinguishes PennyLane from other quantum programming languages?

While offering a lot of the functionality of standard quantum programming languages, PennyLane is built around the idea of

**training quantum circuits using automatic differentiation**. This is especially important in applications such as quantum machine learning, quantum chemistry, and quantum optimization.## What is quantum machine learning?

Quantum machine learning investigates the

One can understand these devices as a form of special-purpose hardware like Application-Specific Integrated Circuits (ASICs) and Field-Programmable Gate Arrays (FPGAs), as they are limited in the number and type of operations that can be executed in a single run. However, information processing with quantum computers relies on substantially different laws of physics compared to ASICs and FPGAs.

In modern quantum machine learning, near-term quantum devices are used and trained like neural networks, using

**consequences of using quantum computers for machine learning**, by extending the pool of hardware for machine learning by an entirely new type of computing device—the quantum computer.One can understand these devices as a form of special-purpose hardware like Application-Specific Integrated Circuits (ASICs) and Field-Programmable Gate Arrays (FPGAs), as they are limited in the number and type of operations that can be executed in a single run. However, information processing with quantum computers relies on substantially different laws of physics compared to ASICs and FPGAs.

In modern quantum machine learning, near-term quantum devices are used and trained like neural networks, using

**variational quantum circuits**. More information can be found in our What is QML? page.## What are variational circuits?

Variational quantum circuits, also called parametrized quantum circuits, are

For example consider a quantum algorithm where one operation rotates a qubit by a certain angle kept as a free parameter. The result of the quantum computation now depends on the chosen angle. Using a classical co-processor, the angle, and thereby the quantum circuit, can be

The principle of variational circuits is very similar to neural networks, which is why they play an important role in quantum machine learning.

Visit our QML glossary for more information on the key concepts underpinning quantum machine learning.

**quantum algorithms that depend on tunable parameters**.For example consider a quantum algorithm where one operation rotates a qubit by a certain angle kept as a free parameter. The result of the quantum computation now depends on the chosen angle. Using a classical co-processor, the angle, and thereby the quantum circuit, can be

**optimized for a given task**.The principle of variational circuits is very similar to neural networks, which is why they play an important role in quantum machine learning.

Visit our QML glossary for more information on the key concepts underpinning quantum machine learning.

## How does PennyLane evaluate gradients of quantum circuits?

Wherever possible,

In situations where no parameter-shift rule can be applied, PennyLane uses the finite-difference rule to approximate a gradient.

Both options work whether you run your code on simulators or an actual quantum device.

Visit our QML glossary for more information on the key concepts underpinning quantum machine learning.

**PennyLane uses parameter-shift rules**to extract gradients of quantum circuits. These rules prescribe how to estimate a gradient by running a circuit twice or more times with deliberately shifted parameters.In situations where no parameter-shift rule can be applied, PennyLane uses the finite-difference rule to approximate a gradient.

Both options work whether you run your code on simulators or an actual quantum device.

Visit our QML glossary for more information on the key concepts underpinning quantum machine learning.

## Is PennyLane open source?

Yes, PennyLane is open source software developed under the Apache 2.0 License.