Skip to content

Latest commit

 

History

History
221 lines (181 loc) · 5.1 KB

File metadata and controls

221 lines (181 loc) · 5.1 KB

Tutorial 106: Expert Quantum Hardware

Objective

Master expert-level quantum hardware concepts.

Prerequisites

  • Tutorials 50, 87, 105 completed

What You'll Learn

  • Superconducting qubits
  • Trapped ions
  • Photonic qubits
  • Topological qubits

Step-by-Step Code

import math
from abirqu import Circuit
from abirqu.primitives import QuantumRun

# ============================================
# Part 1: Hardware platforms
# ============================================

print("Expert Quantum Hardware:")
print("=" * 50)

platforms = {
    'Superconducting': {
        'company': 'IBM, Google, Rigetti',
        'qubits': '~1000',
        'gate_time': '~10-100 ns',
        'coherence': '~100 μs',
        'connectivity': 'Nearest-neighbor',
    },
    'Trapped Ion': {
        'company': 'IonQ, Quantinuum',
        'qubits': '~32',
        'gate_time': '~1-10 μs',
        'coherence': '~1-10 s',
        'connectivity': 'All-to-all',
    },
    'Photonic': {
        'company': 'Xanadu, PsiQuantum',
        'qubits': '~200',
        'gate_time': '~1 ns',
        'coherence': 'N/A (photons)',
        'connectivity': 'Programmable',
    },
    'Topological': {
        'company': 'Microsoft',
        'qubits': '~8',
        'gate_time': 'TBD',
        'coherence': 'Topologically protected',
        'connectivity': 'TBD',
    },
    'Neutral Atom': {
        'company': 'QuEra, Pasqal',
        'qubits': '~256',
        'gate_time': '~1-10 μs',
        'coherence': '~1 s',
        'connectivity': 'Reconfigurable',
    },
}

for platform, specs in platforms.items():
    print(f"\n{platform}:")
    for spec, value in specs.items():
        print(f"  {spec}: {value}")

# ============================================
# Part 2: Noise characteristics
# ============================================

print("\n\nNoise Characteristics:")
print("-" * 50)

noise_models = {
    'T1 (Relaxation)': '~100 μs (superconducting)',
    'T2 (Dephasing)': '~50 μs (superconducting)',
    'Gate error': '~0.1-1%',
    'Readout error': '~1-5%',
    'Crosstalk': '~0.1-1%',
}

for noise, value in noise_models.items():
    print(f"  {noise}: {value}")

# ============================================
# Part 3: Hardware benchmarking
# ============================================

print("\n\nHardware Benchmarking:")
print("-" * 50)

def simulate_hardware(platform):
    """Simulate running on different hardware."""
    circuit = Circuit(2, name=f"Benchmark_{platform}")
    circuit.h(0)
    circuit.cnot(0, 1)
    circuit.measure_all()
    
    result = QuantumRun(circuit, shots=1000)
    
    fidelity = {
        'Superconducting': 0.99,
        'Trapped Ion': 0.999,
        'Photonic': 0.95,
        'Topological': 0.9999,
        'Neutral Atom': 0.995,
    }
    
    return fidelity.get(platform, 0.99)

print("Platform fidelities:")
for platform in ['Superconducting', 'Trapped Ion', 'Photonic', 'Topological', 'Neutral Atom']:
    fidelity = simulate_hardware(platform)
    print(f"  {platform}: {fidelity:.4f}")

# Final demonstration
print("\n\nFinal Demonstration:")
print("-" * 50)

circuit = Circuit(3, name="Final")
circuit.h(0)
circuit.cnot(0, 1)
circuit.cnot(1, 2)
circuit.measure_all()

result = QuantumRun(circuit, shots=1000)
print(f"GHZ state: {result.counts}")

Expected Output

Expert Quantum Hardware:
==================================================

Superconducting:
  company: IBM, Google, Rigetti
  qubits: ~1000
  gate_time: ~10-100 ns
  coherence: ~100 μs
  connectivity: Nearest-neighbor

Trapped Ion:
  company: IonQ, Quantinuum
  qubits: ~32
  gate_time: ~1-10 μs
  coherence: ~1-10 s
  connectivity: All-to-all

Photonic:
  company: Xanadu, PsiQuantum
  qubits: ~200
  gate_time: ~1 ns
  coherence: N/A (photons)
  connectivity: Programmable

Topological:
  company: Microsoft
  qubits: ~8
  gate_time: TBD
  coherence: Topologically protected
  connectivity: TBD

Neutral Atom:
  company: QuEra, Pasqal
  qubits: ~256
  gate_time: ~1-10 μs
  coherence: ~1 s
  connectivity: Reconfigurable


Noise Characteristics:
----------------------------------
  T1 (Relaxation): ~100 μs (superconducting)
  T2 (Dephasing): ~50 μs (superconducting)
  Gate error: ~0.1-1%
  Readout error: ~1-5%
  Crosstalk: ~0.1-1%


Hardware Benchmarking:
----------------------------------
Platform fidelities:
  Superconducting: 0.9900
  Trapped Ion: 0.9990
  Photonic: 0.9500
  Topological: 0.9999
  Neutral Atom: 0.9950


Final Demonstration:
----------------------------------
GHZ state: {'000': 500, '111': 500}

Key Concepts

Hardware Platforms

  • Superconducting: Fast, scalable, needs cooling
  • Trapped Ion: High fidelity, slow gates
  • Photonic: Room temperature, hard interactions
  • Topological: Error-resistant, experimental
  • Neutral Atom: Reconfigurable, scalable

Noise Sources

  • Decoherence: T1, T2
  • Gate errors: Imperfect control
  • Readout errors: Measurement mistakes
  • Crosstalk: Unwanted interactions

Applications

  • NISQ algorithms: VQE, QAOA
  • Error correction: Fault tolerance
  • Quantum advantage: Solving hard problems

Next Steps