Skip to content

Instantly share code, notes, and snippets.

View lucainnocenti's full-sized avatar

Luca Innocenti lucainnocenti

  • University of Palermo
  • Palermo
View GitHub Profile
generatePair[pauliIndices_List, tuple_List] := {
BitXor[
ReplaceAll[
pauliIndices, {3 -> 0, 2 -> 1}
],
tuple
],
(-1)^Total@tuple[[Flatten@Position[pauliIndices, 2 | 3]]]
};
@lucainnocenti
lucainnocenti / scramblingDynamics.m
Last active July 28, 2022 09:40
Examples of scrambling (cit) dynamics
(* this one gives maximally negative tripartite *)
superScrambling2qutritsUnitary := Table[
Normal @ Flatten @ KroneckerProduct[
SparseArray[{Mod[i + j, 3] + 1 -> 1}, 3],
SparseArray[{Mod[i - j, 3] + 1 -> 1}, 3]
],
{i, {0, 1, 2}}, {j, {0, 1, 2}}
] // ArrayReshape[#, {9, 9}] & // Transpose;
(* unitary changing local bases to Fourier bases *)