I have a Do loop where I generate quantum state equations <111||111>,<111||112>...<232||232>. This is 144 equations in total but I want both bra and kets to be seen as the same so that for example <121||111> is the same as <111||121> and only one of these is generated namely the <111||121> state. This would mean that when we move from <111| to the <112| bra we go straight to <112||112> rather than <112||111> so this would be 78 equations in total.
Here is the code for it is using the Quantum Notation Package I will also attach a screenshot of the code and some of its output for further clarity.
Do[Print[\!\(\*
TagBox[
RowBox[{"\[LeftAngleBracket]",
TagBox[
RowBox[{
SubscriptBox["x",
OverscriptBox["L", "^"]], ",",
SubscriptBox["y",
OverscriptBox["M", "^"]], ",",
SubscriptBox["z",
OverscriptBox["R", "^"]]}],
Quantum`Notation`zz080BraArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[VerticalSeparator]"}],
Quantum`Notation`zz080Bra,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\) \!\(\*
TagBox[
RowBox[{"\[VerticalSeparator]",
TagBox[
RowBox[{
SubscriptBox["i",
OverscriptBox["L", "^"]], ",",
SubscriptBox["j",
OverscriptBox["M", "^"]], ",",
SubscriptBox["k",
OverscriptBox["R", "^"]]}],
Quantum`Notation`zz080KetArgs,
BaseStyle->{ShowSyntaxStyles -> True},
Editable->True,
Selectable->True], "\[RightAngleBracket]"}],
Quantum`Notation`zz080Ket,
BaseStyle->{ShowSyntaxStyles -> False},
Editable->False,
Selectable->False]\), {i, 1, 2}, {j, 1, 3}, {k, 1, 2}, {x, 1, 2}, {y,
1, 3}, {z, 1, 2}], {i, 2}, {j, 3}, {k, 2}, {x, 2}, {y, 3}, {z, 2}]
Subsets
somehow... $\endgroup$Subsets
won't give you the "squared" pairings, though. So you'd have to do something likeJoin[Subsets[states,{2}],Thread[{states,states}]]
$\endgroup$