Over the next few weeks, you may notice a change across the PennyLane ecosystem. We are now importing pennylane as
qp, to emphasize that PennyLane provides functionality for general quantum programming beyond just quantum machine learning (QML). Read on to learn why we are making this change.
If you ask someone working in quantum computing what PennyLane is best for, their answer will most likely be some permutation of 'PennyLane is perfect for quantum machine learning!'. On the PennyLane team, we are immensely proud of this recognition and legacy; it is something we built up over many years, guided by a vision to pioneer differentiable quantum programming.
From the largest collection of hardware-compatible quantum gradient methods, kernel methods, large-scale differentiable simulators, and native integrations with machine learning frameworks, PennyLane often provides the first software implementations of cutting edge QML research results.
Since PennyLane's first release almost 8 years ago, our standard Python import statement β
import pennylane as qml β has reinforced this identity. That association has been
wildly successful, and is a big reason why PennyLane is one of the most widely used
quantum software platforms globally.
Over the last few years, PennyLane has matured and evolved into something much broader. We haven't just been building a QML library; we've been building a robust, high-performance software platform for general-purpose quantum programming.
Simply put, pennylane as qml does not tell the full story.
PennyLane today
Some of you still use PennyLane for QML every day. Or perhaps you're an early fan whose work has since taken you in new directions (hello again π). Either way, you might have missed just how powerful the library has become for general quantum programming.
PennyLane is becoming the go-to place for designing, compiling, and realizing meaningful quantum algorithms β and this has been reflected throughout our platform:
-
Algorithm design.
PennyLane provides a wide variety of components that are needed for important algorithms in quantum computing, quantum chemistry, and quantum machine learning. This includes building blocks such as quantum arithmetic, QROM, QRAM, block encodings, and multiplexers, to larger algorithms such as QSVT, Trotterization, QPE, QFT, and more. Since large algorithms are often beyond the scope of simulation, PennyLane comes with functionality for industrial-scale resource estimation, allowing fast analysis and iteration on algorithms with thousands of qubits and billions of gates.
-
Compilation.
With Catalyst, PennyLane provides an innovative and future-facing quantum compiler. Supporting dynamic circuit features (such as mid-circuit measurements and hardware-native control flow) and a strong library of compilation and optimization routines, Catalyst enables compilation at scale by taking into account algorithm structure.
-
Fault-tolerant quantum computing.
Want to explore fault-tolerant quantum computing? Use PennyLane's dynamic circuit functionality to code quantum error correction protocols (including stabilizer codes and decoding) and fault-tolerant architectures (such as lattice surgery and magic state distillation). -
Quantum machine learning.
PennyLane continues to be the go-to home for quantum machine learning. Train quantum neural networks, perform Lie algebra optimization, and run quantum learning experiments.
We are also continuing to expand the core features you already know and love. Our high-performance lightning simulators are getting faster. Our list of quantum hardware integrations keeps growing. Our library of quantum research demos remains the largest in the world. And our interactive codebook powers university classrooms globally.
Today, with PennyLane, it has never been easier to create meaningful quantum algorithms, from inspiration to implementation.
A new import convention for an evolving library
As we have grown beyond our machine learning label, our conventions need to catch up β referring to the entire library in our Python code via the qml alias feels increasingly restrictive. It suggests that if you aren't doing quantum machine learning, you're in the wrong place β and that is simply not true.
To reflect the platform we are today, we are updating our convention across our documentation and website. Going forward, you will see us using a new alias, aligning PennyLane with general Quantum Programming:
import pennylane as qp
If your fingers are already used to typing np and sp, this should feel like second nature. It is
a small shift, but one designed to fit naturally into the rhythm of the broader scientific Python
ecosystem.
What about quantum machine learning?
Does this mean we are moving away from quantum machine learning? Absolutely not.
QML is in our DNA, and Xanadu is home to one of the leading QML research teams in the field. We want to ensure that PennyLane remains the place to go for meaningful algorithms R&D β whether quantum machine learning, quantum computing, or quantum chemistry.
By switching to qp, we aren't losing QML; we are acknowledging that QML is one exciting chapter in a
much larger story.
At the same time, QML is not a static field. Like PennyLane, QML itself is evolving β dealing with scaling and benchmarking challenges, and exploring new promising avenues through exploitation of symmetries. To stay up to date on the latest in quantum machine learning, check out the PennyLane Guide to Quantum Machine Learning.
Looking forward
You don't need to change your existing code; import pennylane as qml will work forever. But for
your next project, whether it's optimizing a circuit or compiling a large-scale algorithm, we
invite you to use the alias that fits the full scope of what you are building.
It's still the PennyLane you know β just with a name that fits.
Further reading
-
Check out the latest PennyLane v0.44 release for an overview of our newest and most exciting features.
-
Read recent papers from the literature that use PennyLane for cutting-edge algorithm development, including:
About the author
Josh Izaac
Josh is a theoretical physicist, software tinkerer, and occasional baker. At Xanadu, he contributes to the development and growth of Xanaduβs open-source quantum software products.