Qiskit SDK v2.6 streamlines quantum circuit serialization

The latest version of the Qiskit SDK prioritizes a shift beyond Python, as Qiskit v2.6 is specifically bringing the compiler’s pass-manager framework, QPY serialization and custom operations to that API. The developers say these capabilities are “foundational plumbing for what’s next” in quantum computing, allowing circuits to move between languages and systems via QPY serialization now available through the C API. Qiskit is being built to be the performant software stack users reach for across the entire continuum, not only for near-term work, but for error-corrected pipelines as well.

C API Extends Qiskit to Non-Python Environments

Qiskit version 2.6 introduces a new quantum circuit serialization format, QPY v18, designed for compatibility with older releases only when explicitly requested, a change that prioritizes internal cleanup and more compact on-disk encoding of registers. This version allows circuits with large or numerous classical registers to experience a measurable reduction in file size, a benefit stemming from the release’s focus on the C Application Programming Interface (API).

The team anticipates these capabilities will be important for quantum-centric supercomputing (QCSC) and future fault-tolerant workloads, even as Qiskit continues to provide value for near-term quantum tasks. This groundwork addresses a key limitation for integration with high-performance computing (HPC) environments, where installing Python may not be practical. The new QPY format, while largely focused on internal improvements, offers a tangible benefit in specific cases.

While the difference is negligible for most circuits, those with very large registers or many classical registers can see a meaningful reduction in file size, improving efficiency in data handling and storage. Users requiring compatibility with older Qiskit releases can still generate QPY files in previous formats by specifying a version number less than 18 using either Python or the C API functions qkqpydump*withversion. The format version history details which versions are supported by each Qiskit release, allowing developers to maintain interoperability where needed.

Changes in this release are designed to be additive, meaning existing C code should compile and link against version 2.6 without modification, minimizing disruption for current users. The minimum supported Python version remains 3.10, although this is the last Qiskit version that will support that version of Python.

The developers encourage users to report bugs or request features via GitHub and to consult the Qiskit roadmap for future development plans. The team’s work reflects a broader strategy of building Qiskit as a performant software stack for the entire quantum computing continuum, not only for near-term applications but also for the demands of increasingly complex and powerful quantum systems.

Customizable Pass-Manager Framework via the C API

Qiskit SDK v2.6 introduces a customizable pass-manager framework directly accessible through its C API, allowing developers to construct compiler passes and lower programs through multiple intermediate representations (IRs) entirely from C code. This extends the multi-representation compiler framework established in version 2.5, bringing a layered, progressively-lowering model to the C API and enabling optimization at multiple levels. The framework’s design allows for type-checked, cross-language pipelines, enhancing the flexibility and control available to developers integrating quantum circuits into diverse computing environments.

The release also delivers QPY serialization capabilities via the C API, enabling the creation and reading of Qiskit’s portable binary circuit format without requiring a Python intermediary step. This direct access to QPY, a format now at version 18 with several internal improvements, facilitates interoperability by allowing circuits to be operated on natively in C, while maintaining compatibility with QPY files generated by Python.

Developers can now define custom quantum operations directly from the C API, adding them to any circuit or directed acyclic graph (DAG) using a virtual table (vtable) interface. This vtable defines the functionality of the operation, allowing Qiskit’s data model to interact with user-defined code. The extensibility pattern used for custom operations mirrors that of custom passes and IRs within the new pass-manager framework. According to the release documentation, a custom pass can be defined, registered in a vtable, and executed on a circuit through a QkPassManager.

An example provided demonstrates the removal of identity-equivalent gates using an existing Qiskit routine, showing the framework’s ability to integrate with pre-built functionalities. The team’s work moves the standalone C library closer to operating independently of Python, a step towards enabling Qiskit’s use in environments where Python installation is impractical, such as Julia-on-Windows.

This focus on a C API, and the ability to bypass Python for core functionalities, is a foundational step toward a compiler capable of translating high-level program descriptions into hardware-specific operations across multiple optimization levels. The developers state that this release is centered on the C API, building on previous versions that allowed circuit construction and transpilation through the C interface.

The new features provide significantly more control, enabling developers to tailor the compilation process to specific hardware and algorithmic requirements. The ability to define custom operations and passes directly from C, without Python dependencies, is intended to improve performance optimization and integration with high-performance computing (HPC) workflows.

QPY Serialization Now Available Through the C API

The latest Qiskit SDK release prioritizes a streamlined approach to quantum circuit serialization, now available through its C Application Programming Interface (C API). This release extends beyond mere convenience for developers not using Python. It establishes a foundation for future scalability and interoperability. The team reports that a compiler capable of lowering programs through multiple intermediate representations, a standardized serialization format, and a user-controlled execution model are essential for advanced quantum workflows.

These capabilities, they state, are “foundational plumbing for what’s next,” supporting both near-term quantum computing and the development of error-corrected pipelines. The new QPY serialization functionality allows circuits to move between different languages and systems, a critical element for building a robust and versatile quantum software ecosystem. Qiskit SDK v2.6 builds on previous releases that enabled C API users to construct circuits and run them through the transpiler, now providing significantly more control over the compilation process.

Developers can now define custom compiler passes directly from C, composing them into customizable pass managers and lowering programs through multiple intermediate representations (IRs) with type-checked, cross-language pipelines. The introduction of a new QPY format version, v18, is a key component of this update. While most users should experience a smooth upgrade to v2.6 without code modifications, those working directly with QPY serialization, building Qiskit from source, or using the C API should be aware of this format change.

Multi-IR Lowering Enabled by New C API Passes

The latest Qiskit release expands the flexibility of quantum compilation by enabling programs to transition through multiple intermediate representations, or IRs, during processing. This capability stems from a new system where compiler passes declare both the type of IR they accept as input and the type they produce as output, allowing the pass manager to validate the entire lowering pipeline. This verification ensures that each stage correctly transforms the quantum program before passing it to the next, an important step for optimizing circuit execution.

The pass manager uses QkIrHandle objects to describe these IRs, accommodating both custom, dynamically defined types and Qiskit’s built-in circuit and DAG representations. This architecture extends beyond simple circuit manipulation; it now supports the creation of custom quantum operations directly within the C API. Developers can then integrate these custom operations into circuits using functions like qkcircuitcustomoperation or qkdagapplycustomoperation.

The team emphasizes that this approach provides a consistent extensibility pattern throughout the C API, streamlining the process of adding new features and tailoring the framework to specific needs. A code example demonstrates the allocation of a custom operation, highlighting the ownership transfer to Qiskit for memory management. This allows circuits to be written and read directly from C, bypassing the need for a Python intermediary step.

This is particularly significant because it enables operation on native circuits without requiring a round-trip translation, and maintains compatibility with circuits originally produced in Python. “QPY—Qiskit’s portable, cross-platform binary format for storing quantum circuits—is now accessible from the C API,” the team states. The new QkPassManager manages the execution of these passes, using QkPass objects and reporting errors through the QkCompilationError structure.

Passes declare their input and output IR with a QkIrHandle, which can describe either a dynamically defined C IR or a built-in Qiskit IR. The pass manager uses these handles to verify the pipeline, enabling type-checked compiler pipelines. A lowering pass, for example, would declare different input and output IR handles, allowing the pass manager to confirm the validity of the transformation.

The team provides a code snippet illustrating how to free allocated memory associated with the pass manager, circuit, target and IR handle, ensuring proper resource management. This release builds on previous work that allowed C API users to construct and run circuits through existing transpilation pipelines, now offering the tools to create entirely customized compilation flows.

Qiskit v2.6 Advances Toward Python-Optional Operation

The Qiskit v2.6 release delivers a compiler framework to the C Application Programming Interface (API), extending the layered, progressively-lowering compiler model first introduced in version 2.5. The release introduces a method for defining custom passes within the C API, enabling developers to register these passes in a virtual table and execute them on quantum circuits using a QkPassManager. This system requires defining a struct to hold pass configuration and a function to execute the pass, declaring the expected functions through a QkCustomOpVtable.

An example provided by the developers demonstrates the creation of a pass that removes identity-equivalent gates by using existing Qiskit routines, showing the composability of the new framework. This approach allows for targeted optimization and manipulation of quantum circuits directly within the C API.

Beyond compiler improvements, Qiskit v2.6 addresses a longstanding limitation of its standalone C API, which previously required a Python installation even when not using the Python interpreter. This dependency stemmed from the internal Rust data model’s reliance on Python types, requiring those symbols to be present during linking. Developers are now making progress toward removing this requirement, with the goal of completing the transition in version 2.7.

“One longstanding limitation of standalone mode is that, even though it never starts the Python interpreter, it has still required Python to be installed,” the team noted, highlighting the significance of this change. The release also updates the QPY format to version 18, incorporating several improvements to the portable binary format for quantum circuits. The ability to define custom operations extends to the creation of QkCustomOp objects, requiring the specification of the operation’s name and qubit count through dedicated slots.

Optional slots allow for additional metadata, such as labels or directives, with sensible defaults applied if omitted. The team provided an example demonstrating the creation of a custom gate, its registration and its application to a circuit, before properly freeing the allocated memory.

The combination of a refined compiler framework, a move toward Python independence, and enhanced circuit serialization capabilities positions Qiskit v2.6 as a foundational step toward more powerful and accessible quantum computing tools. The developers describe these capabilities as “foundational plumbing for what’s next,” signaling a commitment to building a robust and scalable ecosystem for the future of quantum computation.

Stay current

See today’s quantum computing news on Quantum Zeitgeist for the latest breakthroughs in qubits, hardware, algorithms, and industry deals.

Avatar of Ivy Delaney

Ivy Delaney

Ivy Delaney has been working with neural networks and machine learning since the mid-nineties, back when a couple of hidden layers and a long afternoon of training counted as ambitious. She has watched the field go from academic curiosity to the thing quietly running underneath everything, and she brings that long view to quantum computing. For Quantum Zeitgeist she covers the ground where the two fields meet. That means quantum machine learning and the variational algorithms it leans on, and it also means the less glamorous but more interesting story of classical machine learning already doing real work inside quantum machines, decoding error-correcting codes, calibrating noisy hardware and learning the error models that simulators depend on. She writes about the hardware those algorithms have to run on too, and about the post-quantum cryptography scramble that the same hardware has set off. Her stories typically start with the paper, whether that is peer-reviewed work, conference proceedings or an arXiv preprint, with the source linked so you can hold a claim up against the research it came from. She is unimpressed by benchmarks that will not say what they beat, and by demonstrations that only work in the press release.

Latest Posts by Ivy Delaney: