Skip to content

Commit

Permalink
Expose krotov.result.Result in top level API
Browse files Browse the repository at this point in the history
Closes #59
  • Loading branch information
goerz committed Nov 26, 2019
1 parent f522b4e commit 1888708
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ History
* Added: Allow to pass `args` to time-dependent control functions (`#56`_, thanks to `@timohillmann`_)
* Changed: Renamed ``krotov.structural_conversions`` to ``krotov.conversions``
* Bugfix: Crash when ``krotov.optimize_pulses`` is called with ``iter_stop=0`` (`#58`_)
* Added: ``krotov.result.Result`` is now exposed at the top level of the API, as ``krotov.Result`` (`#59`_, thanks to `@nathanshammah`_)
* Added: str-representation of ``krotov.result.Result`` now includes the total running time (`#60`_, thanks to `@nathanshammah`_)

0.4.1 (2019-10-11)
Expand Down Expand Up @@ -93,4 +94,5 @@ History
.. _#54: https://github.com/qucontrol/krotov/issues/54
.. _#56: https://github.com/qucontrol/krotov/issues/56
.. _#58: https://github.com/qucontrol/krotov/issues/58
.. _#59: https://github.com/qucontrol/krotov/issues/59
.. _#60: https://github.com/qucontrol/krotov/issues/60
6 changes: 4 additions & 2 deletions src/krotov/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@
# expose primary classes/functions
from .objectives import Objective, ensemble_objectives, gate_objectives
from .optimize import optimize_pulses
from .result import Result


__all__ = [
'optimize_pulses',
'Objective',
'gate_objectives',
'Result',
'ensemble_objectives',
'gate_objectives',
'optimize_pulses',
]
5 changes: 4 additions & 1 deletion src/krotov/result.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""Module defining the :class:`Result` object that is returned by
:func:`.optimize_pulses`.
"""
import datetime
import logging
import pickle
Expand All @@ -12,7 +15,7 @@


class Result:
"""Result object for a Krotov optimization
"""Result of a Krotov optimization with :func:`.optimize_pulses`.
Attributes:
objectives (list[Objective]): The control objectives
Expand Down

0 comments on commit 1888708

Please sign in to comment.