Skip to content

Commit 4711146

Browse files
authored
Add a precision enum to kraus_op to track the underlying data type (#2551)
* Add precision enum to kraus_op to track the underlying data type Signed-off-by: Thien Nguyen <[email protected]> * Update downstream commit hash incorporating this change Signed-off-by: Thien Nguyen <[email protected]> * Fix docs build: cudaq::real is Doxygen'ed but cudaq::complex::value_type is not Signed-off-by: Thien Nguyen <[email protected]> --------- Signed-off-by: Thien Nguyen <[email protected]>
1 parent bd49915 commit 4711146

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
nvidia-mgpu-repo: cuda-quantum/cuquantum-mgpu.git
2-
nvidia-mgpu-commit: fdea89e034c7ac6b6b3d0e239d8924bcd2c08f96
2+
nvidia-mgpu-commit: 02cb381cb54b0c11de8b8aaa75ccff2fdd0a2e0d

runtime/common/NoiseModel.h

+8
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ struct kraus_op {
4646
/// NOTE we currently assume nRows == nCols
4747
std::size_t nCols = 0;
4848

49+
/// @brief The precision of the underlying data
50+
// This data is populated when a `kraus_op` is created and can be used to
51+
// introspect `kraus_op` objects across library boundary (e.g., when dynamic
52+
// linking is involved).
53+
const cudaq::simulation_precision precision =
54+
std::is_same_v<cudaq::real, float> ? cudaq::simulation_precision::fp32
55+
: cudaq::simulation_precision::fp64;
56+
4957
/// @brief Copy constructor
5058
kraus_op(const kraus_op &) = default;
5159

0 commit comments

Comments
 (0)