UQC

Final Project

Capstone

Putting it all together

Your Mission

Build a complete quantum circuit that demonstrates your understanding of:

  • Qubit initialization
  • Superposition with Hadamard gates
  • Entanglement with CNOT gates
  • Measurement and result analysis

The Challenge

You will implement a quantum random number generator and a simple quantum classifier using the concepts you've learned.

Part 1: True Random Numbers

Create a circuit that generates truly random bits using superposition. Unlike classical "random" numbers, quantum randomness is fundamentally unpredictable.

Quantum Random Number Generator

Generate truly random bits using quantum superposition!

|0⟩
H
× 8
Click generate to create random bits

💡 Unlike pseudo-random numbers, quantum randomness is fundamentally unpredictable — not even the universe "knows" the outcome until measurement!

Part 2: Quantum Classifier

Build a simple circuit that classifies input patterns using entanglement and measurement.

Quantum Pattern Classifier

A simple classifier using entanglement: same bits → A, different bits → B

Select input pattern:

|0
H
|0
InputH GateCNOTMeasure
Select a pattern and run the classifier

Classification Rules:

Class A
|00⟩, |11⟩
|
Class B
|01⟩, |10⟩

Success Criteria

1Circuit runs without errors
2Random number generator produces uniform distribution
3You can explain what each gate does
4You can predict approximate output probabilities before running

Capstone Exercise

30-45 minutes

Start Capstone Project

Reflection Questions

  • 1What was the most surprising thing you learned about quantum computing today?
  • 2How would you explain quantum superposition to a non-technical friend?
  • 3What problem would you want to solve with a quantum computer?

What You've Achieved

You've built real quantum circuits, understood core quantum concepts, and gained hands-on experience with quantum simulation. You can now talk about quantum computing with confidence and recognize its role in tomorrow's development. That's a significant achievement!

Solution Hints

Stuck on the capstone challenges? Here are some hints to help you along:

Part 1: Quantum Random Number Generator

Key steps:

  • Create a circuit with n qubits (n = number of random bits)
  • Apply Hadamard gate to each qubit to create superposition
  • Measure all qubits
  • Each measurement gives a truly random bit string!
qc = QuantumCircuit(4, 4)  # 4 qubits for 4 random bits
qc.h([0, 1, 2, 3])         # Superposition on all
qc.measure([0,1,2,3], [0,1,2,3])
Part 2: Quantum Classifier Approach

Key concepts:

  • Encode your input into qubit states
  • Use entanglement to create correlations
  • Measure to get classification result

A simple approach: Use CNOT gates where the control qubit encodes input and the target gives classification.

General Debugging Tips
  • Always draw your circuit with qc.draw('mpl')
  • Use shots=1000 for stable statistics
  • Check qubit indexing (Qiskit uses little-endian ordering)
  • Verify measurements are added before running