Skip to main content

Command Palette

Search for a command to run...

Building Your First Quantum App with SwiftQuantum

Updated
3 min read
Building Your First Quantum App with SwiftQuantum
E

I'm a full-stack developer with 5+ years of experience, specializing in iOS development and emerging technologies. My journey started with art studies but evolved into a passion for creating digital solutions. Currently, I'm pioneering quantum computing in mobile development through my open-source SwiftQuantum library, making quantum algorithms accessible to iOS developers. Recent Highlights:

Won Excellence Award at 2024 Open Data Forum for "Woorinara" - a public service app for foreign residents Developed government-supported blockchain applications for Korea's Ministry of Science and ICT Created AI-powered startup platforms and real-time streaming services

I focus on bridging advanced technologies with practical applications, from quantum computing concepts to citizen-focused government services. My work spans iOS native development, cross-platform solutions, and full-stack web applications. Core Philosophy: Making complex technologies accessible and solving real-world problems through clean, maintainable code. Background: Self-taught developer who transitioned from fine arts, bringing a unique perspective to user experience design and technical problem-solving. Connect with me on LinkedIn or explore my quantum computing work at SwiftQuantum.

Building Your First Quantum App with SwiftQuantum

In the previous post, I introduced SwiftQuantum — a quantum computing ecosystem built natively for iOS. Today, we go hands-on.

This post walks through what it actually looks like to build and simulate quantum circuits on an iPhone. No Python. No terminal. Just SwiftUI and your fingertip.


Step 1: Choose Your Persona

When you first launch SwiftQuantum IDE, you pick a persona: Executive, Developer, Investor, or Parent. The app adapts its interface complexity, terminology, and default views based on your selection.

A Developer sees raw gate matrices and OpenQASM output. An Executive sees high-level circuit summaries and business impact metrics.


Step 2: Build a Circuit

The circuit editor gives you a palette of 15+ quantum gates: Hadamard (H), Pauli-X/Y/Z, CNOT, CZ, SWAP, Toffoli, S, T, and rotation gates (Rx, Ry, Rz).

Drag a Hadamard gate onto qubit 0. That puts the qubit into superposition — equal probability of measuring 0 or 1.

Now drag a CNOT gate connecting qubit 0 (control) to qubit 1 (target). You have just created a Bell state — the simplest form of quantum entanglement.

Two qubits. Two gates. The foundation of quantum teleportation, superdense coding, and error correction.


Step 3: Visualize

Tap "Run" and SwiftQuantum simulates your circuit in real time.

Bloch Sphere — A 3D globe showing the state of each qubit. North pole is |0>, south pole is |1>. After a Hadamard gate, the state vector points to the equator — perfect superposition. You can rotate the sphere with your finger.

Probability Histogram — Bar chart showing measurement outcome probabilities. For a Bell state, you see two bars of equal height: |00> and |11>. Never |01> or |10>. That is entanglement visualized.

State Vector — The full complex amplitude of every computational basis state. Phase information is color-coded. This is where you see the math behind the physics.


Step 4: Choose Your Engine

SwiftQuantum picks the simulation engine automatically based on your qubit count:

QubitsEngineSpeedTier
1-10Standard (Python)BaselineFree
11-20Turbo (Rust/C++)40x fasterPro
21-127HyperCore (Rust + Metal GPU)400x fasterTeam+

A 15-qubit GHZ state that takes 12 seconds on Standard completes in 0.3 seconds on Turbo.


Step 5: Export

When your circuit is ready, export it:

  • OpenQASM 2.0 — Industry standard format. Run it on IBM Quantum, Amazon Braket, or any QASM-compatible platform.
  • Qiskit Python — Copy-paste into a Jupyter notebook.
  • PNG/SVG — Clean circuit diagram for presentations and papers.
  • PDF — Publication-ready output.

Design on iPhone. Run on real quantum hardware through Q-Bridge.


Step 6: Error Correction

The QEC Decoder lets you simulate quantum error correction. Choose a Surface Code, set the code distance, inject random X and Z errors, and watch the syndrome extraction process identify and correct errors in real time.

This is not a textbook diagram. It is a working simulator.


What Comes Next

In the next post, I will cover Q-Bridge — how SwiftQuantum connects to real quantum hardware from IBM, IonQ, and Rigetti. Same circuit you just built on your phone, running on actual superconducting qubits.

Download SwiftQuantum IDE: App Store


Found a bug or have a suggestion? Leave a comment below — I will fix it immediately.

7 views

More from this blog

E

EUNMIN's Blog

10 posts

From iOS to Qubits: An Engineer's Quantum Journey