Skip to main content

Quantum Computing Basics: Qubits, Basis, and Probability


Quantum Computing Fundamentals

Understanding qubits, basis, Hadamard transform, and quantum probability

1. Qubit (quantum bit)

A qubit is a unit vector in a 2-dimensional complex Hilbert space:

\[ |\psi\rangle = \alpha |0\rangle + \beta |1\rangle \]

where

\[ \alpha, \beta \in \mathbb{C}, \quad |\alpha|^2 + |\beta|^2 = 1 \]

  • \(|0\rangle, |1\rangle\) are basis states
  • \(|\alpha|^2\) = probability of measuring 0
  • \(|\beta|^2\) = probability of measuring 1

2. Basis (measurement basis)

A basis is a set of orthonormal vectors used to describe or measure a qubit.

(a) Computational (Z) basis

\[ |0\rangle = \begin{pmatrix} 1 \\ 0 \end{pmatrix}, \quad |1\rangle = \begin{pmatrix} 0 \\ 1 \end{pmatrix} \]

Measurement probabilities:

\[ P(0) = |\langle 0|\psi\rangle|^2 = |\alpha|^2 \]

\[ P(1) = |\langle 1|\psi\rangle|^2 = |\beta|^2 \]

(b) Hadamard (X) basis

\[ |+\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}}, \quad |-\rangle = \frac{|0\rangle - |1\rangle}{\sqrt{2}} \]

Same qubit, different description:

\[ |\psi\rangle = c_+ |+\rangle + c_- |-\rangle \]

3. Basis change (Hadamard transform)

The Hadamard gate:

\[ H = \frac{1}{\sqrt{2}} \begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix} \]

Example:

\[ H|0\rangle = |+\rangle, \quad H|1\rangle = |-\rangle \]

4. Why basis matters (quantum communication)

  • Measuring in the wrong basis gives random outcomes
  • Non-commuting bases: \[ [Z, X] \neq 0 \]
  • Used in protocols like BB84 for eavesdropping detection
A qubit is a vector; a basis is the coordinate system you choose to measure it.

5. Why Hadamard are used?

  • Hadmard is used to keep the total probality value 1 because practically probabity cannot be greter than 1. If we do not apply Hadamard then probability of P(0) + P(1) could be 2 (max). Hadamard limts it to P(0) + P(1) = 1/2 + 1/2 = 1 (max)

6. Amplitude and Probability in Quantum Mechanics

In the above you observe the probabity of qbits are directly proportional to their amplitude. Surprised? You should know that the probabily of dection of a wave increases as the legth of wavelength increases. It is a natural phenomena

Amplitude becomes probability by squaring its size.

That rule is called the Born rule.

What is an amplitude? (In general)

  • a signed size (can be + or −)
  • or a length of an arrow

It is not a probability.

Why amplitude cannot be probability

Amplitudes can be:

  • negative
  • complex (in advanced cases)

Probabilities must:

  • be positive
  • be between 0 and 1

So we need a way to turn:

+ or − → always positive
      

The rule that does this

\[ \text{probability} = |\text{amplitude}|^2 \]

This is not chosen by us — experiments confirm it. This rule is the Born rule.

Simple number example

Amplitude for 0:

\[ a = \frac{1}{\sqrt{2}} \]

Probability:

\[ P(0) = \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2} \]

Same for 1.

Why square and not something else?

  1. Removes minus signs \[ (-a)^2 = a^2 \]
  2. Makes probability always positive
  3. Preserves total probability: \[ a^2 + b^2 = 1 \]

No other simple rule does all three and matches experiments.

Everyday analogy

  • Wave height = amplitude
  • Energy ∝ (height)²

Double the wave height → 4× energy

Quantum probability behaves the same way.

Example: qubit

Suppose a qubit is:

\[ |\psi\rangle = \frac{|0\rangle + |1\rangle}{\sqrt{2}} \]

  • Amplitude for 0: \(\psi_0 = \frac{1}{\sqrt{2}}\)
  • Amplitude for 1: \(\psi_1 = \frac{1}{\sqrt{2}}\)

Probability of measuring 0:

\[ P(0) = |\psi_0|^2 = \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2} \]

Probability of measuring 1:

\[ P(1) = |\psi_1|^2 = \left(\frac{1}{\sqrt{2}}\right)^2 = \frac{1}{2} \]

Further Reading

People are good at skipping over material they already know!

View Related Topics to







Contact Us

Name

Email *

Message *

Popular Posts

Periodogram in MATLAB

Power Spectral Density Estimation Using the Periodogram Step 1: Signal Representation Let the signal be x[n] , where: n = 0, 1, ..., N-1 (discrete-time indices), N is the total number of samples. Step 2: Compute the Discrete-Time Fourier Transform (DTFT) The DTFT of x[n] is: X(f) = ∑ x[n] e -j2Ï€fn For practical computation, the Discrete Fourier Transform (DFT) is used: X[k] = ∑ x[n] e -j(2Ï€/N)kn , k = 0, 1, ..., N-1 k represents discrete frequency bins, f_k = k/N * f_s , where f_s is the sampling frequency. Step 3: Compute Power Spectral Density (PSD) The periodogram estimates the PSD as: S_x(f_k) = (1/N) |X[k]|² S_x(f_k) ...

Constellation Diagram of ASK in Detail

A binary bit '1' is assigned a power level of E b \sqrt{E_b}  (or energy E b E_b ), while a binary bit '0' is assigned zero power (or no energy).   Simulator for Binary ASK Constellation Diagram SNR (dB): 15 Run Simulation Noisy Modulated Signal (ASK) Original Modulated Signal (ASK) Energy per bit (Eb) (Tb = bit duration): We know that all periodic signals are power signals. Now we’ll find the energy of ASK for the transmission of binary ‘1’. E b = ∫ 0 Tb (A c .cos(2П.f c .t)) 2 dt = ∫ 0 Tb (A c ) 2 .cos 2 (2П.f c .t) dt Using the identity cos 2 x = (1 + cos(2x))/2: = ∫ 0 Tb ((A c ) 2 /2)(1 + cos(4П.f c .t)) dt ...

MATLAB Code for Rms Delay Spread

RMS delay spread is crucial when you need to know how much the signal is dispersed in time due to multipath propagation, the spread (variance) around the average. In high-data-rate systems like LTE, 5G, or Wi-Fi, even small time dispersions can cause ISI. RMS delay spread is directly related to the amount of ISI in such systems. RMS Delay Spread [↗] Delay Spread Calculator Enter delays (ns) separated by commas: Enter powers (dB) separated by commas: Calculate   The above calculator Converts Power to Linear Scale: It correctly converts the power values from decibels (dB) to a linear scale. Calculates Mean Delay: It accurately computes the mean excess delay, which is the first moment of the power delay profile. Calculates RMS Delay Spread: It correctly calculates the RMS delay spread, defined as the square root of the second central moment of the power delay profile.   MATLAB Code  clc...

Online Simulator for ASK, FSK, and PSK

Try our new Digital Signal Processing Simulator!   Start Simulator for binary ASK Modulation Message Bits (e.g. 1,0,1,0) Carrier Frequency (Hz) Sampling Frequency (Hz) Run Simulation Simulator for binary FSK Modulation Input Bits (e.g. 1,0,1,0) Freq for '1' (Hz) Freq for '0' (Hz) Sampling Rate (Hz) Visualize FSK Signal Simulator for BPSK Modulation ...

UGC NET Electronic Science Previous Year Question Papers

Home / Engineering & Other Exams / UGC NET 2022: Previous Year Question Papers ... UGC-NET (Electronics Science, Subject code: 88) UGC Net Electronic Science Question Paper With Answer Key Download Pdf [December 2024]  UGC Net Paper 1 With Answer Key Download Pdf [Sep 2024] with full explanation UGC Net Electronic Science Question Paper With Answer Key Download Pdf [Sep 2024]  UGC Net Paper 1 With Answer Key Download Pdf [June 2023] with full explanation UGC Net Electronic Science Question Paper With Answer Key Download Pdf [December 2023] with full explanation UGC Net Electronic Science Question Paper With Answer Key Download Pdf [June 2023] UGC Net Electronic Science Question Paper With Answer Key Download Pdf [December 2022] UGC Net Electronic Science Question Paper With Answer Key Download Pdf [June 2022] UGC Net Electronic Science Question Paper With Answer Key Download Pdf [December 2021] ...

MATLAB Code for ASK, FSK, and PSK

📘 Overview & Theory 🧮 MATLAB Code for ASK 🧮 MATLAB Code for FSK 🧮 MATLAB Code for PSK 🧮 Simulator for binary ASK, FSK, and PSK Modulations 📚 Further Reading ASK, FSK & PSK HomePage MATLAB Code MATLAB Code for ASK Modulation and Demodulation % The code is written by SalimWireless.Com % Clear previous data and plots clc; clear all; close all; % Parameters Tb = 1; % Bit duration (s) fc = 10; % Carrier frequency (Hz) N_bits = 10; % Number of bits Fs = 100 * fc; % Sampling frequency (ensure at least 2*fc, more for better representation) Ts = 1/Fs; % Sampling interval samples_per_bit = Fs * Tb; % Number of samples per bit duration % Generate random binary data rng(10); % Set random seed for reproducibility binary_data = randi([0, 1], 1, N_bits); % Generate random binary data (0 or 1) % Initialize arrays for continuous signals t_overall = 0:Ts:(N_bits...

Comparisons among ASK, PSK, and FSK | And the definitions of each

📘 Comparisons among ASK, FSK, and PSK 🧮 Online Simulator for calculating Bandwidth of ASK, FSK, and PSK 🧮 MATLAB Code for BER vs. SNR Analysis of ASK, FSK, and PSK 📚 Further Reading 📂 View Other Topics on Comparisons among ASK, PSK, and FSK ... 🧮 Comparisons of Noise Sensitivity, Bandwidth, Complexity, etc. 🧮 MATLAB Code for Constellation Diagrams of ASK, FSK, and PSK 🧮 Online Simulator for ASK, FSK, and PSK Generation 🧮 Online Simulator for ASK, FSK, and PSK Constellation 🧮 Some Questions and Answers Modulation ASK, FSK & PSK Constellation MATLAB Simulink MATLAB Code Comparisons among ASK, PSK, and FSK    Comparisons among ASK, PSK, and FSK Comparison among ASK, FSK, and PSK Parameters ASK FSK PSK Variable Characteristics Amplitude Frequency ...

BER vs SNR for M-ary QAM, M-ary PSK, QPSK, BPSK, ...

📘 Overview of BER and SNR 🧮 Online Simulator for BER calculation of m-ary QAM and m-ary PSK 🧮 MATLAB Code for BER calculation of M-ary QAM, M-ary PSK, QPSK, BPSK, ... 📚 Further Reading 📂 View Other Topics on M-ary QAM, M-ary PSK, QPSK ... 🧮 Online Simulator for Constellation Diagram of m-ary QAM 🧮 Online Simulator for Constellation Diagram of m-ary PSK 🧮 MATLAB Code for BER calculation of ASK, FSK, and PSK 🧮 MATLAB Code for BER calculation of Alamouti Scheme 🧮 Different approaches to calculate BER vs SNR What is Bit Error Rate (BER)? The abbreviation BER stands for Bit Error Rate, which indicates how many corrupted bits are received (after the demodulation process) compared to the total number of bits sent in a communication process. BER = (number of bits received in error) / (total number of tran...