mqt.problemsolver.qubo_tools.device

Represents device information and utility methods for quantum devices.

Module Contents

class Calibration[source]

Represents a device calibration including its qubit connectivities and gate fidelities.

num_qubits: int
one_qubit: dict[int, float]
two_qubit: dict[tuple[int, int], float]
measurement_confidences: dict[int, float]
basis_gates: list[str]
connections_dict: dict[int, list[int]]
heavy: dict[int, list[int]]
heavy_children: dict[int, list[int]]
t1: dict[int, float]
t2: dict[int, float]
__post_init__() → None[source]

Post-initialization to set up connections and heavy nodes.

__eq__(value: object) → bool[source]

Check equality between two Calibration objects.

Parameters:

value (object) – The other object to compare against.

Returns:

True if equal, False otherwise.

Return type:

bool

__hash__() → int[source]

Compute a hash for the Calibration object.

Returns:

The hash value.

Return type:

int

classmethod from_dict(data: dict[str, Any], basis_gates: list[str]) → Calibration[source]

Create a Calibration object from a dictionary.

get_shared_neighbor(q1: int, q2: int) → int[source]

Given two qubits in the heavy-hex topology, find a qubit that is connected to both.

Parameters:
  • q1 (int) – The first qubit.

  • q2 (int) – The second qubit.

Returns:

The shared neighbor qubit, or -1 if none exists.

Return type:

int

get_connected_qubit_chain() → list[int][source]

Compute the longest possible hamiltonian path through the device topology.

Returns:

The longest Hamiltonian path through the qubit connectivity graph.

Return type:

list[int]

get_heavy_chain() → list[int][source]

Find a chain of heavy nodes in the heavy-hex topology that are connected through shared children.

Returns:

A chain of heavy nodes connected through shared children.

Return type:

list[int]