Skip to content

Support individual qubits exclusion from circuit routing #865

@kukushechkin

Description

@kukushechkin

Required prerequisites

  • Search the issue tracker to check if your feature has already been mentioned or rejected in other issues.

Describe the feature

While IQM produces several predefined QPU architecture (e.g., Adonis, Apollo, and others in the future), the actual components availability in a concrete IQM stations can use only a subset of qubits because of, for example, manufacturing defects. This fact is represented in the station QPU description returned by the /cocos/quantum-architecture, for example this example, notice absence of the QB2, the full Adonis would have had:

{
  "quantum_architecture": {
    "name": "Adonis Variant",
    "operations": [
      "phased_rx",
      "cz",
      "measurement",
      "barrier"
    ],
    "qubits": [
      "QB1",
      "QB3",
      "QB4",
      "QB5"
    ],
    "qubit_connectivity": [
      [
        "QB1",
        "QB3"
      ],
      [
        "QB3",
        "QB4"
      ],
      [
        "QB3",
        "QB5"
      ]
    ]
  }
}

CUDA Quantum addresses translate qubit by indices, making it impossible to use such an architecture with nvq++ if the allocated quantum memory covers any of the excluded qubits.

There should be a way to exclude certain qubits from circuit routing. For example, it can be specified in the predefined IQM QPU architecture (currently there are Adonis.txt and Apollo.txt), so it is possible to create e.g., Adonis Variant.txt.

For the current format of connectivity mapping it could look like this for an Apollo with QB2, QB3 and QB4 excluded:

# ============================================================================ #
# Copyright (c) 2022 - 2023 NVIDIA Corporation & Affiliates.                   #
# All rights reserved.                                                         #
#                                                                              #
# This source code and the accompanying materials are made available under     #
# the terms of the Apache License 2.0 which accompanies this distribution.     #
# ============================================================================ #

# The format of the file is as follows:
# 1. You must specify the number of nodes
Number of nodes: 20

# 2. Specifying the number of edges is optional
Number of edges: 60

# 3. For each node, list the connections as:
# <NodeNumber> --> { <ConnectedNode1>, <ConnectedNode2>, ... }
# Notes:
# - Node numbers are 0-based
# - Each node's info must be entirely on one line.
# - The nodes and lines do not have to be in order.
# - Connections are assumed to be bidirectional.
# - Any duplicates will be automatically removed.
4 --> {9, 5}
5 --> {10, 6, 4}
6 --> {11, 5}
7 --> {12, 8}
8 --> {13, 9, 7}
9 --> {14, 10, 8, 4}
10 --> {15, 11, 9, 5}
11 --> {16, 10, 6}
12 --> {13, 7}
13 --> {17, 14, 12, 8}
14 --> {18, 15, 13, 9}
15 --> {19, 16, 14, 10}
16 --> {15, 11}
17 --> {18, 13}
18 --> {19, 17, 14}
19 --> {15, 18}

# 4. Excluded nodes
1, 2, 3

Another alternative would be for the CUDA Quantum to automatically retrieve the quantum architecture a station provides.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions