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

v3.6.0 #363

Merged
merged 20 commits into from
Aug 7, 2023
Merged

v3.6.0 #363

merged 20 commits into from
Aug 7, 2023

Conversation

TysonRayJones
Copy link
Member

@TysonRayJones TysonRayJones commented Aug 2, 2023

Overview

This release makes QuEST compatible with AMD GPUs 🎉, makes the unit tests compatible with MSVC on Windows, and adds sub-diagonal operators.

New features

  • Compatibility with AMD GPUs, thanks to @bvillasen!
  • SubDiagonalOp; a non-distributed structure representing a diagonal unitary (specified only through the diagonal elements) upon a subset of a qureg's qubits. This can be passed to new functions:
    • createSubDiagonalOp()
    • destroySubDiagonalOp()
    • diagonalUnitary()
    • applySubDiagonalOp()
    • applyGateSubDiagonalOp()
  • Functions for applying gates specified as non-unitary matrices. Specifically:
    • applyGateMatrixN()
    • applyMultiControlledGateMatrixN()
  • setQuregToPauliHamil() for casting a Pauli Hamiltonian into a dense Z-basis matrix, stored in a density matrix Qureg.
  • Phase function SCALED_INVERSE_SHIFTED_WEIGHTED_DISTANCE recognised by applyParamNamedPhaseFunc() (and related functions)

Other changes

  • Unit tests are now compatible with MSVC on Windows, and are automatically ran from Github Actions.
  • Documentation is automatically regenerated whenever the master branch is updated.

Bug fixes

  • math functions used internally (like cos()) now explicitly use quad precision when compiled with PRECISION=4, thanks to @Milos9304
  • fixed overflow and other precision issues in the unit tests, thanks to @rrmeister

TysonRayJones and others added 20 commits May 19, 2022 23:53
This allows derivative projects like QuESTlink which hook into the backend utilities, to invoke this function. This function is needed to pre-prepare a Kraus superoperator before QuEST simulation.
This enables them to be compiled and run natively on Windows.
Serial and multithreading are now working (woo!) but sadly GPU seg-faults when run after a seemingly successful compilation.
tested on:
- serial, multithreaded (on Clang and MSVC)
- GPU-build on Clang
- GPU unit test (GCC)
- distributed up to 16 nodes (wrapping GCC)
In some unit tests, the number of ranks (int) was set to a value
exceeding INT_MAX. This commit caps the number of qubits the tests are
run with to a number (16 or 32) that avoids this.
and accompanying functions:

- createSubDiagonalOp()
- destroySubDiagonalOp()
- diagonalUnitary()
- applySubDiagonalOp()
- applyGateSubDiagonalOp()

A SubDiagonalOp is a non-distributed structure which effects a diagonal unitary (specified only through the diagonal elements) upon any subset of a qureg's qubits.
* added header file with macros for cuda -> hip translation

* Updated CMakeLists.txt to support GPU compilation with HIP

* added brief instructions to build with HIP after the instructions to compile with GPU support.
tested with 1, 16 threads, GPU, 1-2 nodes
in addition to the existing CI build test.

This patch involved accelerating some tests to avoid timeouts, and replicating (in a Catch2 v2 compatible way) the Catch2 patch for this Windows-specific issue:
catchorg/Catch2#2040
@TysonRayJones TysonRayJones merged commit eac4409 into master Aug 7, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants