Menu

#121 Bundle states and representations

0.3.2
done
nobody
None
nobody
2020-11-08
2018-02-10
Ulf Lorenz
No

In many contexts, you have to supply a state and the representation it is tied to, for example the various RepresentationUtilities functions (e.g., normalization). This is a must because these functions hide the differences between wavefunctions and density operators, so they need to know what they are getting.

Originally, I did not want to bundle states with their representations, because it may be slow, and because it makes non-standard manipulations more cumbersome (when playing around with multiple similar representations, for example). However, I am not sure about the performance penalty, and I find myself even in testing situations not doing the advanced manipulations I was originally thinking about. So probably the convenience trumps here.

Also, when the state and representation are combined in some structure, we have a natural place to combine some further functionality, for example: is the state valid? Do we have a density operator or wavefunction? etc.

In any case, before starting this issue, benchmark the performance penalty with a test setup!

Other functionality that would be well-placed with such a state structure:

  • hide the CTensor if we want that (external library, exposing of detailed internal data even if the user does not want it)
  • simpler setup of vectors of states
  • create an OperatorPrimitive from a density matrix
  • create the adjoint density for a given (non-Hermitian) state
  • the state could also hold information about which representation (DVR, FBR, weighted DVR) we are currently in. This in turn can be used by actions to reject pointless operations (such as a DvrToFbr transformation on an FBR state)

  • slowdown for Chebychev solvers up to 15% for small 1D systems; negligible (~3%) for larger systems (2D)
  • similar speed_up_ due to optimization for ODE solvers
  • modernized Interferometry demo along the way; looks much neater now.
  • removed MolVibration/OH3 from build, since the demo does not work properly anyway.

Related

Tickets: #200
Tickets: #60
Tickets: #93

Discussion

  • Ulf Lorenz

    Ulf Lorenz - 2018-12-24
    • Milestone: 0.3 goal --> Backlog
     
  • Ulf Lorenz

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

    Diff:

    --- old
    +++ new
    @@ -7,4 +7,3 @@
     * simpler setup of vectors of states
     * create an OperatorPrimitive from a density matrix
     * create the adjoint density for a given (non-Hermitian) state
    -* create standard densities, e.g., unit density for arbitrary representations.
    
     
  • Ulf Lorenz

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

    Diff:

    --- old
    +++ new
    @@ -7,3 +7,4 @@
     * simpler setup of vectors of states
     * create an OperatorPrimitive from a density matrix
     * create the adjoint density for a given (non-Hermitian) state
    +* the state could also hold information about which representation (DVR, FBR, weighted DVR) we are currently in. This in turn can be used by actions to reject pointless operations (such as a DvrToFbr transformation on an FBR state)
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-05-21
    • summary: Bundle Wavefunction functionality --> Add a state class or otherwise hide data and dependencies
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-07-25
    • summary: Add a state class or otherwise hide data and dependencies --> Bundle states and representations
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,8 +1,13 @@
    -There is various functionality that centers around dealing with wave functions and density operators in a convenient way. Consider either introducing a State class (specializations would be density operators and wave functions or so) or e.g. a namespace that bundles all this functionality in a coherent way.
    +In many contexts, you have to supply a state and the representation it is tied to, for example the various RepresentationUtilities functions (e.g., normalization). This is a must because these functions hide the differences between wavefunctions and density operators, so they need to know what they are getting.
    
    -Functionality that may be useful:
    +Originally, I did not want to bundle states with their representations, because it may be slow, and because it makes non-standard manipulations more cumbersome (when playing around with multiple similar representations, for example). However, I am not sure about the performance penalty, and I find myself even in testing situations not doing the advanced manipulations I was originally thinking about. So probably the convenience trumps here.
    
    -* expectation values (currently part of the manipulator, does not really fit there; overlap with [#93])
    +Also, when the state and representation are combined in some structure, we have a natural place to combine some further functionality, for example: is the state valid? Do we have a density operator or wavefunction? etc.
    +
    +In any case, before starting this issue, benchmark the performance penalty with a test setup!
    +
    +Other functionality that would be well-placed with such a state structure:
    +
     * hide the CTensor if we want that (external library, exposing of detailed internal data even if the user does not want it)
     * simpler setup of vectors of states
     * create an OperatorPrimitive from a density matrix
    
    • Milestone: Backlog --> 0.4 goal
     

    Related

    Tickets: #93

  • Ulf Lorenz

    Ulf Lorenz - 2020-07-31
    • Milestone: 0.4 goal --> 0.3.2
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-10-05
    • status: open --> assigned
    • assigned_to: Ulf Lorenz
     
  • Ulf Lorenz

    Ulf Lorenz - 2020-11-08
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -13,3 +13,10 @@
     * create an OperatorPrimitive from a density matrix
     * create the adjoint density for a given (non-Hermitian) state
     * the state could also hold information about which representation (DVR, FBR, weighted DVR) we are currently in. This in turn can be used by actions to reject pointless operations (such as a DvrToFbr transformation on an FBR state)
    +
    +----
    +
    +* slowdown for Chebychev solvers up to 15% for small 1D systems; negligible (~3%) for larger systems (2D)
    +* similar speed_up_ due to optimization for ODE solvers
    +* modernized Interferometry demo along the way; looks much neater now.
    +* removed MolVibration/OH3 from build, since the demo does not work properly anyway.
    
    • 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.