question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

qubit and qubit_topology don't take current device connectivity into account

See original GitHub issue

Pre-Request Checklist

  • I am running the latest versions of pyQuil and the Forest SDK
  • I checked to make sure that this feature has not already been requested

Issue Description

QCSQuantumProcessor.qubits() and QCSQuantumProcessor.qubit_topology() return information from the ISA without taking “dead” qubits into account—that is, they return information straight from the raw ISA. QCSQuantumProcessor.to_compiler_isa(), however, filters the nodes and edges and marks dead anything without gates. If one were to try to, say, construct a Program that addresses all available qubits and/or edges on a lattice via qubits() or qubit_topology(), they might run into strange-looking errors or the compiler might bend over backward to accommodate the original program in light of the current limitations of a device.

Proposed Solution

Perhaps an optional argument to qubits() & qubit_topology to remove things that aren’t currently active on a QPU lattice?

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
genoscommented, Dec 3, 2021

Here’s a workaround/suggestion for what the proposed optional argument might instigate:

import networkx as nx
from pyquil import get_qc

computer = get_qc(<qc_name>)
qubits = computer.qubits()
topology = computer.qubit_topology()
isa = computer.to_compiler_isa()
# modify topology to remove dead qubits and edges
for qubit in isa.qubits.values():
    if qubit.dead:
        qubits.remove(qubit.id)
t = topology.subgraph(qubits).to_undirected()
for edge in isa.edges.values():
    if edge.dead and edge.ids in t.edges:
        t.remove_edge(*edge.ids)
topology = nx.freeze(t)
0reactions
kalzoocommented, Dec 2, 2022

This should be solved implicitly by https://github.com/rigetti/pyquil/issues/1496

Read more comments on GitHub >

github_iconTop Results From Across the Web

Major Quantum Computing Strategy Suffers Serious Setbacks
These “topological” qubits are extremely difficult to build, but despite the technical challenges, some researchers are convinced that they are ...
Read more >
How are quantum circuits run on real quantum computers?
For running a quantum circuit on a real quantum device, we first need to transpile it to a version that a specific quantum...
Read more >
The Bonsai algorithm: grow your own fermion-to-qubit mapping
In this work, we present a formalism to design flexible fermion-to-qubit mappings from ternary trees. We discuss in an intuitive manner the ...
Read more >
In a historic milestone, Azure Quantum demonstrates formerly ...
This makes a topological qubit more immune to environmental noise, which can't interact with or destroy the information when it encounters just ...
Read more >
Topological Quantum Computing - Medium
The basis of this data is the qubit, which is the quantum analog of the classical bit. Many of the current implementations of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found