Skip to content

Commit 58caacb

Browse files
committed
Use static for a logical static
This likely has no actual performance change because LLVM will have been lifting this to a static anyway, but it's still slightly more properly what was intended.
1 parent 73aa0e9 commit 58caacb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/accelerate/src/sparse_pauli_op.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ fn decompose_last_level(
604604
// an individual lookup rule, which is consumed to make an inner "loop" with a declarative macro.
605605
macro_rules! pauli_lookup {
606606
($name:ident, $n:literal, [$head:expr$ (, $($tail:expr),*)?]) => {
607-
const $name: [[bool; $n]; 1<<$n] = pauli_lookup!(@acc, [$($($tail),*)?], [[false], [true]]);
607+
static $name: [[bool; $n]; 1<<$n] = pauli_lookup!(@acc, [$($($tail),*)?], [[false], [true]]);
608608
};
609609
(@acc, [$head:expr $(, $($tail:expr),*)?], [$([$($bools:tt),*]),+]) => {
610610
pauli_lookup!(@acc, [$($($tail),*)?], [$([$($bools),*, false]),+, $([$($bools),*, true]),+])

0 commit comments

Comments
 (0)