TopQAD1Qbit

Microarchitecture Layout

The microarchitecture layout describes the tile-level arrangement of logical patches in a microarchitecture. See the Quantum Architecture Basics section for additional details.

File Structure Overview

A microarchitecture layout file is a JSON object where each key corresponds to a patch identifier:

{
  "<patch_id>": {
    "type": "<patch type>",
    "tiles": [[x1, y1], [x2, y2], ...],
    "edges": "<boundary list>"
  },
  ...
}

Each entry describes a logical patch on the 2D microarchitecture grid.

Patch Identifier

The <patch_id> is a unique identifier for each logical patch. Currently, TopQAD provides a microarchitecture layout for the memory zone via the Compiler service. The ID patterns used are as follows:

  • Bus: numbered "0", "1", "2",...
  • Computational qubit: numbered "q0", "q1", "q2",...
  • Magic state injection: numbered "m0", "m1", "m2",...
  • Ancillary: numbered "r0", "r1", "r2",...
  • Multi-qubit: multi-qubit patches are numbered in the form of tuples. For example, "('q0', 'q1')" encodes a two-qubit logical patch using computational qubits "q0" and "q1".

Patch Fields

Type

The type refers to the logical role of the patch; see the Quantum Architecture Basics section for more details.

TypeDescription
busRouting space used for lattice surgery operations; does not hold logical information.
dataComputational qubits that store and manipulate program qubits.
ancillaryCorrection qubit preparation patches that support extra operations, including those needed to implement Clifford rotations.
magicPatches where magic states are injected into the memory zone.

Tiles

The tiles field has a list of coordinate pairs representing the positions of the tiles associated with the patch.

Notes:

  • Each coordinate pair is in the format [x,y][x, y], where xx and yy are integers representing the tile's position on the 2D grid.
  • Coordinates may be negative.
  • The order of coordinates is not meaningful.
  • A patch may consist of multiple tiles.

Example:

"tiles": [[2, 2], [2, 3], [2, 4]]

The example represents a vertical patch occupying three tiles at positions (2, 2), (2, 3), and (2, 4).

Edges

The edges field has a list encoding the stabilizer boundary configuration of the patch.

  • Single-tile patches use a boundary list of length 4.
  • Two-tile patches use a boundary list of length 6.
  • The list is constructed beginning with the left-bottom edge or the left edge, for vertical and horizontal patches, respectively, and moving clockwise.
  • Each element corresponds to the stabilizer type on that edge:
ElementDescription
Xan edge with XX-type stabilizers
Zan edge with ZZ-type stabilizers
XXan edge shared between two tiles with XX-type stabilizers
ZZan edge shared between two tiles with ZZ-type stabilizers

Example:

(single-tile patch)

"edges": ["X", "Z", "X", "Z"]

This example represents a tile with the following edges: left = X, top = Z, right = X, and bottom = Z.

(two-tile patch)

"edges": ["X", "Z", "X", "X", "Z", "Z"]

For a vertical two-tile patch, the six edges correspond to list elements in the following order: left-bottom → left-top → top → right-top → right-bottom → bottom.

For a horizontal two-tile patch, they correspond to the following order: left → top-left → top-right → right → bottom-right → bottom-left.

Bus tiles do not host stabilizers, so their edges field is always an empty list:

"edges": []