Merged
Conversation
See PR #589 for info on each patch
- moved and renamed isolated examples - tidied example-related CMakeLists.txt - updated example-related doc - added dynamics example - updated min_example to be C/C++ agnostic - change compile workflow to run Windows first (since MSVC is the most pedantic compiler of those tested so should run and fail soonest)
Erich (build): - adjusted install interface paths to use CMAKE_INSTALL_INCLUDEDIR - added platform-agnostic RPATH handling via helper function setup_quest_rpath - set RPATH origin for dynamic linking - passed QuEST version info to CMake Tyson (CI): - run compiled examples to test for link-time errors - temporarily disabled LCOV reporting to PRs --------- Co-authored-by: Tyson Jones <tyson.jones.input@gmail.com>
so that external contributors (and importantly right now, example PRs) can contribute new, self-contained unit test code without needing to incorporate new headers
This resolves the issues highlighted in #611 while maintaining QuEST's header include structure in the source
including - removing references to defunct `invalidQuESTInputError` - essential doc needed to disambiguate function conventions (like relationship between function parameters and effected operation phases) - renamed Doxygen keyword `@equivalent` to `@equivalences` - ... `@notvalidated` to `@notyetvalidated` - ... `@notdoced` to `@notyetdoced` - ... `@nottested` to `@notyettested` - changed some `@cpponly` functions into new `@cppvectoroverload`, and then hid the latter - added links from doc to the example PR - linked `C++`-overload doc to corresponding `C` function (using `@see`)
Since `bitValue` is an `int`, the expression `bitValue << bitIndex` can overflow when `bitIndex` equals/exceeds 32. This is solved by casting `bitValue` into a `qindex` before shifting. (Tyson updated authorlists)
This required editing the source to exclude designated initialisers which are not supported in C++17 except through compiler extensions. Such extensions are enabled by default in Clang and GCC but require explicit enabling in e.g. MSVC. We've here made the decision to widen default-compiler support by making struct initialisation a little uglier.
When the passed PauliStr is identity and no control qubits are imposed, the function merely effects a change in global phase. For density matrices, this induces no change at all; the two constituent operations upon the Choi vector cancel one-another, wasting time and numerical accuracy. So, we abort in that scenario. This is truly an insignificant runtime and accuracy optimisation, and this scenario is superfluously handled mostly to document the validity of the scenario (i.e. the use of gadgets to effect arbitrary phase changes)
Now, all standalone C and C++ files in the 'isolated' and 'automated' subdirectories of 'examples' will be executed by the compiler Github Action. The former is to just catch/log interface issues not reflected by the unit tests, while the latter empowers external contributors to include casual test code with their PRs which will be run cross-platform, cross-compiler and cross-precision. This is a much easier alternative to users attempting to include unit tests in their PRs, and has been setup in preparation for unitaryHACK 2025. Also documented each examples subdir
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.