Virtual Lab Experiments For CSE Stream 2024-25
Virtual Lab Experiments For CSE Stream 2024-25
Link: https://algassert.com/quirk
Single Qubit Gates
0 1
x X
1 0
0 1 1 0 + 0 0
X 0 = = = = 1
1 0 0 1 + 0 1
0 1 0 0 + 1 1
X 1 = = = = 0
1 0 1 0 + 0 0
Truth table for Pauli X gate or quantum NOT gate
Input Out put
0
1
0 +1
X
Input 0 + 1 otuput 1 + 0
Figure: X gate
2. Y gate:
0 − i
y Y
i 0
0 − i 1 0 + 0 0
Y 0 = = = =i 1
i 0 0 i + 0 i
0 − i 0 0 − i 1
Y 1 = = = − i = − i 0
i 0 1 0 + 0 0
1
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
0 − i 0 − i − i
Y ( 0 + 1 )= = = = i 1 − i 0
i 0 i + 0 i
Y
Input 0 + 1 out put i 1 − i 0
Figure: Y gate
3. Z gate:
1 0 1 1 + 0 1
Z 0 = = = = 0
0 − 1 0 0 + 0 0
1 0 0 0 + 0 0
Z 1 = = = =− 1
0 − 1 1 0 − 1 −1
1 0 + 0
Z ( 0 + 1 )= = = = 0 − 1
0 − 1 0 − −
Truth table for Y gate
Input Out put
0
1
0 +1
Z
Input 0 + 1 output 0 − 1
Figure: Z gate
4. Phase Gate (or S Gate):
2
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
It effect on 0 is
1 0 1 1 + 0 1
S 0 = = = = 0
0 i 0 0 + 0 0
i.e output is 0
It effect on 1 is
1 0 0 0 + 0 0 0
S 1 = = = = i = i 1
0 i 1 0 + i i 1
i.e output is i 1
1 0 + 0
S( 0 + 1 )= = = = 0 + i 1
0 i 0 + i i
i.e output is 0 + i 1
S
Input 0 + 1 Output 0 + i 1
Figure: S gate
The multi-qubit quantum logic gate is the controlled NOT or CNOT gate. The circuit of the
CNOT gate is shown in figure. The gate has two input qubits. (1) Control qubit and (2) Target
qubit.
Control qubit
3
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
a a
b ba
Target qubit
Figure. CNOT gate
If the control qubit of the gate is set to 0, then the target qubit is not altered. If the control qubit
is set to 1, then the target qubit is inverted. The figure shows a control gate with the control
qubit a and target qubit b .
Both the bits remain unaltered. Hence, the output state is the same as the input state or
00 → 00
Both the bits remain unaltered. Again, the output state is the same as the input state or
01 → 01
The target qubit is flipped to 1. Therefore, the output state has both qubits 1, or
1 0 → 11
11 → 10
CNOT can be represented in the matrix form as
1 0 0 0
0 1 0 0
U CN =
0 0 0 1
0 0 1 0
4
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
2. Swap gate:
The swap gate is a simple quantum circuit containing three quantum gates. The circuit is read
from left to right and each line represents a quantum passage, maybe of time, perhaps a physical
particle such as a photon or a particle of light to move from one location to another space.
1 0 0 0
0 0 1 0
U SWAP =
0 1 0 0
0 0 0 1
This is fed as input to the second gate which also does modulo 2 addition but the result is placed
in the first qubit now.
This is now fed to the third gate which performs modulo 2 addition and places the result in the
second qubit.
Thus, the overall effect is that the two qubits have been swapped.
5
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
3. Controlled -Z gate:
The controlled-Z gate is another example of a controlled gate, i.e. gates in which the operation
is of the kind “If A is true, then do B”.
Control qubit
Target qubit Z
1 0 0 0 1 1
0 1 0 0 0 0
U Z 00 = = = 00
0 0 1 0 0 0
0 0 0 − 1 0 0
1 0 0 0 0 0
0 1 0 0 1 1
U Z 01 = = = 01
0 0 1 0 0 0
0 0 0 − 1 0 0
1 0 0 0 0 0
0 1 0 0 0 0
U Z 10 = = = 10
0 0 1 0 1 1
0 0 0 − 1 0 0
1 0 0 0 0 0
0 1 0 0 0 0
U Z 11 = = = − 11
0 0 1 0 0 0
0 0 0 − 1 1 − 1
6
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
01
10
11
Any classical logic circuit can be build using a quantum circuit. Any classical circuit can be
replaced by an equivalent circuit containing only reversible element, by using a reversible gate
called Toffoli Gate.
Control qubit a a
Control qubit b b
Target qubit c c ab
The first two bits are control bits which remain unaffected by the action of the Toffoli gate.
The third is the target bit which is inverted if both the control bits are 1; else it is left unchanged.
Input Output
a b c a b c
0 0 0 0 0 0
0 0 1 0 0 1
0 1 0 0 1 0
0 1 1 0 1 1
1 0 0 1 0 0
1 0 1 1 0 1
1 1 0 1 1 1
1 1 1 1 1 0
7
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
The Toffoli gate is its own inverse since applying it once to the input, a, b, c gives the output,
a, b, c ab .
As the modulo-2 sum of a number with itself gives 0. Hence, the Toffoli gate is a reversible
gate and is its own inverse.
8
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
In the reverse bias, the saturated value of the reverse current for a PN junction diode is given
by,
Is =A.T3/2 e -Eg/KT _ _ _ _ _(1)
Where,
A= constant term
Is = saturation current in micro ampere
T = temperature of junction diode in Kelvin
Eg = band gap in eV
K = Boltzmann constant in eV per Kelvin
For small changes in temperature where log T can be treated as constant relation (1) can be
written as
log10Is = constant – 5.04 Eg x 103 /T_ _ _ _ (2)
Graph between 103 /T as abscissa and log10Is as ordinate will be a straight line having a slope
= 5.04Eg
Hence band gap
Eg = slope of the line / 5.04
9
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
Circuit diagram
Experimental procedure:
• Open the link provided by the virtual lab by clicking on the https://bop-
iitk.vlabs.ac.in
• Click the “Enable Power” button.
• Choose the correct image.
• After correct answer “X” (cross) the image.
• Click the “Place Container” button and then click on the drawing box.
• Click on “Battery” button and then click to drawing box.
• Click on “Ammeter” button and then click on drawing box.
• Click on “Voltmeter” button and then click on drawing box.
• Click on “PN Junction” button and then click on liquid inside container.
• Click on “Point” button and then click on drawing board wherever point connections
are required.
• Click on “Connect” button and then click on point to be connected to complete the
circuit diagram.
• Click on “Undo/Redo” button in case of wrong connections.
• Select voltage from the drop-down button.
• After selecting voltage press the “Click” button.
• Draw the slider to choose temperature.
• Click on “Find here” button to get reverse saturation current.
• Repeat this process to complete the observation table.
• Click “Calculate Data” button.
• Click on “Draw Graph” button.
• Place the cursor on the plotted graph to enter the value of first and second coordinate.
• Click on “Find Slope” button.
• Enter the value of calculated slope.
• Click “Calculate” button to get the value of Energy Band Gap.
10
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
SAMPLE EXPERIMENT:
Tabular column:
Sample graph:
11
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
Result: Energy Band Gap of the given semiconductor by using the simulation method is found
to be = -------------------eV.
12
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
2. Vy = V0 Sinθ
3. X = Vx . t
4. Y = Vy t – ½ g t2
Where,
V0 is the initial velocity of the projectile.
is the angle of projection.
g is acceleration due to gravity
t is the time interval
13
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
PROCEDURE:
• Open a Microsoft excel sheet. Enter the initial values like initial velocity V0 (say 100
m/s), angel of projection θ (say 60o), time interval dt (say 0.1 sec) and acceleration due
to gravity g = 9.8 m/s2 in the excel sheet as shown in tabular column 1.
Vo 100 m/s
Angle 60 deg
g 9.8 m/s2
dt 0.10 sec
Tabular column 1
• Create a tabular column as shown in column 2to in the excel sheet and enter the formula
for Vx, Vy, X and Y measurements using excel commands.
Time Vx Vy X Y
=C$2*COS(RADIANS(C$3)) =C$2*SIN(RADIANS(C$3)) 0 0
=D8+B8*C$5 =E8+C8*C$5
200.00
150.00
100.00
50.00
0.00
0.00 200.00 400.00 600.00 800.00
14
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
• From the graph note down the values of maximum height and range of the projectile
motion.
• Calculate the maximum height and range by using formulas. Compare these with
graphical values.
• Repeat the procedure for different values of angle of projections say 45o and 30o.
• Compare the plots of different values of angle of projections and tabulate the result in
the tabular column.
RESULT :
The projectile motion is studied using spreadsheet for different values of projection angles θ
and the values of maximum height H and range R are as tabulated.
15
Dept. of Physics Virtual Lab experiments procedure CSE Stream AY: 2024-25
Procedure:
Follow these steps to create an awesome animated video and make learning fun.
https://www.animaker.com/hub/animated-educational-videos/
Click on: https://www.animaker.com/educational-video-maker
16