@staticmethod
def calculate_quality(input_vector, control_params):
    """
        Function for calculating quality.

        Returns:
            float: quality

        Raises:
            AssertionError: If length of `control_params`
                is not equal length of `input_vector`
        """
    assert len(control_params) == len(input_vector)
    quality = 0
    for i in enumerate(control_params):
        quality += (control_params[i[0]] - input_vector[i[0]]) ** 2
    return quality
