[go: up one dir, main page]

0% found this document useful (0 votes)
49 views2 pages

Assignment Solution Week 2

The document provides detailed solutions to a Week 2 assignment covering topics in quantum teleportation, Qiskit commands, and circuit identities. It explains the outcomes of various quantum operations, the purpose of Qiskit Aer, and the functionalities of the Qiskit transpiler. Additionally, it discusses the requirements for single-qubit teleportation and the visualization utilities available in Qiskit.

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)
49 views2 pages

Assignment Solution Week 2

The document provides detailed solutions to a Week 2 assignment covering topics in quantum teleportation, Qiskit commands, and circuit identities. It explains the outcomes of various quantum operations, the purpose of Qiskit Aer, and the functionalities of the Qiskit transpiler. Additionally, it discusses the requirements for single-qubit teleportation and the visualization utilities available in Qiskit.

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/ 2

Detailed Solutions: Week 2 Assignment

1. Teleportation: outcome “10” (Alice) ⇒ Bob’s (uncorrected)


state

Alice and Bob share the Bell state |Φ+ ⟩ = (|00⟩ + |11⟩)/ 2. Alice holds the unknown |ψ⟩ =
α |0⟩ + β |1⟩ and her half of the Bell pair; Bob holds the other half. The standard teleportation
circuit applies CNOT (control: Alice’s unknown, target: Alice’s Bell qubit) and then H on
Alice’s unknown, followed by measurements of Alice’s two qubits in the computational basis
producing bits (m1 , m2 ) where m1 is the first (original unknown) and m2 the second (Alice’s
Bell) outcome.
The correction rule is

|ψ⟩Bob = X m2 Z m1 |ψ⟩ (up to a global phase).

If Alice obtains m1 m2 = 10, then m1 = 1, m2 = 0 and Bob’s qubit before any correction is

Z |ψ⟩ = α |0⟩ − β |1⟩ .

Answer: α |0⟩ − β |1⟩ .

2. Qiskit: qc.cx(0, 1)
In Qiskit, cx(control, target) applies CNOT with the first argument as the control and the
second as the target. Thus qc.cx(0,1) is CNOT with control qubit 0 and target qubit 1.

CNOT: control 0, target 1.

3. Purpose of Aer
qiskit-aer provides high-performance classical simulators (e.g., AerSimulator) to run quan-
tum circuits without accessing real hardware. It does not define new gates or connect to physical
backends; it simulates them.

Aer simulates quantum circuits on classical hardware.

4. Circuit identity
The circuit applies an X on the first qubit, then a CNOT (control on the first qubit, target on
the second qubit), then X again on the target. Let the input be |a, b⟩ with a the control bit
and b the target bit.
X on a CNOT X on a
|a, b⟩ −−−−→ |a ⊕ 1, b⟩ −−−−→ |a ⊕ 1, b ⊕ 1 ⊕ a⟩ −−−−→ |a, a ⊕ b ⊕ 1⟩ .

1
Which gives:
|00⟩ → |01⟩ , |01⟩ → |00⟩ , |10⟩ → |10⟩ , |11⟩ → |11⟩ .
From the listed options, the true statements are

|0⟩|0⟩ → |0⟩|1⟩ and |1⟩|0⟩ → |1⟩|0⟩.

5. Extra qubits for single-qubit teleportation


Teleportation of one unknown qubit requires a shared Bell pair in addition to the input qubit.
Those are two extra qubits (one with Alice, one with Bob).

2 extra qubits.

6. Qiskit state: h(0); cx(0,1); cx(1,2)


Starting from |000⟩:
H CNOT CNOT
0
|000⟩ −−→ √1 (|0⟩ + |1⟩) |00⟩ −−−−−0→1
−→ √1 (|00⟩ + |11⟩) |0⟩ −−−−−1→2
−→ √1 (|000⟩ + |111⟩).
2 2 2


Answer: the GHZ state (|000⟩ + |111⟩)/ 2.

7. Where are plot histogram, plot bloch vector, plot state city?
These visualization utilities are provided by qiskit.visualization.

qiskit.visualization.

8. IBM Quantum Experience: upload custom algorithm for


primitives
User-defined algorithms that run via primitives (as managed programs) are handled under
Runtime Programs. That’s where you register and manage custom programs to be called by
jobs.
Runtime Programs.

9. What does the Qiskit transpiler do?


The transpiler optimizes circuits (e.g., gate cancellation, depth reduction) and maps them to a
specific backend’s coupling graph and native gate set, inserting SWAPs and basis translations
as needed.
Optimizes and maps circuits to a backend topology.

10. Qiskit state: h(0); cx(0,1); x(1)


From |00⟩:
H CNOT X
0
|00⟩ −−→ √1 (|0⟩ + |1⟩) |0⟩ −−−−−0→1
−→ √1 (|00⟩ 1
+ |11⟩) −−→ √1 (|01⟩ + |10⟩).
2 2 2


Answer: (|01⟩ + |10⟩)/ 2.

You might also like