You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While writing a QUA program, it would be highly useful to see its effect on a simulated quantum system in real time.
Example
Implementation details
Frontend details
The code input and plots should be created using Plotly Dash.
Alternative suitable suggestions can also be propose, but bidirectional communication needs to be supported: the backend should be able to request an update on the frontend.
Here are useful APIs and programs used to generate the example:
Power Rabi program: This program is a single-dimensional sweep with one QUA variable a, and is a great program to verify the front-end.
Schedule Plotting: The schedules_to_plot argument accepts a list of indices of schedules to plot. These plotting mechanisms behind this function should be called/cached and reshaped in the background to display the schedule as a function of the QUA variable value on the slider.
Results plotting: Once the results are fetched, they can be plot on the y-axis, with the values that the QUA variable will take on on the x-axis.
# make sure no single point is different to expected within 0.1 tolerance
q1_state_probabilities = np.array(results[0])
q2_state_probabilities = np.array(results[0])
amps = np.arange(start, stop, step)
for i, result in enumerate(results):
plt.plot(np.arange(start, stop, step), results[i], '.-', label=f"Simulated Q{i}")
plt.ylim(-0.05, 1.05)
plt.legend()
plt.show()
Open questions
There are different levels of "real time".
At a minimum, there should be a command that can be called that takes a QUA program, compiles and simulates it, and then displays a plot.
A step above this is a background process with an API that can receive a serialized QUA program and compile+simulate it
Another step above is that this background process watches a file for changes and then plots that.
What level of real time are we looking for?
How to add the config to this live converter?
Where should it plot the results? In the frontend web app or as a program?
The text was updated successfully, but these errors were encountered:
While writing a QUA program, it would be highly useful to see its effect on a simulated quantum system in real time.
Example
Implementation details
Frontend details
Alternative suitable suggestions can also be propose, but bidirectional communication needs to be supported: the backend should be able to request an update on the frontend.
simulation details
Here are useful APIs and programs used to generate the example:
a
, and is a great program to verify the front-end.schedules_to_plot
argument accepts a list of indices of schedules to plot. These plotting mechanisms behind this function should be called/cached and reshaped in the background to display the schedule as a function of the QUA variable value on the slider.Open questions
The text was updated successfully, but these errors were encountered: