Refactor QuantumSystem and OpenQuantumSystem constructors #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important updates to the documentation and codebase, primarily to standardize the interface for constructing quantum systems, clarify documentation, and improve usability for new users. The main changes include requiring explicit specification of
T_maxanddrive_boundswhen constructing quantum systems, updating documentation and examples to reflect this, adding a new quickstart guide, and simplifying thedirect_sumlogic for combining systems.Documentation and Usability Improvements:
quickstart.jlguide to help new users install and use the package, including examples for creating quantum systems, simulating evolution, and plotting results.T_max(maximum time) anddrive_bounds(control bounds) when constructingQuantumSystemand related types, ensuring consistency and clarity for users [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13].docs/Project.toml[1] [2] [3].API and Codebase Changes:
direct_sumfunction forQuantumSystemobjects to require explicitT_maxanddrive_bounds, simplifying parameter handling and ensuring the resulting system's controls are well-defined [1] [2].get_driftandget_drivesto use the new explicit control and time interface, improving consistency and future extensibility [1] [2].These changes collectively improve the clarity, reliability, and usability of the package for both new and existing users.
References: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22]This pull request introduces significant improvements to the quantum system API and documentation, standardizing the construction of
QuantumSystemandCompositeQuantumSystemobjects. The main changes require explicit specification of control bounds and maximum time for all quantum systems, refactor the Hamiltonian function signatures to consistently use control vectors and time arguments, and enhance the composite system constructors and documentation. These updates improve clarity, usability, and correctness throughout the codebase and documentation.API Standardization and Refactoring
QuantumSystemandOpenQuantumSystemconstructors now require explicitT_max(maximum time) anddrive_bounds(control bounds) arguments, both in code and documentation examples. This change affects all usages and test cases. [1] [2] [3] [4] [5] [6] [7]H(u, t), whereuis the control vector andtis time, replacing the previousH(a)orH(a, ...)forms. This applies to both code and documentation. [1] [2] [3] [4]Composite System Improvements
CompositeQuantumSystemtype and its constructors are refactored and documented. The new constructors support coupling drift, coupling drives, or both, and require explicitT_maxanddrive_bounds. Documentation now includes clear field descriptions and usage examples. [1] [2] [3] [4]Direct Sum API Update
direct_sumfunction forQuantumSystemobjects is updated to requireT_maxanddrive_bounds, and its documentation is improved with examples. The test suite is updated to match the new constructor requirements. [1] [2] [3]Other Technical Fixes
get_driftandget_drivesare updated to use the new Hamiltonian function signature and control vector conventions. [1] [2]These changes collectively make the quantum system API more robust, explicit, and easier to use for both simple and composite systems.