The Step Pulse challenge is meant to build off of the gates challenge by introducing users to the engineering of microwave pulses that happens behind the scenes when a computer scientist executes a gate. This feature will have a tutorial and a challenge similar to the Gates challenge.
General Requirements
To collect the bounty you must implement:
an updatable bloch sphere plot
a square pulse generator
a square pulse timeline
a gate timeline
a qubit properties menu
a menu to navigate to the "tutorial," "gate challenge," "pulse challenge," and "levels"
a tutorial sequence
a challenge sequence
Figma
The Figma for all of the requirements can be found here
Requirement Specs
Bloch Sphere
The Bloch sphere is a representation of all of the possible states on a Qubit. Using X-Gates and Y-Gates, we can flip the Qubit State between two poles of the Bloch sphere, |0〉and |1〉. This is similar to how a transistor flips between 1 and 0 for computational purposes.
The Bloch Sphere is plotted using plotly.graph_objects and takes in x, y, and z values that are outputted from the quantum_simulator package already installed in the Challenge Mode home page.
Square Pulse Generator
The Square pulse generator feeds data into the quantum simulator as an input. It produces rotations around the Bloch sphere that are illustrated in the Figma and below.
Most of the generator code can be taken from the Free Play Mode page and modified as illustrated below:
Required Changes:
rather than an amplitude from -1 to 1, we will just keep it [0, 1]
the "start time" is the "time spent" on an absolute timeline
the "stop time" will change to indicate the duration of the pulse
The last two can be better understood through their use case. For example, a user may want to run a pulse for 40 ns in just the X-Channel. They will change the settings like so,
and then, they will click "RUN SIMULATION" which will both graph the square pulse on the square pulse timeline and update the "start time" to be at 40 seconds.
Now, if the user wants to do a pulse afterwards, the start time is changed to "40 ns" to keep track of the 40 ns square pulse that was already added prior. This is basically the time the user has already spent making previous pulses. Note: sending pulses in sequence is important because sending all of these at the same time would yield a very different plot.
To add a y-channel pulse, before clicking RUN SIMULATION, the user will switch the channel to Y and change the stop time to 40 ns. (They generally will not need to touch the start time, that should automatically update as described above).
Finally, they press add pulse, the start time automatically updates to 80 ns and the square pulse timeline updates to graph the additional Y-pulse added after the original pulse:
Square Pulse Timeline
The square pulse timeline displays all of the square pulses the user has done in a single experiment. Below we can see a timeline of a sequence of X then Y then X then Y pulses.
The timeline is a graphical display using the plotly.graph_objects library that just displays the square pulse inputted by the Square Pulse Generator.
Notice in the image above that the square pulses are really thin because each pulse is only 20 ns but the domain of the graph is a fixed 1000 ns.
In the Pulse Challenge, we want to domain to be only as long as all the pulses that the user is inputting. Otherwise, the program is simulating 920 ns where nothing is happening. This takes up unnecessary processing power and time.
In this case, if there are 4 20ns pulses, we only need to simulate say 80 ns + a buffer of 10 ns. If instead there was only one pulse of 20 ns, we would only need to simulate the qubit behavior for 30 ns.
Required Change: Make the domain of the square pulse timeline/grapher dynamically change according to the pulses that the user inputs. You should add an offset of 10 for the total simulation time that contains significant information.
Like "start time" although it automatically changes, there should also be an option to manually change the timeline domain (NOT pictured in the figmas)
Gate Timeline
The gate timeline displays the qubit state based on the pulse that the user defines.
If the user defines a pulse that is an X or Y Gate, update the gate timeline with an X or Y Gate and the corresponding state.
To check if the pulse is an X or Y gate, the pulse channel will indicate either X or Y and the pulse duration must be 1/[Rabi_Rate] * 10^3 nano seconds.
If the user entered pulse does not satisfy either of those, throw an error indicating that the pulse duration is not a valid gate.
Menu
The menu allows the user to navigate between pages. For now, the levels and pulse challenge buttons can link to placeholder pages while the gate challenge and tutorial buttons should link to the pages created in this issue.
The page that you are on should be highlighted in a difference shade of blue as pictured above.
Tutorial Sequence
Tutorial sequence should be made as an independent page called "pulse_tutorial_sequence"
This takes users through a pre-arranged set of lessons that are displayed in the figma.
Challenge Sequence
Challenge sequence should be made as an independent page called "pulse_challenge_sequence"
This takes users through a set of challenges:
Generate an X-Gate Pulse - check that the user entered the correct pulse
Navigate from |1〉to -i|0〉- here you would check that the user entered the correct pulse
Navigate from -i|0〉to |0〉- check that the user entered the correct pulses
Find the Rabi Rate given an X-Gate takes 5 ns - check that the user entered the correct Rabi Rate
Find the X-Gate given the Rabi Rate is 13 Mhz - check that the user entered the correct pulse
Each dialogue box will display the navigation challenge. When the user completes objective, they progress to the next challenge. After each challenge is completed, the Challenge ticker will update.
Overview
The Step Pulse challenge is meant to build off of the gates challenge by introducing users to the engineering of microwave pulses that happens behind the scenes when a computer scientist executes a gate. This feature will have a tutorial and a challenge similar to the Gates challenge.
General Requirements
To collect the bounty you must implement:
Figma
The Figma for all of the requirements can be found here
Requirement Specs
Bloch Sphere
The Bloch sphere is a representation of all of the possible states on a Qubit. Using X-Gates and Y-Gates, we can flip the Qubit State between two poles of the Bloch sphere, |0〉and |1〉. This is similar to how a transistor flips between 1 and 0 for computational purposes. The Bloch Sphere is plotted using![image](https://github.com/mvwf/qublitz/assets/108304075/7d3ab8a0-e68a-4a59-b0a4-bf82697991a1)
plotly.graph_objects
and takes in x, y, and z values that are outputted from thequantum_simulator
package already installed in the Challenge Mode home page.Square Pulse Generator
The Square pulse generator feeds data into the
Most of the generator code can be taken from the Free Play Mode page and modified as illustrated below:
Required Changes:
quantum simulator
as an input. It produces rotations around the Bloch sphere that are illustrated in the Figma and below.The last two can be better understood through their use case. For example, a user may want to run a pulse for 40 ns in just the X-Channel. They will change the settings like so,
and then, they will click "RUN SIMULATION" which will both graph the square pulse on the square pulse timeline and update the "start time" to be at 40 seconds.
![image](https://github.com/mvwf/qublitz/assets/108304075/7de44ae7-edd7-4eee-8968-b750105761a8)
Now, if the user wants to do a pulse afterwards, the start time is changed to "40 ns" to keep track of the 40 ns square pulse that was already added prior. This is basically the time the user has already spent making previous pulses. Note: sending pulses in sequence is important because sending all of these at the same time would yield a very different plot.
To add a y-channel pulse, before clicking RUN SIMULATION, the user will switch the channel to Y and change the stop time to 40 ns. (They generally will not need to touch the start time, that should automatically update as described above).![image](https://github.com/mvwf/qublitz/assets/108304075/e9e4814b-a9cd-4262-a783-1a55fd097391)
Finally, they press add pulse, the start time automatically updates to 80 ns and the square pulse timeline updates to graph the additional Y-pulse added after the original pulse:![image](https://github.com/mvwf/qublitz/assets/108304075/fb566827-234c-4bea-acac-acec3951b9c1)
Square Pulse Timeline
The square pulse timeline displays all of the square pulses the user has done in a single experiment. Below we can see a timeline of a sequence of X then Y then X then Y pulses.![image](https://github.com/mvwf/qublitz/assets/108304075/7574d3e8-58b2-4e8a-bcc9-a7e00c8900ea)
The timeline is a graphical display using the
plotly.graph_objects
library that just displays the square pulse inputted by the Square Pulse Generator.Notice in the image above that the square pulses are really thin because each pulse is only 20 ns but the domain of the graph is a fixed 1000 ns. In the Pulse Challenge, we want to domain to be only as long as all the pulses that the user is inputting. Otherwise, the program is simulating 920 ns where nothing is happening. This takes up unnecessary processing power and time. In this case, if there are 4 20ns pulses, we only need to simulate say 80 ns + a buffer of 10 ns. If instead there was only one pulse of 20 ns, we would only need to simulate the qubit behavior for 30 ns.
Required Change: Make the domain of the square pulse timeline/grapher dynamically change according to the pulses that the user inputs. You should add an offset of 10 for the total simulation time that contains significant information.
Like "start time" although it automatically changes, there should also be an option to manually change the timeline domain (NOT pictured in the figmas)
Gate Timeline
The gate timeline displays the qubit state based on the pulse that the user defines.![image](https://github.com/mvwf/qublitz/assets/108304075/dfc77517-0b7a-49c5-89de-01e16158e99f)
If the user defines a pulse that is an X or Y Gate, update the gate timeline with an X or Y Gate and the corresponding state. To check if the pulse is an X or Y gate, the pulse channel will indicate either X or Y and the pulse duration must be 1/[Rabi_Rate] * 10^3 nano seconds.
If the user entered pulse does not satisfy either of those, throw an error indicating that the pulse duration is not a valid gate.
Menu
The menu allows the user to navigate between pages. For now, the levels and pulse challenge buttons can link to placeholder pages while the gate challenge and tutorial buttons should link to the pages created in this issue.
The page that you are on should be highlighted in a difference shade of blue as pictured above.
Tutorial Sequence
Tutorial sequence should be made as an independent page called "pulse_tutorial_sequence" This takes users through a pre-arranged set of lessons that are displayed in the figma.
Challenge Sequence
Challenge sequence should be made as an independent page called "pulse_challenge_sequence" This takes users through a set of challenges:
Each dialogue box will display the navigation challenge. When the user completes objective, they progress to the next challenge. After each challenge is completed, the Challenge ticker will update.