import torch


def create_state(model, controller, metric_tracker):
    """
    Create an experiment state dictionary.

    :param model:
    :param controller:
    :param metric_tracker:

    :return: dictionary containing experiment state.
    """
    return {
        "model": model.state_dict(),
        "controller": controller.state_dict(),
        "metric_tracker": metric_tracker,
        "torch_rng_state": torch.random.get_rng_state(),
    }