UQC

Final Project

Capstone

Putting it all together. Build a quantum random number generator and a simple classifier using everything you've learned.

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

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

01
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!

02
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⟩

You're done when

  • Circuit runs without errors
  • Random number generator produces a uniform distribution
  • You can explain what each gate does
  • You can predict approximate output probabilities before running

Build it

~30–45 minutes

Start Capstone Project

Reflection

  1. 01What was the most surprising thing you learned about quantum computing today?
  2. 02How would you explain quantum superposition to a non-technical friend?
  3. 03What 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? Pop these open.

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

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