AL-802-D Quantum Computing

Quantum Computing (AL-802-D) Important Questions

RGPV · B.Tech · CSE-AIML · Semester 8 · Current scheme · 0 papers

  1. Read the answers

    Start with the topics that come every year.

  2. Revise unit notes

    Go through each unit once to score more.

Paperwala Imp Topics - Quantum Computing important questions

Download Paperwala Imp Question & Answer (PDF)

Chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted.

Quantum Computing important questions with answers

Each answer starts with the short answer. Then come the points to write, a diagram and an exam tip. The topics are chosen from the syllabus.

Q1. Qubit and superposition

From the syllabus · Unit 1

From the papers

  • “Unit 1: Qubits and multi-qubit states, superposition.” (Syllabus)

The short answer

A qubit is the basic unit of quantum information. Its state is a superposition a|0> + b|1> of the two basis states, where a and b are complex amplitudes with |a|^2 + |b|^2 = 1.

Write these points

Bit and qubit

  • A classical bit is either 0 or 1. A qubit carries amplitudes for both values until it is measured.
  • Measurement gives 0 with probability |a|^2 and 1 with probability |b|^2. The state then collapses to the result.
  • The amplitudes can be negative or complex, so they can add up or cancel. This is called interference.
  • Superposition is not a list of two answers. One measurement still gives one bit.

Many qubits

  • n qubits need 2^n amplitudes to describe them. This growth is why simulation on a classical computer gets hard.

Measuring the state 0.6|0> + 0.8i|1>.

Check: 0.6^2 + 0.8^2 = 0.36 + 0.64 = 1, so the state is valid.

P(0) = 0.36 and P(1) = 0.64. The factor i does not change these probabilities.

After a result of 1 the state is |1>. Repeating the measurement gives 1 every time.

Size of the description.

10 qubits need 1,024 amplitudes. 20 qubits need 1,048,576. 50 qubits need about 1.1 x 10^15, far beyond a laptop.

Real-life example

Think of a coin spinning on a table. While it spins it is neither heads nor tails. When you slap your hand on it the result is fixed. A qubit behaves like this. The spin can also carry a direction that decides how two spinning coins add up or cancel.

Diagram: Qubit and superposition

Same or opposite: bit and qubit

PointClassical bitQubitSame or opposite
Possible values0 or 1Superposition of 0 and 1Opposite
Value when readThe stored value0 or 1 with set probabilitiesOpposite
Can be copied freelyYesNo (no cloning)Opposite
Gives one bit when readYesYesSame

Exam tip. Write the state a|0> + b|1> with the condition |a|^2 + |b|^2 = 1 first. Then give the measurement rule and one numeric example. Marks are lost when students say the qubit is 0 and 1 and stop there.

Back to the topic list

Q2. Bloch sphere representation

From the syllabus · Unit 1

From the papers

  • “Unit 1: Bloch sphere representation.” (Syllabus)

The short answer

The Bloch sphere is a unit sphere whose points show every pure state of one qubit. The state cos(t/2)|0> + e^(ip) sin(t/2)|1> sits at polar angle t and azimuth p.

Write these points

Reading the sphere

  • The north pole is |0> and the south pole is |1>.
  • The points on the equator are equal superpositions. The state |+> lies on the +x axis and |-> on the -x axis. The states |+i> and |-i> lie on the y axis.
  • Opposite points on the sphere are orthogonal states.
  • The angle t sets the probabilities. The angle p sets the relative phase.
  • Gates are rotations of the sphere. X, Y and Z turn it by 180 degrees about their own axes.

Place two states.

State |0>: t = 0, so it is at the north pole.

State (|0> + |1>)/sqrt(2): cos(t/2) = 0.7071 gives t = 90 degrees and p = 0, so it is |+> on the equator.

State 0.6|0> + 0.8|1>: cos(t/2) = 0.6 gives t = 106.3 degrees. P(1) = 0.64.

Remember. The Bloch sphere describes one qubit only. Entangled states of two or more qubits have no single sphere. A global phase is dropped because it cannot be measured.

Real-life example

A globe shows every place by two angles, latitude and longitude. A qubit state is placed in the same way. The latitude tells how likely a 0 or a 1 is. The longitude tells the phase that matters when two qubits meet.

Diagram: Bloch sphere representation

Same or opposite: Bloch sphere and classical bit

PointBloch sphereClassical bitSame or opposite
Number of statesInfinite pointsTwo (0 and 1)Opposite
Poles|0> and |1>0 and 1Same
Shows phaseYes, as longitudeNoOpposite
OperationRotationFlip or keepOpposite

Exam tip. Draw the sphere with the six named points and the two angles. State which angle gives probability and which gives phase. Add the one worked placement.

Back to the topic list

Q3. Quantum entanglement and the Bell state

From the syllabus · Unit 3

From the papers

  • “Unit 3: Quantum entanglement, Bell state.” (Syllabus)

The short answer

Quantum entanglement is a joint state of two or more qubits that cannot be written as a product of single qubit states. Measuring one qubit fixes what the other shows, as in the Bell state (|00> + |11>)/sqrt(2).

Write these points

Properties

  • Each qubit alone looks random, with probability 0.5 for 0 and 0.5 for 1.
  • The two results always agree for this Bell state.
  • No message passes between the qubits, so entanglement cannot send information faster than light.
  • It is a resource for teleportation, superdense coding and many algorithms.

Making a Bell state

  1. Start with |00>.
  2. Apply a Hadamard gate to the first qubit. The state becomes (|00> + |10>)/sqrt(2).
  3. Apply CNOT with the first qubit as control. The state becomes (|00> + |11>)/sqrt(2).

Test whether a state is a product.

A product state (a|0> + b|1>)(c|0> + d|1>) has amplitudes ac, ad, bc, bd, with (ac)(bd) = (ad)(bc).

For the Bell state the amplitudes are 0.707, 0, 0, 0.707. Here (0.707)(0.707) = 0.5, but (0)(0) = 0.

The two sides differ, so the state cannot be a product. It is entangled.

Real-life example

Two friends each get a sealed envelope from a pair that always match. If one opens the envelope and sees red, the other knows it is red too. In the quantum case the colour was not fixed before opening, yet the two always agree.

Diagram: Quantum entanglement and the Bell state

Same or opposite: entangled state and product state

PointEntangledProductSame or opposite
Written as a product of qubit statesNoYesOpposite
Outcomes of the two qubitsLinkedIndependentOpposite
Total probability11Same
Each qubit alone is randomYes (Bell state)Not alwaysOpposite

Exam tip. Name the Bell state, give the two gate circuit and state the measured outcomes (00 or 11 with half each). Add the product test if time allows.

Back to the topic list

Q4. Quantum gates: Pauli, Hadamard and phase shift

From the syllabus · Unit 3

From the papers

  • “Unit 3: Quantum logic gates and circuits: Pauli, Hadamard, phase shift.” (Syllabus)

The short answer

Quantum gates are unitary operations on qubits. The Pauli gates X, Y, Z flip or phase a qubit, the Hadamard gate H makes a superposition and the phase shift gate adds a phase to |1>.

Write these points

Single qubit gates

GateMatrixAction
X (NOT)[[0,1],[1,0]]|0> to |1>, |1> to |0>
Z[[1,0],[0,-1]]|1> gets a minus sign
Y[[0,-i],[i,0]]X and Z together, with a factor i
H(1/sqrt2)[[1,1],[1,-1]]|0> to |+>, |1> to |->
Phase R(f)[[1,0],[0,e^(if)]]|1> gets phase f. S is 90 degrees, T is 45 degrees
  • Every gate is reversible. Its matrix U has U-dagger U = I.
  • H applied twice returns the input, since HH = I.
  • H turns the Z basis into the X basis, which is why it starts most algorithms.
  • The Pauli matrices X, Y and Z square to the identity.

Apply H, then Z, then H to |0>.

H|0> = (|0> + |1>)/sqrt2. Z gives (|0> minus |1>)/sqrt2. H again gives |1>.

So HZH equals X. The circuit flips the qubit. A script check of the matrices gives the same result.

Real-life example

A gate is a light switch with extra moves. X flips the switch. H puts it half way, in a mixed state. Z only marks the switch. A later H turns that mark into a real flip.

Diagram: Quantum gates: Pauli, Hadamard and phase shift

Same or opposite: Pauli X gate and Hadamard gate

PointXHSame or opposite
Output for |0>|1>(|0> + |1>)/sqrt2Opposite
Makes a superpositionNoYesOpposite
Unitary and reversibleYesYesSame
Applied twiceIdentityIdentitySame

Exam tip. List the four gates in a matrix table and show one chained example. Always say that gates are unitary. Do not forget the minus sign in H for |1>.

Back to the topic list

Q5. Controlled gates, CNOT and SWAP

From the syllabus · Unit 3

From the papers

  • “Unit 3: Controlled gates, Ising, Deutsch, swap.” (Syllabus)

The short answer

A controlled gate applies an operation to a target qubit only when the control qubit is |1>. CNOT flips the target, controlled-Z adds a phase and SWAP exchanges two qubits.

Write these points

Gates on two qubits

  • CNOT maps |c, t> to |c, t xor c>. It creates entanglement when the control is in superposition.
  • Controlled-Z adds a minus sign only to |11>.
  • SWAP exchanges the two qubits. It can be built from three CNOT gates.
  • Ising gates (XX, YY, ZZ coupling) are native on some hardware and rotate two qubits together.
  • The Deutsch gate is a three qubit gate with a rotation angle. It is universal in theory.
Input |c t>CNOT outputSWAP output
|00>|00>|00>
|01>|01>|10>
|10>|11>|01>
|11>|10>|11>

CNOT with a superposition control.

Input (|0> + |1>)/sqrt2 on the control and |0> on the target.

Output (|00> + |11>)/sqrt2, the Bell state. Probability of 00 is 0.5 and of 11 is 0.5.

Real-life example

A railway signal operator moves a lever only when a certain signal is on. The lever is the target and the signal is the control. If the signal itself can be both on and off, the lever and the signal end up linked. That link is entanglement.

Diagram: Controlled gates, CNOT and SWAP

Same or opposite: CNOT and SWAP

PointCNOTSWAPSame or opposite
Qubits touchedTwoTwoSame
Changes target only when control is 1YesNoOpposite
Basis states changed|10> and |11>|01> and |10>Opposite
ReversibleYesYesSame

Exam tip. Write the truth table. Show CNOT after H as the Bell circuit. Mention that CNOT with single qubit gates is universal.

Back to the topic list

Q6. Deutsch and Deutsch-Jozsa algorithms

From the syllabus · Unit 5

From the papers

  • “Unit 5: Deutsch's algorithm, Deutsch-Jozsa algorithm.” (Syllabus)

The short answer

Deutsch's algorithm decides whether a one bit function f is constant or balanced with one query. Deutsch-Jozsa does the same for n bits with one query, where a classical method needs up to 2^(n-1) + 1 queries.

Write these points

Steps (one bit)

  1. Prepare |0>|1>.
  2. Apply H to both qubits.
  3. Apply the oracle U_f: |x, y> to |x, y xor f(x)>.
  4. Apply H to the first qubit.
  5. Measure the first qubit. Result 0 means constant, result 1 means balanced.

Why it works

  • The second qubit in the state |-> turns the oracle into a phase: the amplitude of |x> gets the sign (-1)^f(x). This is phase kickback.
  • The final H makes the two signs interfere. Equal signs give |0>. Opposite signs give |1>.
  • For n bits the first register is measured. All zeros means constant. Any other result means balanced.

Balanced function f(x) = x.

After the first H gates and the oracle, the first qubit is (|0> minus |1>)/sqrt2.

The last H gives |1>. The script gives the final amplitudes 0.707 and minus 0.707 on |10> and |11>, so the first qubit is 1 with probability 1.

For the constant function f(x) = 0 the first qubit ends in |0> with probability 1.

Query count for n = 3.

A classical method may need 2^2 + 1 = 5 queries in the worst case. The quantum method needs 1.

Real-life example

Suppose a shop has a machine that is either broken at every setting or works at half the settings. A shopkeeper would test settings one by one. This algorithm is like switching the machine on once with every setting in superposition and reading a single clear yes or no.

Diagram: Deutsch and Deutsch-Jozsa algorithms

Same or opposite: Deutsch algorithm and classical check

PointDeutschClassicalSame or opposite
Queries for one bit12Opposite
Needs superposition and interferenceYesNoOpposite
Gives a sure answerYesYesSame
Practical useTeaching examplePlain evaluationOpposite

Exam tip. Draw the circuit with H, oracle, H and the measurement. State clearly that the answer is exact, with no probability. Show the sign trick of phase kickback in one line.

Back to the topic list

Q7. Grover's algorithm

From the syllabus · Unit 5

From the papers

  • “Unit 5: Grover's algorithm.” (Syllabus)

The short answer

Grover's algorithm searches an unsorted list of N items for a marked one in about (pi/4) sqrt(N) steps. A classical search needs about N/2 steps on average.

Write these points

One Grover iteration

  1. Start with the equal superposition over all N items (H on every qubit).
  2. Oracle: flip the sign of the amplitude of the marked item.
  3. Diffusion: reflect all amplitudes about their average.
  4. Repeat about (pi/4) sqrt(N) times, then measure.
  • Each loop raises the marked amplitude a little. This is amplitude amplification.
  • Too many loops lower the chance again, so the number of loops must be chosen well.
  • The speedup is quadratic, not exponential.

N = 8 items, one marked.

Angle t = arcsin(1/sqrt8) = 0.3614. Success after k loops is sin^2((2k + 1) t).

k = 0: 0.125. k = 1: 0.781. k = 2: 0.945. k = 3: 0.330.

The best choice is k = 2 with a success chance of 94.5 percent. A classical search averages 4.5 checks.

Scale.

For N = 1,024 about 25 loops give 99.95 percent success. A classical search averages 512 checks.

Real-life example

Finding one name in a phone book with no order means reading it page by page. Grover is like a clever helper who marks the right page a little darker on each pass. After about the square root of the pages, the dark page stands out and you pick it.

Diagram: Grover's algorithm

Same or opposite: Grover search and linear search

PointGroverLinear searchSame or opposite
Steps for N itemsAbout sqrt(N)About N/2Opposite
Runs onQuantum computerAny computerOpposite
Needs the list to be sortedNoNoSame
ResultRight item with high probabilityRight item for sureOpposite

Exam tip. Name the two steps, oracle and diffusion. Give the loop count (pi/4) sqrt(N) and one numeric example. Say that the speedup is quadratic.

Back to the topic list

Q8. Shor's algorithm

From the syllabus · Unit 5

From the papers

  • “Unit 5: Shor's algorithm.” (Syllabus)

The short answer

Shor's algorithm factors a number N in polynomial time on a quantum computer. It turns factoring into finding the period r of a^x mod N, which the quantum Fourier transform finds quickly.

Write these points

Steps

  1. Pick a random a with gcd(a, N) = 1.
  2. Quantum part: find the period r of f(x) = a^x mod N using phase estimation and the QFT.
  3. If r is odd, or a^(r/2) is minus 1 mod N, try another a.
  4. Compute gcd(a^(r/2) minus 1, N) and gcd(a^(r/2) + 1, N). These are factors of N.
  • The classical parts are the gcd, the choice of a and the final division.
  • The best known classical methods take super-polynomial time, so Shor would break RSA at large size.
  • Present devices are far too small to factor numbers of RSA size.

Factor N = 15 with a = 7.

Powers of 7 mod 15: 7, 4, 13, 1, so the period is r = 4.

a^(r/2) = 7^2 = 49. gcd(49 minus 1, 15) = gcd(48, 15) = 3. gcd(49 + 1, 15) = gcd(50, 15) = 5.

So 15 = 3 x 5.

Another case.

N = 21 with a = 2 has period r = 6. gcd(2^3 minus 1, 21) = gcd(7, 21) = 7 and gcd(2^3 + 1, 21) = gcd(9, 21) = 3, so 21 = 7 x 3.

Real-life example

A lock with a very long repeating pattern is hard to read from one turn. If you could see the whole cycle at once, the length of the repeat would open the lock. Shor does this by finding the repeat length of a number pattern.

Diagram: Shor's algorithm

Same or opposite: Shor's algorithm and trial division

PointShorTrial divisionSame or opposite
Time for large NPolynomial in the bit lengthExponential in the bit lengthOpposite
Needs a quantum computerYes (for the period)NoOpposite
Uses gcdYesYesSame
Threat to RSAYes, at large sizeNoOpposite

Exam tip. Write the five steps and the N = 15 example in full. Say which part is quantum, only the period finding. Marks go to the gcd step.

Back to the topic list

Q9. Quantum Fourier transform

From the syllabus · Unit 4

From the papers

  • “Unit 4: Quantum Fourier Transform.” (Syllabus)

The short answer

The quantum Fourier transform (QFT) maps a state on n qubits by the discrete Fourier transform, with N = 2^n. It is a unitary matrix with entries w^(jk)/sqrt(N), where w = e^(2 pi i / N).

Write these points

Main facts

  • It turns a periodic pattern into peaks at multiples of N/r. This is why Shor and phase estimation use it.
  • A circuit uses H gates and controlled phase gates, so it needs about n^2 gates. A classical FFT needs N log N steps on 2^n values.
  • It is unitary, so it is reversible. The inverse QFT is the same circuit run backwards.
  • The output amplitudes cannot all be read. A measurement gives one frequency.

QFT on two qubits (N = 4, w = i).

Matrix row j, column k is i^(jk)/2. The first row is 0.5, 0.5, 0.5, 0.5.

Input |1>, the vector (0, 1, 0, 0), gives (0.5, 0.5i, minus 0.5, minus 0.5i).

All four outputs have size 0.5, so each result has probability 0.25. The phases step by 90 degrees.

Remember. The statement of 'n^2 gates' is the standard textbook count from memory. Exact gate counts depend on the book and on whether approximate rotations are used.

Real-life example

A music player finds which notes are inside a sound. The QFT does a similar job on amplitudes. It tells which repeating patterns are inside a quantum state, so the period of a pattern can be read off from a few measurements.

Diagram: Quantum Fourier transform

Same or opposite: QFT and classical FFT

PointQFTClassical FFTSame or opposite
Works onAmplitudes of n qubitsA list of 2^n numbersOpposite
CostAbout n^2 gatesAbout N log N stepsOpposite
Output can be read directlyNo, only by measurementYesOpposite
Unitary or invertibleYesYesSame

Exam tip. Write the matrix rule and the two qubit example. State the gate count and say that the output is read by measurement, which is a limit.

Back to the topic list

Q10. Dirac notation, inner product and Hilbert space

From the syllabus · Unit 2

From the papers

  • “Unit 2: Dirac notation, inner product and Hilbert spaces.” (Syllabus)

The short answer

Dirac (bra-ket) notation writes a state as a ket |v> (column vector) and its conjugate transpose as a bra <v| (row vector). The inner product <u|v> measures overlap in a Hilbert space, a complex vector space with an inner product.

Write these points

Rules

  • <u|v> is a complex number. <v|v> = 1 for a normalised state.
  • States u and v are orthogonal when <u|v> = 0.
  • |u><v| is an outer product, a matrix.
  • A set of orthonormal vectors is a basis. |0> and |1> form the standard basis of one qubit.
  • An n qubit register lives in a Hilbert space of dimension 2^n.

Overlap of two states.

u = (|0> + i|1>)/sqrt2 and v = (|0> minus i|1>)/sqrt2.

<u|v> = (1 x 1 + (minus i)(minus i))/2 = (1 minus 1)/2 = 0, so u and v are orthogonal.

<u|u> = (1 + 1)/2 = 1, so each is normalised.

The probability of finding u in the state |0> is |<0|u>|^2 = 0.5.

Real-life example

In a college register, a student is described by a row of marks. Comparing two students means multiplying their rows entry by entry and adding. The inner product does the same job for quantum states. Zero means they have nothing in common.

Diagram: Dirac notation, inner product and Hilbert space

Same or opposite: ket and bra

PointKet |v>Bra <v|Same or opposite
ShapeColumn vectorRow vectorOpposite
EntriesAmplitudesConjugates of the amplitudesOpposite
Gives a number with the otherYes (<u|v>)YesSame
Used forStatesMeasuring overlapOpposite

Exam tip. Define ket, bra and inner product in a line each. Show orthogonality with a worked case. Remember to conjugate the entries of the bra.

Back to the topic list

Start with the latest papers

Previous year papers will be added soon!

Quantum Computing (AL-802-D) FAQs

What are the most important topics in Quantum Computing?

No past paper of this subject is on this site yet, so the topics were chosen from the syllabus. The first five: Qubit and superposition; Bloch sphere representation; Quantum entanglement and the Bell state; Quantum gates: Pauli, Hadamard and phase shift; Controlled gates, CNOT and SWAP.

How were these Quantum Computing important questions chosen?

Each topic was taken from the syllabus units. No past paper was available to count repeats, and the answers are not teacher-reviewed, so use them together with your syllabus.

Is there a PDF of Quantum Computing important questions with answers?

Yes. The Paperwala Imp Question & Answer PDF for Quantum Computing is free to download from this page.

The 10 topics of Quantum Computing (AL-802-D) for RGPV B.Tech CSE-AIML semester 8, chosen from the syllabus. No past paper of this subject is on this site yet, so repeats could not be counted. Quantum Computing is also searched for as Quantum AI, CD-803-D, IT-802-D and AI-802-C.

Also known as Quantum AI, CD-803-D, IT-802-D, AI-802-C