Closed glassnotes closed 4 years ago
Shouldn’t the shape of a density matrix always have an even number of dimensions?
:thinking:
@glassnotes I'm not sure about exactly why this is, although it seems to me like you're getting the correct output (and that the tutorial needs to be updated). I believe the dm should have dimension 2*number-of-measured-modes (right?), and, looking at the code, it actually states that the cutoff=15
although the printed cutoff clearly is 5.
My guess for what happened here: This tutorial used to output the statevector (which will be an array of shape [cutoff] * num_modes
), and the cutoff used to be 5
. At some point the commands got updated, but the output cell didn't.
The fix should simply be changing the cutoff_dim
to 5
and updating the output cell to be [5, 5, 5, 5, 5, 5]
.
shouldn't the cell update by automatic?
No, this is a quickstart in the SF docs (it's not a sphinx gallery page). It's just a handwritten ReST page.
That explains it
Issue description
I was working through the Circuits tutorial, and found that the output after simulation when run locally does not match the tutorial. Below is a screenshot with a comparison of the outputs.
Expected behavior: Output should match contents of tutorial.
Actual behavior: Output differs in a few places:
Reproduces how often: Always.
System information: