Skip to content

pri-2711/Quantum_circuits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QUANTUM ENTANGLEMENT (2-Qubit System)

Entanglement is represented using Bell States.

Circuits:

Perfect Correlation: 6 (phi +), 7 (phi -)

Perfect Anti-correlation: 8 (psi +), 9 (psi -)

1. Φ⁺ (Phi-plus)

Formula:
image

Nature:
Perfect correlation → measurements are always the same (00 or 11).


2. Φ⁻ (Phi-minus)

Formula:
image

Nature:
Perfect correlation + phase shift → same outcomes (00, 11), but negative phase changes interference behavior.


3. Ψ⁺ (Psi-plus)

Formula:
image

Nature:
Perfect anti-correlation → measurements are always opposite (01 or 10).


4. Ψ⁻ (Psi-minus)

Formula:
image

Nature:
Perfect anti-correlation + phase shift → opposite outcomes (01, 10) with negative phase affecting interference.


QUANTUM ENTANGLEMENT (3-Qubit System)

Circuit: 10 (GHZ state for 3 qubits)

GHZ States- (Greenberger-Horne-Zeilinger states) represent type of multi-quvit entangled state, ususally 3 or more qubits, hence show entanglement shared across all qubits together. These states are more fraglie since measuring or loosing 1 qubit can destory entanglement of whole system. They demonstrate Global Correlations, showing full anti-correlation is impossible.


QUANTUM TELEPORTATION (3-Qubit System)

Circuit: 11 (teleportation using 3 qubits)

Transfers a quantum state using entanglement + classical bits.


1. Prepare Message State

Apply:

H(q₀)

State:

image

Nature: Creates state ψ to teleport.


2. Create Entangled Pair

Apply:

H(q₁) → CNOT(q₁→q₂)

Nature: Forms Bell pair between q₁ and q₂.


3. Encode Message

Apply:

CNOT(q₀→q₁)
H(q₀)

Nature: Mixes message with entangled system.


4. Measure

Measure:

q₀, q₁ → 00 / 01 / 10 / 11

Nature: Produces 2 classical bits.


5. Send & Correct

Possible corrections on q₂:

00 → I
01 → X
10 → Z
11 → XZ

Nature: Recovers original state ψ.


Final

Initial:
q₀ = ψ
q₂ = |0⟩

Final:
q₀ → measured
q₂ = ψ

Nature: State transferred; original destroyed (No-Cloning preserved).


DEUTSCH ALGORITHM (2-Qubit System)

Circuit: 12 First quantum algorithm showing quantum speedup.


Purpose

Determines whether a hidden function is:

Constant  → same outputs
Balanced  → different outputs

using only 1 oracle query through superposition + interference.


Classical vs Quantum

Classical

Need f(0) and f(1)
→ 2 evaluations

Quantum

Processes both inputs simultaneously using superposition.


1. Initial State

q₀ = |0⟩
q₁ = |1⟩

Apply:

H(q₀)
X(q₁)
H(q₁)

State:

q₀ → (|0⟩ + |1⟩)/√2
q₁ → (|0⟩ - |1⟩)/√2

Nature: Creates superposition of both inputs.


2. Oracle (Uf)

Oracle:

Uf|x,y⟩ = |x, y⊕f(x)⟩

For balanced function:

f(x)=x

Oracle becomes:

CNOT(q₀ → q₁)

Nature: Encodes function using phase kickback.


3. Interference

Apply:

H(q₀)

Nature: Interference removes wrong possibilities and keeps correct result.


4. Measurement

Measure:

q₀

Result:

0 → Constant
1 → Balanced

Final

Classical → 2 evaluations
Quantum   → 1 oracle query

Nature: Shows how quantum computers use superposition + interference for faster computation.


QUANTUM RANDOM NUMBER GENERATOR (QRNG)

Circuit 13 (1 Qubit: generates random numbers between 0 to 1)

Circuit 14 (2 Qubit: generates random numbers between 0 to 3 i.e. 00, 01, 10, 11)

Classical computers generate pseudo-random numbers since algorithm's internal state is unknown.

But quantum measurement gives true randomness using superposition and measurement as the randomness comes from nature of quantum physics.

About

This repo contains various quantum circuits along with algorithms that make the foundation for quantum computing & quantum information

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors