Skip to content

Commit c71bdc4

Browse files
committed
Fix error in convert_complex_to_dm where array would have complex dtype.
1 parent 590444a commit c71bdc4

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/source/changelog.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Improvements
1616
Bug Fixes
1717
+++++++++
1818

19-
19+
- Fix `convert_complex_to_dm` to properly return arrays with real dtype.
2020

2121
Deprecations
2222
++++++++++++

src/rydiqule/sensor_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def convert_complex_to_dm(complex_dm: np.ndarray) -> np.ndarray:
530530
if np.iscomplexobj(real_dm):
531531
raise RydiquleError('Converted matrix is not real, likely unphysical')
532532

533-
return dm
533+
return real_dm
534534

535535

536536
def check_positive_semi_definite(dm: np.ndarray):

0 commit comments

Comments
 (0)