[go: up one dir, main page]

0% found this document useful (0 votes)
50 views3 pages

Assignment Solution Week 4

The document discusses various concepts in quantum error correction and variational quantum algorithms, including the 3-qubit phase-flip detection code, the role of classical optimizers in VQE, and the function of the discriminator in GANs. It also covers the bit-flip channel, the Shor code's ability to correct single-qubit errors, and the objectives of generators in GANs. Key concepts include the detectability of error sets, the minimization of energy in VQE, and examples of variational quantum algorithms.

Uploaded by

chittoras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views3 pages

Assignment Solution Week 4

The document discusses various concepts in quantum error correction and variational quantum algorithms, including the 3-qubit phase-flip detection code, the role of classical optimizers in VQE, and the function of the discriminator in GANs. It also covers the bit-flip channel, the Shor code's ability to correct single-qubit errors, and the objectives of generators in GANs. Key concepts include the detectability of error sets, the minimization of energy in VQE, and examples of variational quantum algorithms.

Uploaded by

chittoras
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

NPTEL Week 4 – Detailed Solutions

1. 3-qubit phase-flip detection: which error sets are detectable?


Consider the 3-qubit phase-flip detection code, i.e. the repetition code in the X basis. One
convenient stabilizer description is

S = ⟨X1 X2 , X2 X3 ⟩, ZL = Z1 Z2 Z3 , XL = X1 = X2 = X3 on the codespace. (1)

A single-qubit Zj anticommutes with Xj and commutes with Xk for k ̸= j, so the syndrome


bits (s1 , s2 ) measured by (X1 X2 , X2 X3 ) are

Z1 : (1, 0), Z2 : (1, 1), Z3 : (0, 1). (2)

Hence all single-qubit Z errors are mutually distinguishable (and therefore detectable). Now
test each option:

(a) {ZII, IZI, III}: these are {Z1 , Z2 , I}, which are mutually distinguishable (and I is trivially
detectable). Detectable.

(b) {ZII, IZI, ZZI}: syndromes of Z1 and Z2 are distinct as above. For Z1 Z2 , note that
Z1 Z2 commutes with X1 X2 (two anticommutes) but anticommutes with X2 X3 , giving
syndrome (0, 1). This equals the Z3 single-error pattern. Detectability only requires that
the corrupted states {E |ψL ⟩} be mutually orthogonal for distinct E in the set; it does
not require unique identification. Since Z1 Z2 differs from Z1 and Z2 by operators that
anticommute with some stabilizer, one checks ⟨ψL | (Z1 Z2 )† Zj |ψL ⟩ = 0 for j = 1, 2 and any
codespace |ψL ⟩, hence the three error images are mutually orthogonal. Detectable.

(c) {ZII, IZI, IIZ}: all three are distinct single-Z errors; by the table above they are mutually
orthogonal. Detectable.

(d) {ZZI, IZI, ZZZ}: ZZZ = ZL is a logical Z and therefore preserves the codespace; for
a logical state |ψL ⟩, ZZZ |ψL ⟩ remains in the codespace and is not orthogonal to |ψL ⟩
in general, violating detectability against I (and against other errors in the set). Not
detectable as a set.

Correct: (a), (b), (c).

2. Role of the classical optimizer in VQE


In VQE, a parametrized ansatz |ψ(θ)⟩ is prepared on quantum hardware; the classical loop
updates parameters θ to minimize the measured energy E(θ) = ⟨ψ(θ)| H |ψ(θ)⟩. It neither
diagonalizes H (that would be exact classical eigensolving) nor applies gates; it simply proposes
new θ.
Correct: (a)

1
3. Role of the discriminator in a GAN
The discriminator is trained to distinguish real data from generator-produced samples, providing
gradients that drive the generator.
Correct: (c)

4. Bit-flip channel basics


The bit-flip channel with flip probability p is

E(ρ) = (1 − p)ρ + p XρX. (3)



Hence the qubit is unchanged with probability 1 − p; it is not 1 − p, and flips with probability
p (not 1).
Correct: (b)

5. Main objective of VQE


VQE variationally estimates the ground-state energy of a many-body Hamiltonian H by mini-
mizing E(θ).
Correct: (d)

6. Nine-qubit Shor code can correct what?


The Shor code concatenates a phase-flip repetition with a bit-flip repetition, enabling correction
of arbitrary single-qubit errors. Any single-qubit error aI + bX + cY + dZ decomposes into Pauli
errors, and the code corrects X and Z (hence also Y = iXZ) on any one qubit. Consequently
both statements (c) and (d) are true.
Correct: (c), (d)

7. 3-qubit bit-flip code: syndrome (s1 , s2 ) = (1, 1)


For the bit-flip repetition code (in the Z basis) with stabilizers Z1 Z2 and Z2 Z3 , the parity checks
detect X-type (bit-flip) errors. A flip on

qubit 1 : (1, 0), (4)


qubit 2 : (1, 1), (5)
qubit 3 : (0, 1). (6)

Therefore (1, 1) points to qubit 2 flipped.


Correct: (b)

8. Smallest QECC correcting arbitrary single-qubit error


The quantum Hamming bound implies n ≥ 5 for a nondegenerate [[n, 1, 3]] code. The [[5, 1, 3]]
five-qubit code saturates this and corrects any single-qubit error, while n = 3 can only handle a
single type (bit- or phase-) of flip and n = 7, 9 are larger.
Correct: (b)

2
9. Objective of the generator in a GAN
The generator aims to produce samples that fool the discriminator (minimax objective), i.e.
make its outputs look real.
Correct: (b)

10. Examples of variational quantum algorithms


VQE and QAOA are canonical VQAs; quantum convolutional neural networks (QCNNs) are
also typically trained variationally. Grover’s algorithm is not variational.
Correct: (a), (c), (d)

You might also like