Skip to content

Commit

Permalink
changed sorting algorithm in simulator from quicksort to mergesort
Browse files Browse the repository at this point in the history
  • Loading branch information
positr0nium committed Jan 30, 2024
1 parent d007372 commit 7fd7348
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = qrisp
version = 0.4.1
version = 0.4.2
author = Raphael Seidel
author_email = [email protected]
description = A high-level quantum programming language
Expand Down
2 changes: 1 addition & 1 deletion src/qrisp/simulator/bi_array_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def sort_indices_jitted(row, col, data, shape_1):
shifted_row = row << (int(np.log2(shape_1))+1)
sorting_array = shifted_row ^ col

array_sort = np.argsort(sorting_array)
array_sort = np.argsort(sorting_array, kind = "mergesort")

new_row = row[array_sort]
new_col = col[array_sort]
Expand Down

0 comments on commit 7fd7348

Please sign in to comment.