QuantumToolbox.jl
QuantumToolbox.jl copied to clipboard
Improve code quality tests
Checklist
Thank you for contributing to QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.
- [x] Please read Contributing to QuantumToolbox.jl.
- [x] Any code changes were done in a way that does not break public API.
- [x] Appropriate tests were added and tested locally by running:
make test. - [x] Any code changes should be
juliaformatted by running:make format. - [x] All documents (in
docs/folder) related to code changes were updated and able to build locally by running:make docs. - [ ] (If necessary) the
CHANGELOG.mdshould be updated (regarding to the code changes) and built by running:make changelog.
Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.
Description
Improve the code quality tests using the specific functions of JET.jl, like @test_opt. Moreover, I added some helper functions, in order to repeat the system initialization in all the tests. This would reduce the quantity of the written code and should make it much easier to manage in the future.