Conversation
…using both iTEBD and OQuPy
…sor in OQuPy + testing
…of time dependent Hamiltonian to iTEBD-example
… to init from get_mpo.
Modified example to use this capability.
… used with the bath_dynamics.ipynb code.
…tions of dynamics without gradients.
|
Hi @emile-cochin! Thank you for submitting this pull request and sorry for the delayed reply. Because several of the changes that need to be made are of a type that is easier for me to quickly carry out rather then explain, I'd like to continue my go-over this code myself before we start code review together. I'll get back to you sometime this week. Best -- gefux |
gefux
left a comment
There was a problem hiding this comment.
Hi @emile-cochin. Thank you for this.
I made some comments with suggestions for the core functionality.
Beside this there are a few other topics, which we'll maybe resolve in another round of review later, but I mention here for completness:
- Create coverage test
- Create physics tests
- Create a tutorial
- Fix code style (linter)
- [Optional] some performance testing
| progress = get_progress(None) | ||
| title = "--> TTI-TEMPO building:" | ||
| with progress(self.n_c, title) as prog_bar: | ||
| for k in range(1, self.n_c +1): |
There was a problem hiding this comment.
I think this should be accessible / interuptable by the user. For all computationally heavy calculations we want allow the user checkpointing, i.e. for a memory cutoff of 200 they should be able to save the python object and environment when they have done 100 steps, and then continue.
This is not a high priority, but I think this backend should be restructured such that there is an compute_step() method, that just computes the next step, and the loop (including the progress bar) should be moved into a TTITempo.compute() method.
| aim = np.concatenate((np.flip(self.eta[:n].imag), np.zeros(n))) | ||
| return np.exp(-np.dot(s_diff_path, np.convolve(are, s_diff_path, 'valid')[:n]) - 1j * np.dot(s_diff_path, np.convolve(aim, s_sum_path, 'valid')[:n])) | ||
|
|
||
| def evolve(self, h_s: np.ndarray, rho_0: np.ndarray, n: int) -> np.ndarray: |
There was a problem hiding this comment.
We don't need this method, right?
The TTI process tensor should work smoothly with our compute_dynamics() function.
There was a problem hiding this comment.
Indeed, that method is just left from Link's original code and is not needed/used.
|
|
||
| return rho_t | ||
|
|
||
| def steadystate(self, h_s: np.ndarray) -> np.ndarray: |
There was a problem hiding this comment.
This I would to also like to see outside of the backend as a function compute_steady_state() in system_dynamics.py using a TTI process tensor and a oqupy.System object.
There was a problem hiding this comment.
I agree but perhaps in another pull request? This is another leftover from Link's original code. If we wanted this functionality in OQuPy I agree it should take an oqupy.System object (and account for e.g. the Liouvillian dissipators).
| return self._dt | ||
|
|
||
| @property | ||
| def max_step(self) -> Union[int, float]: |
There was a problem hiding this comment.
I am makeing a comment on the Process Tensor classes in the #155 issue thread.
Summary
Pull request for implementing time-translationally invariant process tensors (TTI-PTs) into OQuPy, as agreed in #155.
Pull Request Check List
This checklist serves as a guide for contributors and maintainers to assess
whether a contribution can be merged into the main branch and thus serves
to guarantee the quality of the package. Please read the
contribution guideline.
Before you submit a pull request, please go through this checklist once
more, as it will decrease the number of unnecessary review cycles.
However, this list is there to help all contributors to produce high
quality code, not to deter you from contributing. If you can't tick some of the
boxes, feel free to submit the pull request anyway and report about it in the
pull request message. Also, some of the boxes might not apply to the specific
type of your contribution.
tox -e py36(to runpytest) the code tests.tox -e style(to runpylint) the code style tests./docs/pages/modules.rsthas been updated./docs/pages/api.rsthas been updated.