pyriemann_qiskit.optimization.docplex.square_int_mat_var

pyriemann_qiskit.optimization.docplex.square_int_mat_var(prob, channels, upper_bound=7, name='int_spdmat')[source]

Docplex square integer matrix

Creates a 2-dimensional dictionary of integer decision variables, indexed by pairs of key objects. The dictionary represents a square matrix of size len(channels) x len(channels). A key can be any Python object, with the exception of None.

Parameters:
  • prob (Model) – An instance of the docplex model [1]

  • channels (list) – The list of channels. A channel can be any Python object, such as channels’name or number but None.

  • upper_bound (int (default: 7)) – The upper bound of the integer docplex variables.

  • name (string) – A custom name for the variable. The name is used internally by docplex and may appear if your print the model to a file for example.

Returns:

square_mat – A square matrix of integer decision variables. Access element (i, j) with square_mat[(i, j)]. Indices start with 0.

Return type:

dict

Notes

Added in version 0.0.2.

References