Menu

#130 Python interface basics #2

0.2.3
done
nobody
None
nobody
2018-09-30
2018-08-17
Ulf Lorenz
No

Pybind11 seems to work fine for what we want to do, however, in the original ticket [#117], some things have been left out that should be implemented as prototypes at least. A good target would be the one- or two-dimensional harmonic oscillator demo, done in a somewhat instructive style (not using a harmonic oscillator potential, but building the potential in python). In particular, things that should be done at least as a prototype:

  • handle callback functions (for initial wave function creation, potential building etc.)
    • we need true callbacks for later usage (time-dependent laser fields)
  • try out unit conversion
  • try out class enums
  • try out exception handling

  • callback functions are natively supported by pybind. Works out of the box
  • unit conversions can be circumvented by having special constant variables in python
  • class enums work
  • exception handling works as well through automatic wrapping in python exceptions

Related

Tickets: #117

Discussion

  • Ulf Lorenz

    Ulf Lorenz - 2018-08-18
    • Milestone: 0.3 goal --> 0.2.3
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-01
    • status: open --> assigned
    • assigned_to: Ulf Lorenz
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-06
    • status: assigned --> open
    • assigned_to: Ulf Lorenz --> nobody
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,6 +1,7 @@
     Pybind11 seems to work fine for what we want to do, however, in the original ticket [#117], some things have been left out that should be implemented  as prototypes at least. A good target would be the one- or two-dimensional harmonic oscillator demo, done in a somewhat instructive style (not using a harmonic oscillator potential, but building the potential in python). In particular, things that should be done at least as a prototype:
    
     * handle callback functions (for initial wave function creation, potential building etc.)
    +    * we need true callbacks for later usage (time-dependent laser fields)
     * try out unit conversion
     * try out class enums
     * try out exception handling
    
     

    Related

    Tickets: #117

  • Ulf Lorenz

    Ulf Lorenz - 2018-09-14
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,3 +5,5 @@
     * try out unit conversion
     * try out class enums
     * try out exception handling
    +* installation target, so that wavepacket is immediately available as a python package
    +* fixing the names of the libraries (wavepacket vs. WavePacket is not a good choice)
    
    • status: open --> assigned
    • assigned_to: Ulf Lorenz
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-18
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,5 +5,3 @@
     * try out unit conversion
     * try out class enums
     * try out exception handling
    -* installation target, so that wavepacket is immediately available as a python package
    -* fixing the names of the libraries (wavepacket vs. WavePacket is not a good choice)
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,3 +5,9 @@
     * try out unit conversion
     * try out class enums
     * try out exception handling
    +
    +----
    +* callback functions are natively supported by pybind. Works out of the box
    +* unit conversions can be circumvented by having special constant variables in python
    +* class enums work
    +* exception handling works as well through automatic wrapping in python exceptions
    
     
  • Ulf Lorenz

    Ulf Lorenz - 2018-09-30
    • 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.