First time studying this topic?

Launch the interactive walkthrough to discover each component, including the 3D Q-Sphere Lab & Python in Colab.

Topic 1.2

What is Artificial Intelligence?

Unpack the definition, scope, and spectrum of Artificial Intelligence from narrow systems to general intelligence.

Learning Objectives

  • βœ“Define Artificial Intelligence in both conceptual and technical contexts
  • βœ“Distinguish between Narrow AI (ANI), General AI (AGI), and Super AI (ASI)
  • βœ“Understand the Turing Test and how intelligence is evaluated in machines
  • βœ“Differentiate between symbolic AI and statistical learning systems

πŸ“–Let's Begin with a Story

In 1950, British mathematician Alan Turing posed a deceptively simple question: "Can machines think?" At the time, computers filled entire rooms and could barely compute ballistics tables. Turing proposed an imitation game: if a human judge, communicating solely through typed text, could not reliably tell whether they were conversing with a human or a machine, the machine could be said to exhibit intelligent behavior. Six years later, at the 1956 Dartmouth Summer Research Project, John McCarthy coined the term "Artificial Intelligence." Today, machines beat world chess grandmasters, generate photorealistic art, and translate languages in real time. Yet, the core question Turing asked still guides the philosophy of computing: how closely can artificial algorithms mirror human cognitive faculties?

Why Should You Learn What is Artificial Intelligence??

🎯 Practical & Engineering Stakes
1. Cut through marketing hype: Many commercial tools labeled "AI" are merely standard decision trees or heuristic rules. Understanding true AI helps you critically evaluate modern software. 2. Recognize AI boundaries: Knowing the difference between Narrow AI and General AI keeps expectations realistic and helps avoid irrational panic or unwarranted overconfidence. 3. Foundation for all advanced coursework: Every sub-disciplineβ€”from computer vision to natural language processingβ€”derives from foundational AI principles.

What Is It?

Simple Explanation

Artificial Intelligence is the science of creating software and machines that can perform tasks that would normally require a human mind. This includes understanding spoken words, recognizing faces in pictures, playing strategic games, making decisions under uncertainty, and learning from experience rather than following a rigid step-by-step checklist.

Technical Explanation

Artificial Intelligence (AI) encompasses computational paradigms designed to synthesize rational agent architectures capable of perception, knowledge representation, heuristic search, automated inference, and adaptive learning. Formally, an intelligent agent maps environmental percept sequences to actions: f:Pβˆ—β†’Af: P^* \rightarrow A, maximizing an objective performance measure under epistemic uncertainty.

πŸ“š Key Terms

Artificial Narrow Intelligence (ANI)

Simple: AI designed to excel at one specific task, like playing chess or diagnosing skin lesions.
Technical: Specialized machine intelligence configured to optimize an objective function within a strictly bounded problem domain without cross-domain transference.

Artificial General Intelligence (AGI)

Simple: A hypothetical machine that can understand, learn, and apply knowledge across any intellectual task just like a human.
Technical: A theoretical agent possessing broad cognitive competencies including causal reasoning, abstraction, common sense, and autonomous transfer learning across arbitrary domains.

Rational Agent

Simple: A system that takes the best possible action based on what it knows and what it wants to achieve.
Technical: An autonomous entity that perceives its environment through sensors and acts upon it via actuators to maximize expected utility given its perceptual history.

Turing Test

Simple: A test where a person chats with a hidden computer and human to see if they can tell which is which.
Technical: An operational test of machine intelligence proposed by Alan Turing (1950) evaluating whether human evaluators can discern machine-generated linguistic responses from human dialogue.

πŸ“ Mathematical Foundation

LaTeX KaTeX
f:Pβˆ—β†’Af: \mathcal{P}^* \rightarrow \mathcal{A}

What does it mean?

The fundamental mathematical definition of an AI agent function: it maps any sequence of perceptual observations (P*) to an action (A).

Understanding the Symbols

Symbol / TermMeaningBeginner Interpretation
ffAgent functionThe decision-making program or policy inside the AI
Pβˆ—\mathcal{P}^*Percept historyAll past and present sensory inputs received from the environment
A\mathcal{A}Action spaceThe set of possible actions the agent can choose to execute

πŸ“Š Numerical Example

An autonomous vacuum receives a bumper sensor hit percept P and chooses a turn action A.

f([clean_floor, obstacle_detected]) = rotate_90_degrees_right

Result: Agent changes direction to avoid collision

βš™οΈ How Does It Work?

1

Sensing (Perception)

The AI ingests data from its environment via cameras, microphones, database logs, API streams, or tactile sensors.

2

Representation & Reasoning

The incoming signals are converted into mathematical representations (vectors, embeddings, graphs) where patterns and constraints are evaluated.

3

Decision Formulation

An optimization algorithm or inference engine selects the action or prediction with the highest expected reward or probability of correctness.

4

Actuation & Feedback

The chosen action is executed in the environment, and the system records the resulting outcome to refine future predictions.

🌍 Where Is It Used?

Autonomous Navigation (Waymo / Tesla)

Problem: Safe driving requires processing thousands of visual cues, pedestrians, and traffic signals per second.

Solution: AI fuses LiDAR, radar, and computer vision inputs to predict vehicular trajectories and steer vehicles safely without human intervention.

Medical Image Classification

Problem: Radiologists must review hundreds of dense CT scans daily, risking diagnostic fatigue and missed early-stage tumors.

Solution: Deep learning models trained on millions of annotated scans flag micro-nodules and anomalies with sub-millimeter precision in seconds.

🎯 Try It Yourself

A software system can translate 50 human languages with 98% accuracy, but cannot answer basic math questions or play tic-tac-toe. What type of AI is this?

Interactive activity component

🐍 Python Hands-On: Lesson 1: First Steps from Classical Prediction to a One-Qubit Quantum Circuit

Bridge classical linear regression prediction with quantum state generation using Qiskit Hadamard superposition and measurement on Aer simulator.

Open Colab

1Install Required Packages

For Google Colab or Jupyter notebooks, run this shell command to install the required dependencies:

Terminal / Notebook Install Commandbash
!pip install scikit-learn numpy qiskit qiskit-aer
Packages:
scikit-learnnumpyqiskitqiskit-aer

2Import Libraries

Import Statementspython
1from sklearn.linear_model import LinearRegression
2import numpy as np
3from qiskit import QuantumCircuit
4from qiskit_aer import Aer

from sklearn.linear_model import LinearRegression β†’ Classical ML linear regression model

import numpy as np β†’ Numerical vector and matrix computations

from qiskit import QuantumCircuit β†’ Assemble quantum circuits in Qiskit

from qiskit_aer import Aer β†’ Qiskit Aer quantum simulator backend

3Demonstration Code & Logic

Python Execution Codepython
1# --- Part 1: Classical Machine Learning Prediction ---
2X = np.array([1, 2, 3, 4, 5]).reshape(-1, 1)
3y = np.array([2, 4, 6, 8, 10])
4
5# Train Classical Linear Regression Model
6model = LinearRegression()
7model.fit(X, y)
8prediction = model.predict([[8]])
9print(f"Classical ML Prediction for X=8: {prediction[0]:.1f}")
10
11# --- Part 2: Quantum Computing 1-Qubit Circuit ---
12qc = QuantumCircuit(1, 1)
13qc.h(0)
14qc.measure(0, 0)
15
16# Simulate using Aer simulator
17simulator = Aer.get_backend('aer_simulator')
18job = simulator.run(qc, shots=1000)
19result = job.result()
20counts = result.get_counts()
21print(f"Quantum Measurement Counts: {counts}")
Step-by-Step Code Breakdown:

# --- Part 1: Classical Machine Learning Prediction ---

Section header

X = np.array([1, 2, 3, 4, 5]).reshape(-1, 1)

Input feature data matrix (reshaped to 2D)

y = np.array([2, 4, 6, 8, 10])

Target labels following y = 2x relation

# Train Classical Linear Regression Model

Fit model to training points

model = LinearRegression()

Instantiate estimator

model.fit(X, y)

Fit line via Ordinary Least Squares

prediction = model.predict([[8]])

Predict output for X=8

print(f"Classical ML Prediction for X=8: {prediction[0]:.1f}")

Display predicted value (16.0)

# --- Part 2: Quantum Computing 1-Qubit Circuit ---

Section header

qc = QuantumCircuit(1, 1)

Allocate 1 quantum bit and 1 classical readout bit

qc.h(0)

Apply Hadamard gate to create 50/50 superposition

qc.measure(0, 0)

Projectively measure qubit 0 into classical bit 0

# Simulate using Aer simulator

Configure simulator

simulator = Aer.get_backend('aer_simulator')

Load Aer simulator

job = simulator.run(qc, shots=1000)

Execute 1,000 measurement shots

result = job.result()

Collect simulation results

counts = result.get_counts()

Extract measurement frequency distribution

print(f"Quantum Measurement Counts: {counts}")

Print outcome tally (approx 500 for 0 and 500 for 1)

πŸ“‹ Complete Script (All-in-One)

Click "Copy for Colab", open Google Colab, paste into a single cell, and run.

Google Colab Notebook Scriptpython
1# =========================================================
2# Lesson 1: First Steps from Classical Prediction to a One-Qubit Quantum Circuit
3# Prepared for Google Colab (Run with Shift + Enter)
4# =========================================================
5
6# Step 1: Install required packages
7!pip install scikit-learn numpy qiskit qiskit-aer
8
9# Step 2: Import libraries
10from sklearn.linear_model import LinearRegression
11import numpy as np
12from qiskit import QuantumCircuit
13from qiskit_aer import Aer
14
15# Step 3: Run Demonstration
16# --- Part 1: Classical Machine Learning Prediction ---
17X = np.array([1, 2, 3, 4, 5]).reshape(-1, 1)
18y = np.array([2, 4, 6, 8, 10])
19
20# Train Classical Linear Regression Model
21model = LinearRegression()
22model.fit(X, y)
23prediction = model.predict([[8]])
24print(f"Classical ML Prediction for X=8: {prediction[0]:.1f}")
25
26# --- Part 2: Quantum Computing 1-Qubit Circuit ---
27qc = QuantumCircuit(1, 1)
28qc.h(0)
29qc.measure(0, 0)
30
31# Simulate using Aer simulator
32simulator = Aer.get_backend('aer_simulator')
33job = simulator.run(qc, shots=1000)
34result = job.result()
35counts = result.get_counts()
36print(f"Quantum Measurement Counts: {counts}")
⚑ How to Run in Google Colab (3 Quick Steps)
  1. Click "Copy for Google Colab" above.
  2. Click Open New Google Colab Notebook (opens in a new tab).
  3. Click on the first empty code cell, press Ctrl + V (or Cmd + V) to paste, then press Shift + Enter to execute!

πŸ”„ Algorithmic Execution Flow

1
Classical ML Training

Train a Scikit-Learn linear regression model on feature vector X and label vector y.

β†’
2
Classical Prediction

Evaluate unseen input X=8 to observe deterministic output y=16.0.

β†’
3
Quantum Circuit Construction

Construct a 1-qubit circuit and apply a Hadamard gate to put the qubit in superposition.

β†’
4
Quantum Simulation

Execute 1,000 measurement shots on AerSimulator to demonstrate probabilistic collapse.

πŸ“₯ Input / Initial State
Classical: X=8; Quantum: QuantumCircuit(1, 1) with H gate and measurement.
πŸ“€ Expected Output
Classical ML Prediction for X=8: 16.0
Quantum Measurement Counts: {'0': 512, '1': 488}
πŸ’‘ What Does This Demonstration Show?

Contrasts classical deterministic prediction with quantum probabilistic superposition, introducing the foundational shift from binary bits to qubits.

Course Learning Resource β€’ Slide DeckLesson 119 Slides

Lesson 1: First Steps in Quantum Computing

From Classical Prediction to a One-Qubit Quantum Circuit β€” Presentation by Dr. Syed Muzamil Basha.

Author: Dr. Syed Muzamil Bashaβ€’ FDP Approved Curriculum
Open in New Tab

πŸ“ Learning Check

Test your understanding with these questions. Remember, this is for learning, not examination!

Question 1: Which of the following best describes Artificial General Intelligence (AGI)?

Question 2: In artificial intelligence, what is a "rational agent"?

Question 3: What test did Alan Turing propose in 1950 to evaluate if a machine can exhibit intelligent behavior?

Question 4: An AI agent receives sensor readings [obstacle_detected, low_battery] and maps them to the action "return_to_dock". Which notation best represents this agent function?

Question 5: A spam filter uses explicit keyword rules like "If email contains VIAGRA β†’ mark as spam." A second system learns from 500,000 example emails. Which is symbolic AI and which is statistical AI?

Question 6: Which of the following correctly orders the three levels of AI from most limited to most capable?

Question 7: GPT-4 can write code, compose poetry, and answer medical questions. Despite its broad capability, why is it still classified as Narrow AI (ANI) rather than AGI?

Question 8: John McCarthy coined the term "Artificial Intelligence" at which landmark event?