qrunch.quantum.backends.backends_utils

Utility functions for backend operations.

Functions

has_internet_connection()

Check if there is an active internet connection.

toggle_internet_connection_checking(*, enable)

Turn off the internet connection check.

verify_backend_works(backend)

Verify that the backend works by running a simple circuit.

has_internet_connection() bool

Check if there is an active internet connection.

Returns:

True if there is an active internet connection, False otherwise.

Return type:

bool

toggle_internet_connection_checking(*, enable: bool) None

Turn off the internet connection check.

This is useful for testing purposes.

Parameters:

enable (bool)

Return type:

None

verify_backend_works(backend: HardwareBackend) None

Verify that the backend works by running a simple circuit.

Parameters:

backend (HardwareBackend) – The backend to verify.

Return type:

None