Thursday, July 21, 2022

Giving the Playground Express a Spin

 The latest addition to our single chip computer zoo is Adafruit's Circuit Playground Express. It is sold for about 30$ and comes with a lot of GIO pins, 10 RGB LEDs, a small speaker, lots of sensors (including acceleration, temperature, IR,...) and 1.5MB of flash rom. The excuse for buying it is that I might interest the kids in it (being better equipped on board than an Arduino while being less complex than a RaspberryPi.


As the ten LEDs are arranged around the circular shape, I thought a natural idea for a first project using the accelerometer would be to simulate a ball going around the circumference.



The video does not really capture the visual impression due to overexposure of the lit LEDs.

The Circuit Playground Express comes with a graphical programming language (like Scratch) and an embedded version of Python. But you can also directly program it with the Arduino IDE to code in C which I used since this is what I am familiar with.

Here is the source code (as always with GPL 2.0)
// A first project simulating a ball rolling around the Playground Express

#include <Adafruit_CircuitPlayground.h>

uint8_t pixeln = 0;
float phi = 0.0;
float phid = 0.10;

void setup() {
  CircuitPlayground.begin();
  CircuitPlayground.speaker.enable(1);
}

int phi2pix(float alpha) {
   alpha *= 180.0 / 3.141459;
   alpha += 60.0;
   if (alpha < 0.0) 
      alpha += 360.0;
    if (alpha > 360.0)
      alpha -= 360.0;
      
    return (int) (alpha/36.0);
}

void loop() {
    static uint8_t lastpix = 0;
    float ax = CircuitPlayground.motionX();
    float ay = CircuitPlayground.motionY();
    phid += 0.001 * (cos(phi) * ay - sin(phi) * ax);
    phi += phid;
    phid *= 0.997;
    Serial.print(phi);

    while (phi < 0.0) 
      phi += 2.0 * 3.14159265;

    while (phi > 2.0 * 3.14159265)
      phi -= 2.0 * 3.14159265;


    pixeln = phi2pix(phi);
 
    if (pixeln != lastpix) {
      if (CircuitPlayground.slideSwitch())
        CircuitPlayground.playTone(2ssseff000, 5);
      lastpix = pixeln;
    }
    CircuitPlayground.clearPixels(); 
    CircuitPlayground.setPixelColor(pixeln, CircuitPlayground.colorWheel(25 * pixeln));
    delay(0);
}

Saturday, July 09, 2022

Voting systems, once more

 Over the last few days, I have been involved in some heated Twitter discussions around a possible reform of the voting system for the German parliament. Those have sharpened my understanding of one or two things and that's why I think it's worthwhile writing a blog post about it.

The root of the problem is that the system currently in use tries to optimise two goals which are not necessarily compatible: Proportional representation (number of seats for a party should be proportional to votes received) and local representation (each constituency being represented by at least one MP). If you only wanted to optimise the first you would not have constituencies but collect all votes in one big bucket and assign seats accordingly to the competing parties, if you only wanted to optimise the second goal you would use a first past the pole (FPTP) voting system like in the UK or the US.

In a nutshell (glancing over some additional complications), the current system is as follows: We start by assuming there are twice as many seats in parliament as there are constituencies. Each voter has two different votes. The first is a FPTP vote that determines a local candidate that will definitely get a seat in parliament. The second vote is the proportional vote that determines the percentage of seats for the parties. The parties will then send further MPs to reach their allocated lot but the winners of the constituencies are counted as well and the parties only "fill up" the remaining seats from their party list. So far so good, you have achieved both goals: There is one winner MP from each constituency and the parties have seats proportional to the number of (second) votes. Great.

Well, except if a party wins more constituencies  than they are assigned seats according to proportional votes. This was not so much of a problem some decades ago when there were two major parties (conservative and social democrat) and one or two smaller ones. The two parties would somehow share the constituency wins but since those make up only half  of the total number of seats those would not be many more than their share to total seats (which would typically be well above 30% or even 40%).

The voting system's solution to this problem is to increase the total number of seats to the minimal total number such that each party's number of won constituencies is at least as high as their shore of total seats according to proportional vote.

But these days, the two former big parties have lost a lot of their support (winning only 20-25% in the last election) and four additional parties being also represented and not getting much less votes than the two former big ones. In the constituencies it is not rare that you win your FPTP seat with less than 30% of the votes in the constituency and it the last election it can be as low as only 18% sufficient to being the winner of a seat. This lead to the parliament having 736 seats as compared to the nominal size of 598 and there were polls not long before that election which suggested 800+ seats or possibly even over 1000.

A particular case is the CSU, the conservative party here in Bavaria (which is nominally a different party from the CDU, which is the conservative party in the rest of Germany. In Bavaria, the CDU is not competing while in the rest of the country, the CSU is not on the ballot): Still being relative winners here, they won all but one constituencies but got only about 30% of the votes in Bavaria which translates to slightly above 5% of all votes in Germany.

According to a general sentiment, 700+ seats is far too big (for a functioning parliament and also cost wise), so the system should be reformed. But people differ on how to reform it. A simple solution mathematically would be to increase the size of the constituencies to decrease their total number. So the total number of constituency winners to be matched by proportional votes would be less. But that solution is not very popular with the main argument being that those constituents would be too big for a reasonable contact of the local MPs to their constituents. Another likely reason nobody really likes to talk about is that by redrawing district lines by a lot would probably cause a lot of infighting in all the parties because the candidatures would have to be completely redistributed with many established candidates losing their job. So that is off the table, after all, it's the parties in parliament which decide about the voting system by simple majority (with boundary conditions set by relatively vague rules set by the constitution).

There is now a proposal by the governing social democrat-green-liberal coalition. The main idea is to weaken the FPTP system in the constituencies maintaining the proportional vote: Winning a constituency no longer guarantees you a seat in parliament. If you party wins more constituencies than their share of total seats according to the proportional votes, those constituency seats where the party's relative majority was the smallest would be allocated to the runner up (as that candidates party still has to be allocated seats according to proportional vote). This breaks FPTP, but keeps the proportional representation as well as the principle of each constituency sending at least one MP while fixing the total number of seats in parliament to the magic 598.

The conservatives in opposition do not like this idea (been traditionally the relatively strongest parties and thus tending to win more constituencies). You can calculate how many seats each party would get assuming the last election's votes: All parties would have to give up about 18% of their seats except for the CSU, the Bavarian conservatives, who would lose about 25% since some fine print I did not explain so far favours parties winning relatively many constituencies directly. 

The conservatives also have a proposal. They are willing to give up proportionality in favour of maintaining FPTP and fixing the number of seats to 598: They propose to assign 299 of the seats according to FPTP to constituency winners and only distributing the remaining 299 seats proportionally. So they don't want to include the constituency winners in the proportional calculation.

This is the starting point of the Twitter discussions. Both sides accusing the other side have an undemocratic proposal. One side says a parliament where the majorities do not necessarily (and with current data) unlikely represent majorities in the population is not democratic while the other side arguing that denying a seat to a candidate that won his/her constituency (even by a small relative majority) being not democratic.

Of course it is a total coincidence that each side is arguing for the system that would be better for them (the governing coalition hurting everybody almost equally only the CSU a bit more while the conservative proposal actually benefitting the conservatives quite a bit while in particular hurting the smaller parties that do not win many constituencies or none at all).

ImageImage

(Ampel being the governing coalition, Union being the conservative parties).

Of course, both proposals are in a mathematical sense "democratic" each in their own logic emphasising different legitimate aspects (accurate proportional representation vs accurate representation of local winners).

Beyond the understandable preference for a system that favours one's own political side I think a more honest discussion would be about which of these legitimate aspects is actually more relevant for the political discourse. If a lot of debates would be along geographic lines, north against south, east against west or even rural vs urban then yes, it is very important that the local entities are as accurately represented as possible to get the outcomes of these debates right. That would emphasise FPTP as making sure local communities are most honestly represented.

If however typical debates are along other fault lines, for example progressive vs conservative or pro business vs pro social wealth redistribution then we should make sure the views of the population are optimally represented. And that would be in favour of a strict proportional representation. 

Guess what I think is actually the case.

All that in addition to a political tradition in which "calling your local MP or representative" is a much less common thing that in anglo-saxon countries and studies showing that even shortly after a general election less than a quarter of the voters being able to name at least two of the names of their constituency's candidates casting serious doubts about an informed decision at the local level rather than along party lines (where parties being only needed to make sure there is only one candidate per party in the FPTP system while being the central entity for proportional votes).

PS: The governing coalition's proposal has some ambiguities as well (as I demonstrate here --- in German).

Monday, January 17, 2022

You got me wordle!

 Since a few days, I am following the hype and play wordle. I think I got lucky the first days but I had already put in some strategy as in starting with words where the possible results are most telling. I was thinking that getting the vowels right early is a good idea so I tend to start with "HOUSE" (continuing three vowels and an S) possibly followed by "FAINT" (containing the remaining vowels plus important N and T).

With this start it never took me more than four guesses so far and twice I managed to find the solution in three guesses.


Of course, over time you start thinking how to optimise this. I knew that Donald Knuth had written a paper solving the original Mastermind showing that five moves are sufficient to always find the answer. So today, I sat down and wrote a perl script to help. It does not do the full minimax (but that shouldn't be too hard from where I am) but at least tells you which of your possible next guesses leaves the best worst case in terms of number of remaining words after knowing the result of your guess. 

In that metric, it turns out "ARISE" is the optional first guess (leaving at most 168 out of the possible 2314 words on this list after knowing the result). In any case, here is the source: 

NB: Since i started playing, there was no word that contained the same letter more than once, so I am not 100% sure how those cases are handled (like what color do the two 'E' in "AGREE" receive if the solution is "AISLE" (in mastermind logic, the second would be green the other grey, not yellow) and what when the solution were "EARLY"? So my script does not handle those cases correct probably (for EARLY it would color both yellow).

#!/usr/local/bin/perl -w

use strict;

# Load the word list of possible answers
my @words = ();
open (IN, "answers.txt") || die "Cannot open answers: $!\n";
while(<IN>) {
  chomp;
  push @words, uc($_);
}
close IN;

my %letters = ();
my @appears = ();

# Positions at which letter $l can still appear
foreach my $c (0..25)  {
  my $l = chr(65 + $c);
  $letters{$l} = [1,1,1,1,1];
}


# Running without an initial guess shows that ARISE is the best guess at it leaves 168 words.

&filter("ARISE", &bewerten("ARISE", "SOLAR"));
#&filter("SMART", &bewerten("SMART", "SOLAR"));

# Find the remaining words
my @remain = @words;
# Only keep words containing the letters in @appeads
foreach my $a(@appears) {
  @remain = grep {/$a/} @remain;
}
my $re = &makeregex;

# Apply positional constraints
@remain = grep {/$re/} @remain;


my $min = @remain;
my $best = '';

# Loop over all possible guesses and targets and count how ofter a potential result appears for a guess
foreach my $g(@remain) {
  my %results = ();
  foreach my $t(@remain) {
    ++$results{&bewerten($g, $t)}
  }
  my $max = 0;
  foreach my $res(keys %results) {
    $max = $results{$res} if $results{$res} > $max;
  }
  #print "$g leaves at most $max.\n";
  if ($min > $max) {
    $min = $max;
    $best = $g;
  }
}

print "Best guess: $best leaves at most $min.\n";

# Assemble a regex for the postional informatiokn
sub makeregex {
  my $rem = '';
  foreach my $p (0..4) {
    $rem .= '[';
    foreach my $l (sort keys %letters) {
      $rem .= $l if $letters{$l}->[$p];
    }
    $rem .= ']';
  }
  return $rem;
}

# Find new constraints arising from the result of a guess
sub filter {
  my ($guess, $result) = @_;

  my @a = split //, $result;
  my @w = split //, uc($guess);
  foreach my $p (0..4) {
    my $l = $w[$p];
    if ($a[$p] == 0) {
      $letters{$l} = [0,0,0,0,0];
    } elsif ($a[$p] == 1) {
      &setletter($l, $p, 0);
      push @appears, $l;
    } else {
      foreach my $o (sort keys %letters) {
	&setletter($o, $p, 0);
      }
      &setletter($l, $p, 1);
    }
  }
}

# Update the positional information for letter $l at position $p with value $v
sub setletter {
  my ($l, $p, $v) = @_;
  my @a = @{$letters{$l}};
  $a[$p] = $v;
  $letters{$l} = \@a;
}

# Find the result for $guess given the $target
sub bewerten {
  my ($guess, $target) = @_;
  my @g = split //, $guess;
  my @t = split //, $target;

  my @result = (0,0,0,0,0);
  foreach my $p(0..4) {
    if($g[$p] eq $t[$p]) {
      $result[$p] = 2;
      $t[$p] = '';
      $g[$p] = 'x';
    }
  }
  $target = join('', @t);
  foreach my $p(0..4) {
    if($target =~ /$g[$p]/) {
      $result[$p] = 1;
    }
  }
  return join('', @result);
}

Friday, July 23, 2021

Email is broken --- the spammers won

 I am an old man. I am convinced email a superior medium for person to person information exchange. It is text based, so you don't need special hardware to use it, it can still transport various media formats and it is inter-operational, you are not tied to one company offering a service but thanks to a long list of RFCs starting with number 822 everybody can run their own service.  Via GPG or S/MIME you can even add somewhat decent encryption and authentication (at least for the body of the message) even though that is not optimal since historically it came later.

But the real advantage is on the client side: You have threading, you have the option to have folders to store your emails, you can search through them, you can set up filters so routine stuff does not clog up your inbox. And when things go really pear shaped (as they tend to do every few years), you can still recover your data from a text file on your hard drive.

This is all opposed to the continuous Now of messengers where already yesterday's message has scrolled up never to be seen again. But the young folks tend to prefer those and I cannot see any reason those would be preferable (except maybe that you get notifications on your phone). But up to now, it was still an option to say to our students "if you want to get all relevant information, check your email, it will be there".

But today, I think, this is finally over. The spammers won.

Over the last months of the pandemic, I already had to realise, mailing lists are harder and harder to use. As far as I can tell, nobody offers decent mailing lists on the net (at least without too much cost and with reasonable data protection ambitions), probably because those would immediately be used by spammers. So you have to run your own. For the families of our kid's classes at school and for daycare, to spread information that could no longer be posted on physical notice boards, I tried to set up lists on mailman like we used to do it on one of my hosted servers. Oh, what a pain. There are so many hoops you have to jump through so the messages actually end up in people's inboxes. For some major email providers (I am looking at you hosteurope) there is little chance unless the message's sender is in the recipient's address book for example. And yes, I have set up my server correctly, with reverse DNS etc working.

But now, it's application season again. We have received over 250 applications for the TMP master program and now I have to inform applicants about their results. The boundary conditions is that I want to send an individual mail to everybody  that contains their name and I want to digitally sign it so applicants know it is authentic and not sent by some prankster impersonating me (that had happened in the past, seriously). And I don't want to send those manually.

So I have a perl script (did I mention I am old), that reads the applicants' data from a database, composes the message with the appropriate template, applies a GPG signature and sends it off to the next SMTP server.

In the past, I had already learned that inside the university network, you have to sleep 10 seconds after each message as every computer that sends emails at a higher rate is considered taken over by some spammers and automatically disconnected from the network for 30 minutes.

This year, I am sending from the home office and as it turns out, some of my messages never make it to the recipients. There is of course no error message to me (thanks spammers) but the message seems to be silently dropped. It's not in the inbox and also cannot be found in the spam folder. Just gone.

I will send paper letters as well (those are required for legal reasons anyway) with a similar script and thanks to TeX being text based on the input side. But is this really the answer for 2021? How am I supposed to inform people I have not (yet) met from around the world in a reliable way? 

I am lost.

Friday, June 25, 2021

On Choice

 This is a follow-up to a Twitter discussion with John Baez that did not fit into the 260 character limit. And before starting, I should warn you that I have never studied set theory in any seriousness and everything I am about to write here is only based on hearsay and is probably wrong.

I am currently teaching "Mathematical Statistical Physics" once more, large part of which is to explain the operator algebraic approach to quantum statistical physics, KMS states and all that. Part of this is that I cover states as continuous linear functionals on the observables (positive and normalised) and in the example of B(H), the bounded linear operators on a Hilbert space H, I mention that trace class operators $$\rho\in {\cal S}^1({\cal H})$$ give rise to those via $$\omega(a) = {\hbox tr}(\rho a).$$

And "pretty much all" states arise in this way meaning that the bounded operators are the (topological) dual to trance class operators but, for infinite dimensional H, not the other way around as the bi-dual is larger. There are bounded linear functionals on B(H) that don't come from trace class operators. But (without too much effort), I have never seen one of those extra states being "presented". I have very low standards here for "presented" meaning that I suspect you need to invoke the axiom of choice to produce them (and this is also what John said) and for class this would be sufficient. We invoke choice in other places as well, like (via Hahn-Banach) every C*-algebra having faithful representations (or realising it as a closed Subalgebra of some huge B(H)).

So much for background. I wanted to tell you about my attitude towards choice. When I was a student, I never had any doubt about it. Sure, every vector space has a basis, there are sets that are not Lebesque measurable. A little abstract, but who cares. It was a blog post by Terrence Tao that made me reconsider that (turns out, I cannot find that post anymore, bummer). It goes like this: On one of these islands, there is this prison where it is announced to the prisoners that the following morning, they are all placed in a row and everybody is given a hat that is either black or white. No prisoner can see his own hat but all of those in front of him. They can guess their color (and all other prisoners hear the guess). Those who guess right get free while those who guess wrong get executed. How many can go free?

Think about it.

The answer is: All but one half. The last one says white if he sees an even number of white hats in front of him. Then all the others can deduce their color from this parity plus the answers of the other prisoners behind them. So all but the last prisoner get out and the last has a 50% chance.

But that was too easy. Now, this is a really big prison and there are countably infinitely many prisoners. How many go free? When they are placed in a row, the row extends to infinity only in one direction and they are looking in this infinite direction. The last prisoner sees all the other prisoners.

Think about it.

In this case, the answer is: Almost all, all but finitely many. Out of all infinite sequences of black/white form equivalence classes where two sequences are equivalent if they differ at at most finitely many places, you could say they are asymptotically equal. Out of these equivalence classes, the axiom of choice allows us to pick one representative of each. The prisoners memorise these representatives (there are only aleph1 many, they have big brains). The next morning in the court of the prison, all prisoners can see almost all other prisoners, so they know which equivalence class of sequences was chosen by the prison's director. Now, every prisoner announces the color of the memorised representative at his position and by construction, only finitely many are wrong.

This argument as raised some doubts in me if I really want choice to be true. I came to terms with it and would describe my position as agnostic. I mainly try to avoid it and better not rely too much on constructions that invoke it. And for my physics applications this is usually fine.

But it can also be useful in everyday's life: My favourite example of it is in the context of distributions. Those are, as you know, continuous linear functionals on test functions. The topology on the test functions, however, is a bit inconvenient, as you have to check all (infinitely many) partial derivates to converge. So you might try to do the opposite thing: Let's study a linear functional on test functions that is not continuous. Turns out, those are harder to get hold of than you might think: You might think this is like linear operators where continuity is equivalent to boundedness. But this case is different: You need to invoke choice to find one. But this is good, since this implies that every concrete linear functional that you can construct (write down explicitly) is automatically continuous, you don't have to prove anything!

This type of argument is a little dangerous: You really need more than "the usual way to get one is to invoke choice". You really need that it is equivalent to choice. And choice says that for every collection of sets, the Cartesian product is non-empty. It is the "every" that is important. The collection that consists of copies of the set {apple} trivially has an element in the Cartesian product, it is (apple, apple, apple, ...). And this element is concrete, I just constructed it for you.

This caveat is a bit reminiscent of a false argument that you can read far too often: You show that some class of problems is NP-complete (recent incarnations: deciding if an isolated string theory vacuum as a small cosmological constant, deciding if a spin-chain model is gapped, determining the phase structure of some spin chain model, ...) and then arguing that these problems are "hard to solve". But this does not imply that a concrete problem in this class is difficult. It is only that solving all problems in this class of problems is difficult. Every single instance of practical relevance could be easy (for example because you had additional information that trivialises the problem). It could well be that you are only interested in spin chain Hamiltonians of some specific form and that you can find a proof that all of them are gapped (or not gapped for that matter). It only means that your original class of problems was too big, it contained too many problems that don't have relevance in your case. This could for example well be for the string theory vacua: In the paper I have in mind, that was modelled (of course actually fixing all moduli and computing the value of the potential in all vacua cannot be done with today's technology) by saying there are N moduli fields and each can have at least two values with different values of its potential (positive or negative) and we assume you simply have to add all those values. Is there one choice of the values of all moduli fields such that the sum of the energies is epsilon-close to 0? This turns out to be equivalent to the knapsack-problem which is known to be NP-complete. But for this you need to allow for all possible values of the potential for the individual moduli. If, for example, you knew the values for all moduli are the same, that particular incarnation of the problem is trivial. So just knowing that the concrete problem you are interested in is a member of a class of problems that is NP-complete does not make that concrete problem hard by itself.

What is you attitude towards choice? When is the argument "Here is a concrete, constructed example of a thing x. I am interested in some property P of it. To show there are y that don't have property P, I need to invoke choice. Does this prove x has property P?" to be believed?

Friday, July 10, 2020

Locality Confusion or: What Entanglement Can and Cannot Do For You

I really enjoyed last week's Zoom edition of the annual Strings conference. Clifford has said many of the things about it that I support wholeheartedly, so I don't have to repeat them here. One of the things I really liked was the active participation in the chat channel that accompanied the talks.

But some of the things I read there gave me the impression that there is some confusion out there about locality and things that can happen in quantum theories that showed up in discussions related to black hole information loss (or the lack thereof). So I though, maybe it's a good idea to sort these out.

Let's start with some basic quantum information: Entanglement is strange, it allows you to do things that maybe at first you did not expect. You can already see this in the easy, finite dimensional situation. Assume our Hilbert space is a tensor product
\[H=H_h\otimes H_t\]
of stuff here and stuff there. Further, for simplicity, assume both factors have dimension d and we can pick a basis
\[(e_\alpha)_{1\le \alpha\le d}\]

for both. If we have a maximally entangled state like
\[\Omega = \frac 1{\sqrt d} \sum_\alpha e_\alpha\otimes e_\alpha\]
the first observation is that instead of acting with an operator A here, you can as well act with the transposed (with respect to our basis) operator there, as you can see when writing out what it means in component:
\[(A\otimes id)\Omega = (id\otimes A^T)\Omega = \frac 1{\sqrt d}\sum_{\alpha\beta} a_{\alpha\beta} e_\beta\otimes e_\alpha.\]
That is, with the entangled state, everything, I can do here creates a state that can also be gotten by doing stuff there. And the converse is true as well: Take any state $\psi \in H$. Then I can find an operator $A$ that acts only here that creates this state from the entangled state:
\[ \psi = (A\otimes id)\Omega.\]
How can we find $A$? First use Schmidt decomposition to write
\[\psi = \sum_j c_j f_j\otimes\tilde f_j\]
where the $c$'s are non-negative numbers and both the $f$'s and the $\tilde f$'s are an ortho-normal basis. Define $V$ to be the unitary matrix that does the change of basis from the $e$'s to the $f$'s. Then
\[ A = \sqrt{d\rho_h}V\]
where we used the density matrix $\rho_h$ that is obtained from $\psi$ as a partial trace over the Hilbert space there (i.e. the state that we see here):
\[\rho_h = tr_{H_t}|\Omega\rangle\langle \Omega| = \sum_j c_j |f_j\rangle\langle f_j|.\]
It's a simple calculation that shows that this $A$ does the job.

In other words, you can create any state of the combined here-there system from an entangled state just by acting locally here.

But what is important is that as still operators here and there commute
\[ [A\otimes id, id\otimes B] =0 \]
you cannot influence measurements there by acting here. If you only measure there you cannot tell if the global state is still $\Omega$ or if I decided to act here with a non-trivial unitary operator (which would be the time evolution for my local Hamiltonian $A$).

It is easy to see, that you don't really need a maximally entangled state $\Omega$ to start with, you just need enough entanglement such that $\rho_h$ is invertible (i..e that there are no 0 coefficients in the Schmidt decomposition of the state you start with).

And from this we can leave the finite dimensional realm and go to QFT, where you have the Reeh-Schlieder theorem which tells you essentially that the quantum vacuum of a QFT has this entanglement property: In that setting, here corrensponds to any local neighbourhood (some causal diamond for example) while there is everything space-like localised from here (for a nice introduction see Witten's lecture notes on quantum information).

But still, this does not mean that by acting locally here in your room you can suddenly make some particle appear on the moon that somebody there could measure (or not). QFT is still local, operators with space-like separation cannot influence each other. The observer on the moon cannot tell if the particle observed there is just a vacuum fluctuation or if you created it in your armchair even though RS holds and you can create state with a particle on the moon. If you don't believe it, go back to the finite dimensional explicit example above. RS is really the same thing pimped to infinite dimensions.

And there is another thing that complicates these matters (and which I learned only recently): Localization in gauge theories is more complicated that you might think at first: Take QED. Thanks to Gauß' law, you can write an expression for the total charge $Q$ as an integral over the field-strength over a sphere at infinity. This seems to suggest that $Q$ has to commute with every operator localised in a finite region as $Q$ is localised in a region space-like to your finite reason. But what if that localised operator is a field operator, for example the electron field $\psi(x)$? Does this mean $Q, \psi(x)]=0$? Of course not, since the electron is charge, it should have
\[ [Q,\psi(x)] = e \psi(x).\]
But does that mean that an observer at spatial infinity can know if I apply $\psi(x)$ right here right now? That would be acausal, I could use this to send messages faster than light.

How is this paradox resolved? You have to be careful about the gauge freedom. You can either say that a gauge fixing term you add in the process of quantisation destroys Gauß' law. Alternatively, you can see that acting with a naked $\psi(x)$ destroys the gauge you have chosen. You can repair this but the consequence is that the "dressed" operator is no longer localised at $x$ but in fact is smeared all over the place (as you have to repair the gauge everywhere). More details can be found in Wojciech Dybalski's lecture notes in the very end (who explained this solution to me).

The same holds true for arguments where you say that the total (ADM) mass/energy  in a space time can be measured at spatial infinity.

So the upshot is: Even though quantum theory is weird, you still have to be careful with locality and causality and when arguing about what you can do here and what that means for the rest of the universe. This also holds true when you try to resolve the black hole information loss paradox. Did I say islands?

PimEyes knows what you did last summer

You might have come across news about a search engine for faces: https://pimeyes.com/en/ . You can upload your photo and it will tell you where in the interwebs it has seen you before. Of course, I had to try it. Here are my results:

OK, that was to be expected. This is the image I use whenever somebody asks me for a short bio with a picture or which I often use as avatar. This is also the first hit when you search for my name on Google Images. This is fine with me, this image is probably my pubic persona when it comes to the information super-highway. But still, if you meet me on the street, you can use PimEyes to figure out who I am. But that was to be expected. Then there come some variants of this picture and an older one that I used for similar purposes.

Next come pictures like these:

There seems to be an Armenian politician with some vague resemblance and the internet has a lot of pictures from him. Fine. I can hide behind him (pretty much like my wife whose name is so common in Germany that the mother of one of our daughter's classmates has the same when you only consider first and maiden name as well as a former federal minister).

But then there is this:

And yes, that's me. This is some open air concert one or two years ago. And it's not even full frontal like the sample I uploaded. And there probably 50 other people who are as much recognisable as myself in that picture. And even though this search engine seems not to know about them right now, there must be hundreds of pictures of similar Ali Mitgutsch Wimmelbuch quality that show at which mass activities I participated. I have to admit, I am a little bit scared.