general_superstaq.validation
Functions
|
Validates that integer_param is an integer and positive (or above a minimum value). |
|
Validates that an ACES noise model is valid. |
|
Validates that the input can be converted into a valid QUBO. |
|
Checks that target conforms to a valid Superstaq format and device type. |
Module Contents
- general_superstaq.validation.validate_integer_param(integer_param: object, min_val: int = 1) None
Validates that integer_param is an integer and positive (or above a minimum value).
- Parameters:
integer_param – The input parameter to validate.
min_val – Optional parameter to validate if integer_param is greater than min_val.
- Raises:
TypeError – If integer_param is not an integer.
ValueError – If integer_param is less than min_val.
- general_superstaq.validation.validate_noise_type(noise: dict[str, object], n_qubits: int) None
Validates that an ACES noise model is valid.
- Parameters:
noise – A noise model parameter.
n_qubits – Number of qubits the noise model is applied to.
- Raises:
ValueError – If noise is not valid.
- general_superstaq.validation.validate_qubo(qubo: object) None
Validates that the input can be converted into a valid QUBO.
- Parameters:
qubo – The input value to validate.
- Raises:
ValueError – If the provided object cannot be converted into a valid QUBO.
- general_superstaq.validation.validate_target(target: str) None
Checks that target conforms to a valid Superstaq format and device type.
- Parameters:
target – A string containing the name of a target device.
- Raises:
ValueError – If target has an invalid format or device type.