Ensemble-IR: Concise Representation for Quantum Ensemble Programs
Sourish Wawdhane*, Sashwat Anagolum*, Poulami Das, Yunong Shi · 2025
Read Ensemble-IR: Concise Representation for Quantum Ensemble Programs by Sourish Wawdhane*, Sashwat Anagolum*, Poulami Das, Yunong Shi (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-09581.txt.
Introduction
Sourish Wawdhane, Sashwat Anagolum, Poulami Das, and Yunong Shi design a compact language for whole families of quantum circuits. New quantum tasks, from error checks to device tests, run many near-identical circuits. Today's tools list each circuit out in full, which bloats files and loads. Their format, Ensemble-IR, writes the family once instead.
One shared program holds the common structure of the family. Symbols mark the points that vary: gate kinds, placements, values, or qubit choices. A device can then rebuild each member circuit on the fly at run time. The team rewrote eighteen real workloads from past papers in the format. Each shrank to a single concise file. The work aims to make large quantum workloads easier to move, store, and run.
Catalog record
| CREATOR | Sourish Wawdhane*, Sashwat Anagolum*, Poulami Das, Yunong Shi |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 12 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-09581
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Ensemble-IR: Concise Representation for Quantum Ensemble Programs Sourish Wawdhane*, Sashwat Anagolum*, Poulami Das, Yunong Shi Abstract † † aftertitle: † † footnotetext: *Both authors contributed equally to this research. All authors can be reached at [email protected], [email protected], [email protected], and [email protected] respectively. Fig. 1 : (a) A two-qubit GHZ program to which the randomized compilation error mitigation method is applied. (b) Current frameworks express ensemble workloads by enumerating circuits. (c) Ensemble-IR expresses a shared program structure and captures the circuit generation framework associated with an ensemble program. The complete ensemble code for this program is included in the appendix. I Overview of Quantum Ensemble Programs Multiple important classes of quantum computing algorithms such as error mitigation [ 1 , 2 , 3 , 4 , 5 ] , device characterization [ 6 , 7 , 8 , 9 , 10 , 11 ] , quantum information protocols [ 12 , 13 , 14 , 15 , 16 ] , circuit knitting [ 17 , 18 ] , and composite workloads [ 16 , 19 , 20 , 21 ] involve running large ensembles of related quantum circuits, often numbering in thousands of unique circuits. These multiple circuits share a largely similar structure - connectivity patterns, stages of gates, and overall layout are often preserved across the family. However, individual circuits differ from each other in a few key ways, including changes in circuit width and depth, placement of one and two-qubit gates within layers, changes in gate types and parameter values, and more. Circuits within these programs are often produced by a fixed generation process that sometimes involves randomness. II Limitations of Existing Frameworks Leading quantum programming frameworks and IRs such as OpenQASM [ 22 ] , Qiskit [ 23 ] , QIR [ 24 ] , and Mitiq [ 25 ] are not designed for concise representation of quantum ensemble programs. OpenQASM and QIR provide functionality to express hybrid quantum-classical algorithms and parametric gates. However, they do not provide primitives to concisely express variations in gate placement, gate types, qubit operand selection, or circuit structure. Qiskit and Mitiq provide Python-based APIs that let users generate families of related quantum circuits programatically. However, before these circuits are compiled and executed, they are unrolled into seperate circuits. A commonality tying these quantum frameworks is their reliance on fully materialized circuit representations. Today’s frameworks serialize and load these ensemble workloads onto quantum systems as sets of unique circuits. Figure 1 depicts current methods of expressing ensemble workloads. Applying the randomized compilation [ 26 ] error mitigation strategy to a two-qubit GHZ [ 27 ] program depicted in Figure 1 (a) requires running many individual circuits to infer a final program result. Existing frameworks express this program by enumerating the circuits to be run. Figure 1 (b) depicts the differences between these circuits, involving adding randomly selected pairs of pauli gates before and after each cycle of gates from the original GHZ program. Many ensemble workloads require enumeration of a large number of unique circuits, often ordering in the tens of thousands. Fig. 2 : (a) Today’s quantum systems run ensemble workloads by compiling and loading each circuit separately onto quantum control coprocessors. (b) Ensemble-IR enables ensemble workloads to be loaded onto control systems as a single program structure. Contained circuits can be recreated on the fly at runtime. III Ensemble-IR In this paper, we propose Ensemble-IR, an intermediate representation designed to concisely express quantum ensemble programs. Instead of enumerating the circuits within a workload, Ensemble-IR outlines programs with a single concise circuit generation framework, capturing the similarities and variations between sets of circuits, as illustrated in Figure 1 (c). Ensemble-IR enables entire workloads to be expressed and loaded as a single program onto quantum control systems, as shown in Figure 2 (b). This is in contrast to existing systems, which load groups of circuits onto control hardware separately, as depicted in Figure 2 (a). In the following section, we describe a subset of the operations Ensemble-IR introduces to concisely represent ensemble programs. III-A Overview of Ensemble-IR Ensemble-IR expresses circuit generation logic using control flow constructs, distributions across qubits and gates, random number generation primitives, and symbolic parameters. These instructions enable a control-coprocessor to sample individual circuits from a program description at runtime. III-B Qubits and Simple Gates We introduce Ensemble-IR as a dialect within the Multi-Level Intermediate Representation (MLIR) framework. This section describes simple primitives. In the ensemble dialect, qubits are typically organized into tensors to facilitate indexed addressing. For instance, a register of 25 qubits is represented as a tensor of type tensor <25 x \! eir . physical_qubit > The ensemble dialect does not restrict the set of allowed quantum gates, allowing system providers and users to express any gates they choose. Quantum gates may be specified in ensemble using the eir . gate operation. In addition, parameters for each gate may be procedurally determined at runtime. For example: constructs a single-qubit Hadamard (H) gate, a two-qubit controlled-NOT (CX) gate, and a single-qubit Y axis rotation (RY) gate with a rotation parameter of 0.5 radians. These gate definitions are then used in conjunction with qubit operands to apply quantum operations within the circuit. A complete example of a two-qubit GHZ circuit is included in the appendix to demonstrate these primitives. III-C Random Number Generation Many ensemble workloads rely on randomness to introduce variations between their circuit instances. Ensemble-IR supports these workloads by introducing built-in random number generation primitives. The operations eir . int_uniform and eir . float_uniform allow users to generate tensors of uniformly distributed random numbers within a user-specified range at runtime. These operations can be used to randomize gate choices, parameter values, qubit selections, and more without requiring explicit external precomputation. For example in the following code snippet: \ %ten_ints is constructed as a tensor of ten integers each uniformly sampled from the set \{0, 1, 2\} . Similarly, \ %hundred_floats is constructed as a 10x10 tensor of floating point numbers, each uniformly sampled from the range [0 . 0, 3 . 0) at runtime. On line 8 , the (0, 0) element of \ %hundred_floats is indexed, then used as a parameter to a single-qubit X axis rotation (RX) quantum gate on line 9 . Fig. 3 : (a) The topology of a 4-qubit QAOA circuit, with wire cutting applied to it to form a (b) 3-qubit top subcircuit and a 3-qubit bottom subcircuit. Multicolored icons represent ”ensembled” measurement basis shifts and state preparation operations. (c) The 4-qubit wire-cut circuit depicted with sub circuits illustrated. III-D Probabilistic Gate Sampling and Qubit Selection Ensemble workloads can use random numbers generated at runtime to choose a quantum gate from a predefined set for each circuit iteration. The eir . gate_distribution operation represents a collection of such gate candidates, with all candidates sharing the same number of qubit operands. We illustrate the construction of a gate distribution and its usage in the following code snippet. Here the prior defined \ %ten_integers random number tensor is used to randomly select a gate to apply to \ %qubit_0 : Ensemble-IR’s pattern of dynamic gate selection provides a powerful abstraction for specifying circuit behavior without hardcoding every variant. By defining a gate pool and