From 7fd73486ac02aca70656ba2307c12ec345b532c6 Mon Sep 17 00:00:00 2001 From: positr0nium Date: Tue, 30 Jan 2024 18:20:01 +0100 Subject: [PATCH] changed sorting algorithm in simulator from quicksort to mergesort --- setup.cfg | 2 +- src/qrisp/simulator/bi_array_helper.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.cfg b/setup.cfg index 51976fad..179e4216 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = qrisp -version = 0.4.1 +version = 0.4.2 author = Raphael Seidel author_email = raphael.seidel@fokus.fraunhofer.de description = A high-level quantum programming language diff --git a/src/qrisp/simulator/bi_array_helper.py b/src/qrisp/simulator/bi_array_helper.py index 444229b1..9050f672 100644 --- a/src/qrisp/simulator/bi_array_helper.py +++ b/src/qrisp/simulator/bi_array_helper.py @@ -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]