Ensemble QCML

The Ensemble QCML model uses an ensemble of state vectors in order to build a quantum representation of the problem. For the Ensemble QCML model the most important parameters are the dims and the axes. You can read about the function of these parameters below, they get passed when qcml.ensemble(...) is called.

class qcog_python_client.EnsembleSchema(operators: list[str | int], dim: int, num_axes: int, sigma_sq: dict[str, float], sigma_sq_optimization: dict[str, float], seed: int, target_operators: list[str | int])

Ensemble-model specific parameters.

Parameters:
  • operators (list[Operator]) – List of operators to be used in the model. These should be the names of the columns in the dataframe for the dataset being trained.

  • dim (int) – The dimensional size of our internal state.

  • num_axes (int) – This corresponds to the sparsity of our representation in our internal state, and it can be thought of as how many basis vectors we are decomposing our internal state into. 1 would make our internal state of low rank and the maximum here is equal to dim^2, which would be a full dense representation.

  • sigma_sq (dict[str, float]) – Dictionary of scaling factors where the keys are the operators and the values are the scaling factors. These are in the form of 1/sigma so a small sigma will increase the weight of that operator in the model.

  • seed (int) – A random seed which is used to initialize the model, you can set this in order to increase reproducibility.

Special Training Parameters

The Ensemble QCML model has additional parameters to be passed to training.

These parameters are additional to the State Parameters and the additional parameters are valid for all methods of state solution.

These parameters are as folows:

  • learning_rate_axes: float

    This is the learning rate that the axes use to optimize them. In some sense you can think of the axes as a set of basis vectors that will continually adjust themselves to better represent the data. Recommended values are around 1e-3 during training. This should be set to 0 or omitted during inference or the model will be updated based on partial inference data. This is important to include during training in order to get the best results.

  • normalize_axes: bool, default True

    Set this to False in order to not enforce the unitarity of the axes vectors.