qxmt.devices.device_info module

qxmt.devices.device_info module#

class qxmt.devices.device_info.IBMQDevice(*, name, n_qubits, status)

Bases: BaseModel

Parameters:
  • name (str)

  • n_qubits (int)

  • status (str)

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

n_qubits: int
name: str
status: str
qxmt.devices.device_info.get_ibmq_available_devices(service)

Get the available IBMQ devices. Each device has the name, number of qubits, and status (Online or Offline).

Parameters:

service (QiskitRuntimeService) – authorized IBMQ service

Returns:

list of IBMQ devices

Return type:

list[IBMQDevice]

qxmt.devices.device_info.get_number_of_qubits(device)

Get the number of qubits from the device.

Parameters:

device (BaseDevice | QuantumDeviceType) – quantum device

Returns:

number of qubits

Return type:

int

qxmt.devices.device_info.get_platform_from_device(device)

Get the platform name from the device.

Parameters:

device (BaseDevice | QuantumDeviceType) – quantum device

Returns:

platform name

Return type:

str