def _run_algorithm_from_json(params, output_file):
    """Runs the Aqua Chemistry experiment from Qiskit Aqua json dictionary

    Args:
        params (dictionary): Qiskit Aqua json dictionary
        output_file (filename): Output file name to save results
    """
    from qiskit.aqua import run_algorithm
    from qiskit.aqua.utils import convert_json_to_dict
    ret = run_algorithm(params, None, True)
    if output_file is not None:
        with open(output_file, 'w') as run_output:
            print('{}'.format(ret), file=run_output)
    else:
        convert_json_to_dict(ret)
        print(
            """

--------------------------------- R E S U L T ------------------------------------
"""
            )
        if isinstance(ret, dict):
            for k, v in ret.items():
                print("'{}': {}".format(k, v))
        else:
            print(ret)
