Message Boards Message Boards

Testing basic neural network physics example

Posted 1 month ago

The basic physics example problem (to try to understand the use of a basic neural network using Mathematica) I am looking at is a qubit rotated about the y-axis, where the rotation interval is discretized and $\theta_j \in [0, \pi]$. The setup involves a y-rotated qubit measured in the z-basis (hence spin-up and spin-down projector measurements). This scenario involves first analytically determining the measurement outcome probabilities as a function of the rotation angle $\theta$, we then generate measurement outcomes for training (using a random number generator), for each fixed rotation angles $\theta_j$ from the discretized interval $[0, \pi]$.

In the same way we also generate a separate Validation Set of data which tests the neural network as it runs. My training data involves generating m = 10000 total measurements for each discrete rotation angle $\theta_j \in [0, \pi]$, and saves the measurement outcomes as tuples of spin-up and spin-down outcomes for each angle $\theta_j$ (I choose to sample 50 angles). These outcomes are associated with each of the discrete $\theta_j$ values by associating it with a string value, e.g. {9988, 12} -> "1" is data generated for the first rotation angle.

My neural network seems to run fine judging by the graphical output of the loss and error rate of the training and validation sets. Also, when I send through the training data I get the correct labels. I am interested to know how I can obtain a valid probability spread when sending through just one measurement {(1, 0)} as opposed to a tuple of the dimension of the training data, e.g. {9988, 12} . When I do send it through I simply obtain a probability of 1 in the first bin label. But it should be a probability spread throughout the intervals. Not sure if this is an issue with the dimension of the test data compared to the training data being so different. If anyone has any ideas please advise. I attach the NoteBook for your interest. Many thanks for any assistance.

Attachments:
POSTED BY: Byron Alexander
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract