Skip to content

Qualtran v0.6

Latest
Compare
Choose a tag to compare
@mpharrigan mpharrigan released this 01 Apr 22:23
· 15 commits to main since this release
51492da

We're proud to announce the latest minor release of Qualtran. This release brings infrastructure improvements for writing controlled bloqs, lays the groundwork for more interoperability with other tools, and contains major additions and improvements to our library of bloqs.

Easier and optimized controlled bloqs

ControlledViaAnd was included in the previous release of Qualtran. For multi-qubit control specs, it will compute the conditional once and use single-bit controls in subbloqs. The older Controlled metabloq uses a "total control" decomposition where each subbloq is controlled according to the requested control spec (no matter how complicated it is).

In this release, the default Bloq.get_ctrl_system will use a ladder of And to reduce multiple controls to a single control bit for complex control specs. This is a more optimized default. Bloq authors will always be free to override Bloq.get_ctrl_system for complete flexibility. With this change, more cases can be adequately handled by the automatic default.

This overhaul was contributed by @anurudhp in #1373 #1456 #1451 #1481 #1490, and #1491.

Backwards-incompatible changes

We always strive to avoid any breaking changes in expressing or analyzing quantum algorithms using the public classes, methods, and functions in the qualtran namespace (outside of qualtran.bloqs). However, prior to a 1.0 release, we may make breaking changes that would otherwise accumulate too much tech debt. This release contains some minor incompatible changes, detailed (with alternatives) below.

Note that the qualtran.bloqs library of subroutines will be under active development for the foreseeable future, and we will make incompatible changes to the quantum algorithms for correctness and accuracy following quantum algorithms research results.

  • Bloq.pretty_name has been removed as a base-class method. Override __str__ and use str() to get a string representation of a bloq, by @dstrain115 in #1402
  • The deprecated qualtran.drawing.GraphvizCounts class has been removed. Convenience drawing methods had already been switched to use the replacement, GraphvizCallGraph, by @dstrain115 in #1410
  • The deprecated Bloq._t_complexity_ override has been removed as a base-class method. Override Bloq.my_static_costs instead. The QECGatesCost estimator will still respect _t_complexity_ methods on derived classes if set to legacy=True mode, by @mpharrigan in #1377
  • Controlled meta-bloqs can only be used to control bloqs with all thru-registers. The meaning of a controlled allocation is ill-defined, by @mpharrigan in #1305
  • The default fallback for Bloq.get_ctrl_system will use ControlledViaAnd, see the above section in these release notes.
  • And is now an atomic, leaf bloq. The circuit decomposition in terms of T and measurement-based uncomputation is still available via And.to_clifford_t_circuit(), by @anurudhp in #1513

Interoperability and devops

This release includes dependency adjustments to support interoperability with other quantum tools. This release adds a new dependency PennyLane, but full interoperability requires pennylane>=0.41, which is not yet released at the time of writing. A runtime check is performed, so if you manually update your environment with pennylane>=0.41, the full functionality will be enabled. This logic was included in Qualtran v0.6.1. The prior tag v0.6.0 depended on a pre-release that is not available from PyPI, so qualtran==0.6.0 is not available on PyPI.

Additionally, our repository has been spruced up with a new README, citation information, and dev tools by @mhucka in #1568 #1569 #1571 #1573 #1572 #1597 #1575 #1580, #1598, and #1601

Bloq library additions

Our library of quantum subroutines continues to grow, with substantial additions for doing arithmetic in various fields.

Bloq library enhancements

The existing library has been enhanced with more accurate resource estimation, bug fixes, and bespoke controlled versions of more bloqs.

New Contributors

Full Changelog: v0.5.0...v0.6.0