Skip to content

Commit

Permalink
Add a precision enum to kraus_op to track the underlying data type (
Browse files Browse the repository at this point in the history
#2551)

* Add precision enum to kraus_op to track the underlying data type

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Update downstream commit hash incorporating this change

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

* Fix docs build: cudaq::real is Doxygen'ed but cudaq::complex::value_type is not

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>

---------

Signed-off-by: Thien Nguyen <thiennguyen@nvidia.com>
  • Loading branch information
1tnguyen authored Jan 28, 2025
1 parent bd49915 commit 4711146
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/config/gitlab_commits.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nvidia-mgpu-repo: cuda-quantum/cuquantum-mgpu.git
nvidia-mgpu-commit: fdea89e034c7ac6b6b3d0e239d8924bcd2c08f96
nvidia-mgpu-commit: 02cb381cb54b0c11de8b8aaa75ccff2fdd0a2e0d
8 changes: 8 additions & 0 deletions runtime/common/NoiseModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ struct kraus_op {
/// NOTE we currently assume nRows == nCols
std::size_t nCols = 0;

/// @brief The precision of the underlying data
// This data is populated when a `kraus_op` is created and can be used to
// introspect `kraus_op` objects across library boundary (e.g., when dynamic
// linking is involved).
const cudaq::simulation_precision precision =
std::is_same_v<cudaq::real, float> ? cudaq::simulation_precision::fp32
: cudaq::simulation_precision::fp64;

/// @brief Copy constructor
kraus_op(const kraus_op &) = default;

Expand Down

0 comments on commit 4711146

Please sign in to comment.