diff --git a/src/braket/default_simulator/linalg_utils.py b/src/braket/default_simulator/linalg_utils.py index 4ebf1c8a..d2fb9ef6 100644 --- a/src/braket/default_simulator/linalg_utils.py +++ b/src/braket/default_simulator/linalg_utils.py @@ -84,7 +84,7 @@ def _multiply_matrix( # Axes given in `operation.targets` are in the first positions. unused_idxs = [idx for idx in range(len(state.shape)) if idx not in targets] # Invert the permutation to put the indices in the correct place - inverse_permutation = np.argsort([*targets, * unused_idxs]) + inverse_permutation = np.argsort([*targets, *unused_idxs]) return np.transpose(product, inverse_permutation)