Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File import / export for Dynamics and Process Tensors #14

Closed
gefux opened this issue Jul 18, 2021 · 4 comments
Closed

File import / export for Dynamics and Process Tensors #14

gefux opened this issue Jul 18, 2021 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request testing Test cases are needed

Comments

@gefux
Copy link
Member

gefux commented Jul 18, 2021

The current method to import and export Dynamics and Process Tensors using pickle is not ideal.
I suggest to use the .hdf5 file format instead, this allows:

  • portability to other languages (C++, Julia, Wolfram,... )
  • to save memory in the exporting process (.pickle needs to copy the entire object before writing to disc)
  • to only have the parts in memory that are actually needed at one point in time in a computation.

A (really) minor draw back: The types in the .description_dict property will need to be restricted to data types compatible with HDF5

@gefux gefux added the enhancement New feature or request label Jul 18, 2021
@gefux gefux self-assigned this Jul 18, 2021
@gefux
Copy link
Member Author

gefux commented Jul 18, 2021

While I am at it: I will also reorganise the ProcessTensor classes a bit and create a BaseProcessTensor class to allow many different inherited ProcessTensor classes (a "regular" version and a "saving memory version" version where the data is primarily on file on only the requested part of the ProcessTensor gets loaded into memory, etc.)

@gefux
Copy link
Member Author

gefux commented Jul 20, 2021

Pull request #15 did most of the job (documentation and new tests are still missing).
Because it contains several breaking changes, I've merged it into a version 0.2 development branch.

@gefux
Copy link
Member Author

gefux commented Nov 16, 2021

The new process tensors (including import/export to .hdf5 files) is now on the OQuPy-dev branch. To keep it simple I've decided against a separate file format for Dynamics objects. Saving dynamics should be done by simply saving the .times and the .states in a file format of your choice.

ToDo:

  1. testing of process_tensor.py
  2. docstrings in process_tensors.py
  3. write examples for import & export of process tensors

@gefux gefux added documentation Improvements or additions to documentation testing Test cases are needed labels Nov 16, 2021
@gefux
Copy link
Member Author

gefux commented Jan 27, 2024

As import and export of process tensors is implemented I close this issue and create a followup issue for testing and documentation: #103

@gefux gefux closed this as completed Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request testing Test cases are needed
Projects
None yet
Development

No branches or pull requests

1 participant