Skip to content

Commit 7fd7348

Browse files
committed
changed sorting algorithm in simulator from quicksort to mergesort
1 parent d007372 commit 7fd7348

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = qrisp
3-
version = 0.4.1
3+
version = 0.4.2
44
author = Raphael Seidel
55
author_email = raphael.seidel@fokus.fraunhofer.de
66
description = A high-level quantum programming language

src/qrisp/simulator/bi_array_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ def sort_indices_jitted(row, col, data, shape_1):
356356
shifted_row = row << (int(np.log2(shape_1))+1)
357357
sorting_array = shifted_row ^ col
358358

359-
array_sort = np.argsort(sorting_array)
359+
array_sort = np.argsort(sorting_array, kind = "mergesort")
360360

361361
new_row = row[array_sort]
362362
new_col = col[array_sort]

0 commit comments

Comments
 (0)