Menu

#93 Split Manipulator into coherent components

0.3.1
done
nobody
None
nobody
2020-07-25
2017-05-25
Ulf Lorenz
No

The current class Manipulator is a bit of a mix of different responsibilities; also it lives in the util package but somehow depends on everything else, which smells a tiny bit. Its only overarching theme is that it transparently does the correct thing for density operators and wave functions.

The Manipulator class should be split according to the different functionalities.

  • The various transformations between DVR / FBR should go to the representation package, maybe Representation class, maybe some helper class. done as part of [#144]; moved to RepresentationFunctions.hpp
  • adding/removing weights should also be done by free functions (see RepresentationFunctions.hpp)
  • The calculation of expectation values and the norm should be moved to independent functions in the operator package (see also [#121])
  • there should also be a calculation of the standard deviation of an operator.
  • some of the private methods (checking for wavepacket vs. density operator) have already been implemented in the Representation class and could be removed.

Got a bit carried away, and implemented some additional things

  • calculation of norm was bad, because norm means something different for wavefunctions and densities. Instead, split into two different concerns / functions: calculation of trace and normalization of a state
  • added projection onto some subspace (using a projection operator), because this is also different for wave functions and density operators
  • updated the LoggingObserver, which was faulty; it did not consistently normalize states, which would give, e.g., incorrect energies if the state was not normalized (e.g., due to a NIP)

Related

Tickets: #121
Tickets: #144

Discussion

  • Ulf Lorenz

    Ulf Lorenz - 2018-01-23
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,3 +4,4 @@
    
     * The various transformations between representations should go to the representation package, maybe Representation class, maybe some helper class.
     * The calculation of expectation values and the norm should be moved to independent functions in the operator package.
    +* there should also be a calculation of the standard deviation of an operator.
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-02-10
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -3,5 +3,5 @@
     The Manipulator class should be split according to the different functionalities.
    
     * The various transformations between representations should go to the representation package, maybe Representation class, maybe some helper class.
    -* The calculation of expectation values and the norm should be moved to independent functions in the operator package.
    +* The calculation of expectation values and the norm should be moved to independent functions in the operator package (see also [#121])
     * there should also be a calculation of the standard deviation of an operator.
    
     

    Related

    Tickets: #121

  • Ulf Lorenz

    Ulf Lorenz - 2019-09-02
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,3 +5,4 @@
     * The various transformations between representations should go to the representation package, maybe Representation class, maybe some helper class.
     * The calculation of expectation values and the norm should be moved to independent functions in the operator package (see also [#121])
     * there should also be a calculation of the standard deviation of an operator.
    +* some of the private methods (checking for wavepacket vs. density operator) have already been implemented in the Representation class and could be removed.
    
     

    Related

    Tickets: #121

  • Ulf Lorenz

    Ulf Lorenz - 2020-01-01
    • Milestone: Backlog --> 0.4 goal
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-05-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,7 +2,7 @@
    
     The Manipulator class should be split according to the different functionalities.
    
    -* The various transformations between representations should go to the representation package, maybe Representation class, maybe some helper class.
    +* <s>The various transformations between representations should go to the representation package, maybe Representation class, maybe some helper class.</s> done as part of [#144]; moved to RepresentationFunctions.h
     * The calculation of expectation values and the norm should be moved to independent functions in the operator package (see also [#121])
     * there should also be a calculation of the standard deviation of an operator.
     * some of the private methods (checking for wavepacket vs. density operator) have already been implemented in the Representation class and could be removed.
    
     

    Related

    Tickets: #121
    Tickets: #144

  • Ulf Lorenz

    Ulf Lorenz - 2020-05-21
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -2,7 +2,8 @@
    
     The Manipulator class should be split according to the different functionalities.
    
    -* <s>The various transformations between representations should go to the representation package, maybe Representation class, maybe some helper class.</s> done as part of [#144]; moved to RepresentationFunctions.h
    +* <s>The various transformations between DVR / FBR should go to the representation package, maybe Representation class, maybe some helper class.</s> done as part of [#144]; moved to RepresentationFunctions.hpp
    +* adding/removing weights should also be done by free functions (see RepresentationFunctions.hpp)
     * The calculation of expectation values and the norm should be moved to independent functions in the operator package (see also [#121])
     * there should also be a calculation of the standard deviation of an operator.
     * some of the private methods (checking for wavepacket vs. density operator) have already been implemented in the Representation class and could be removed.
    
     

    Related

    Tickets: #121
    Tickets: #144

  • Ulf Lorenz

    Ulf Lorenz - 2020-06-23
    • status: open --> assigned
    • assigned_to: Ulf Lorenz
    • Milestone: 0.4 goal --> 0.3.1
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-07-25
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -7,3 +7,11 @@
     * The calculation of expectation values and the norm should be moved to independent functions in the operator package (see also [#121])
     * there should also be a calculation of the standard deviation of an operator.
     * some of the private methods (checking for wavepacket vs. density operator) have already been implemented in the Representation class and could be removed.
    +
    +----
    +
    +Got a bit carried away, and implemented some additional things
    +
    +* calculation of norm was bad, because norm means something different for wavefunctions and densities. Instead, split into two different concerns / functions: calculation of trace and normalization of a state
    +* added projection onto some subspace (using a projection operator), because this is also different for wave functions and density operators
    +* updated the LoggingObserver, which was faulty; it did not consistently normalize results, which would give, e.g., incorrect energies if the state was not normalized (e.g., due to a NIP)
    
     

    Related

    Tickets: #121

  • Ulf Lorenz

    Ulf Lorenz - 2020-07-25
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -14,4 +14,4 @@
    
     * calculation of norm was bad, because norm means something different for wavefunctions and densities. Instead, split into two different concerns / functions: calculation of trace and normalization of a state
     * added projection onto some subspace (using a projection operator), because this is also different for wave functions and density operators
    -* updated the LoggingObserver, which was faulty; it did not consistently normalize results, which would give, e.g., incorrect energies if the state was not normalized (e.g., due to a NIP)
    +* updated the LoggingObserver, which was faulty; it did not consistently normalize states, which would give, e.g., incorrect energies if the state was not normalized (e.g., due to a NIP)
    
    • status: assigned --> done
    • assigned_to: Ulf Lorenz --> nobody
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.