Skip to content

Qubo

The result of the QuboTranslator.

A wrapper around qubo matrices that holds all relevant metadata, e.g., the model offset.

matrix property

matrix: NDArray

The actual QUBO matrix.

Returns:

Type Description
NDArray

A square NumPy array representing the QUBO matrix derived from the model's objective.

name property

name: str

The name of the model the QUBO matrix was generated from.

Returns:

Type Description
str

The model name.

offset property

offset: float

The constant offset of the original model passed to the QuboTranslator.

Returns:

Type Description
float

The constant offset of the model.

variable_names property

variable_names: list[str]

The name of the variables in the same order as in the QUBO matrix.

Returns:

Type Description
list[Variable]

The variable names in the order they appear in the QUBO.

vtype property

vtype: Vtype

The type of the model variables. Can be Binary or Spin.

Returns:

Type Description
Vtype

The variable type.