Kerr gate matrix


#1

Hey I was wondering if I’ve understood the matrix implementation for the Kerr gate correctly (having trawled through the repo code). As far as I can see it’s a diagonal matrix with exp(i x kappa x n**2) for n in the range of 0 to cutoff_dim. So something like:

1 0 0 0…
0 exp(i x kappa) 0 0 …
0 0 exp(4i x kappa) 0 0 …

Thanks in advance!


#2

Hi @ievutec. Yes, that’s exactly right!