A comprehensive visual quantum circuit simulator with an intuitive drag-and-drop interface, built using Python (Qiskit) backend and Next.js (React) frontend. Create quantum circuits visually, simulate them in real-time, and visualize results with state vectors, probability distributions, and dual 3D Bloch sphere representations.
- Features
- Mathematical Foundations
- Supported Quantum Gates
- Technology Stack
- Prerequisites
- Setup Instructions
- Usage Guide
- Example Circuits
- API Reference
- Project Structure
- Development
- Troubleshooting
- Contributing
- License
- Visual Circuit Builder: Intuitive drag-and-drop interface for building quantum circuits
- Real-time Simulation: Powered by Qiskit for accurate quantum simulation
- Dual Bloch Sphere Visualization: Interactive 3D visualization of two-qubit states
- Step-by-Step Execution: Watch how your circuit evolves gate-by-gate with explanations
- Multiple Visualizations:
- State vector display in Dirac (ket) notation
- Probability distribution bar charts
- Dual 3D Bloch sphere representation for each qubit
- Entanglement detection and highlighting
- Comprehensive Gate Support: H, X, Y, Z, S, T, CNOT, and CZ gates with matrix tooltips
- Two-Qubit System: Full support for 2-qubit quantum circuits with entanglement capabilities
A qubit (quantum bit) is the fundamental unit of quantum information. Unlike classical bits that are either 0 or 1, a qubit exists in a superposition of both states simultaneously.
A single qubit state is represented as a vector in a 2-dimensional complex Hilbert space:
|Οβ© = Ξ±|0β© + Ξ²|1β©
Where:
|0β©and|1β©are the computational basis states (equivalent to classical 0 and 1)Ξ±andΞ²are complex probability amplitudes- The normalization condition must hold:
|Ξ±|Β² + |Ξ²|Β² = 1 |Ξ±|Β²is the probability of measuring the qubit in state|0β©|Ξ²|Β²is the probability of measuring the qubit in state|1β©
In vector notation:
|0β© = [1] |1β© = [0] |Οβ© = [Ξ±]
[0] [1] [Ξ²]
For a two-qubit system, the state vector lives in a 4-dimensional complex Hilbert space:
|Οβ© = Ξ±|00β© + Ξ²|01β© + Ξ³|10β© + Ξ΄|11β©
Where:
|00β©, |01β©, |10β©, |11β©are the four computational basis states- Normalization:
|Ξ±|Β² + |Ξ²|Β² + |Ξ³|Β² + |Ξ΄|Β² = 1 - Vector form:
|Οβ© = [Ξ±, Ξ², Ξ³, Ξ΄]α΅
Quantum gates are unitary operators that transform quantum states. A unitary operator U satisfies Uβ U = I, where Uβ is the conjugate transpose and I is the identity matrix. This ensures that quantum gates preserve the normalization of quantum states.
For single-qubit gates, they are represented by 2Γ2 unitary matrices. For two-qubit gates, they are 4Γ4 unitary matrices.
Superposition is the principle that a quantum system can exist in multiple states simultaneously until measured. The Hadamard gate is the most common gate for creating superposition:
H|0β© = 1/β2(|0β© + |1β©) = |+β©
H|1β© = 1/β2(|0β© - |1β©) = |-β©
This creates an equal superposition where the qubit has a 50% probability of being measured as 0 or 1.
Entanglement is a uniquely quantum phenomenon where two or more qubits become correlated in such a way that the state of one qubit cannot be described independently of the others.
The most famous example of entanglement is the Bell states. The Bell state Ξ¦βΊ can be created by:
|Ξ¦βΊβ© = 1/β2(|00β© + |11β©)
Circuit to create Bell state:
- Apply H gate to qubit 0: creates superposition 1/β2(|0β© + |1β©)
- Apply CNOT with control on qubit 0 and target on qubit 1
Mathematically:
Initial state: |00β©
After H on q0: 1/β2(|00β© + |10β©)
After CNOT: 1/β2(|00β© + |11β©) = |Ξ¦βΊβ©
In this entangled state:
- If we measure qubit 0 and get 0, qubit 1 will definitely be 0
- If we measure qubit 0 and get 1, qubit 1 will definitely be 1
- The correlation exists even though each individual qubit appears random!
For a two-qubit pure state |Οβ© = Ξ±|00β© + Ξ²|01β© + Ξ³|10β© + Ξ΄|11β©, the state is entangled if and only if:
|Ξ±Ξ΄ - Ξ²Ξ³| > 0
This is equivalent to saying the state cannot be written as a tensor product of two single-qubit states.
Matrix:
H = 1/β2 [ 1 1 ]
[ 1 -1 ]
Effect: Creates an equal superposition. Transforms:
|0β© β (|0β© + |1β©)/β2 = |+β©|1β© β (|0β© - |1β©)/β2 = |-β©
Use Case: Essential for creating superposition states and is used in nearly every quantum algorithm.
Matrix:
X = [ 0 1 ]
[ 1 0 ]
Effect: Bit flip (quantum NOT gate). Transforms:
|0β© β |1β©|1β© β |0β©
Use Case: Flips the computational basis states, analogous to classical NOT.
Matrix:
Y = [ 0 -i ]
[ i 0 ]
Effect: Bit flip combined with phase flip. Transforms:
|0β© β i|1β©|1β© β -i|0β©
Use Case: Rotation around the Y-axis of the Bloch sphere by Ο radians.
Matrix:
Z = [ 1 0 ]
[ 0 -1 ]
Effect: Phase flip. Transforms:
|0β© β |0β©|1β© β -|1β©
Use Case: Applies a phase of Ο to the |1β© state without changing probabilities.
Matrix:
S = [ 1 0 ]
[ 0 i ]
Effect: Applies a Ο/2 phase rotation. Equivalent to βZ.
|0β© β |0β©|1β© β i|1β©
Use Case: Quarter turn phase shift, useful in quantum Fourier transforms.
Matrix:
T = [ 1 0 ]
[ 0 e^(iΟ/4) ]
Effect: Applies a Ο/4 phase rotation. Equivalent to βS.
|0β© β |0β©|1β© β e^(iΟ/4)|1β©
Use Case: Eighth turn phase shift, forms a universal gate set with H and CNOT.
Matrix:
CNOT = [ 1 0 0 0 ]
[ 0 1 0 0 ]
[ 0 0 0 1 ]
[ 0 0 1 0 ]
Effect: Flips the target qubit if and only if the control qubit is |1β©.
Truth Table:
|00β© β |00β©
|01β© β |01β©
|10β© β |11β©
|11β© β |10β©
Use Case: Essential for creating entanglement. Forms a universal gate set with single-qubit rotations.
Matrix:
CZ = [ 1 0 0 0 ]
[ 0 1 0 0 ]
[ 0 0 1 0 ]
[ 0 0 0 -1 ]
Effect: Applies a phase flip to the |11β© state only.
Truth Table:
|00β© β |00β©
|01β© β |01β©
|10β© β |10β©
|11β© β -|11β©
Use Case: Symmetric two-qubit gate useful for phase-based entanglement and certain quantum algorithms.
- Python 3.8+: Core programming language
- Flask: Lightweight web framework for REST API
- Qiskit: IBM's open-source quantum computing framework
- Qiskit Aer: High-performance quantum circuit simulator
- NumPy: Numerical computing for vector operations
- Flask-CORS: Cross-origin resource sharing support
- Gunicorn: Production WSGI HTTP server
- Next.js 15: React framework with server-side rendering
- React 19: Component-based UI library
- Three.js: 3D graphics library for Bloch sphere visualization
- Plotly.js: Interactive plotting and charting
- Tailwind CSS: Utility-first CSS framework
- JavaScript ES6+: Modern JavaScript features
- RESTful API: Clean separation between frontend and backend
- Microservices: Independent frontend and backend deployments
- Real-time Simulation: Immediate feedback for circuit changes
- Progressive Enhancement: Step-by-step circuit execution with intermediate states
- Python 3.8 or higher: Required for backend quantum simulation
- pip: Python package manager (usually comes with Python)
- Node.js 18+: Required for Next.js frontend (if developing locally)
- npm or yarn: Node package manager
- Modern web browser: Chrome, Firefox, Safari, or Edge with WebGL support
git clone https://github.com/TabasKo0/quantum-circuit-simulation.git
cd quantum-circuit-simulationNavigate to the backend directory and install dependencies:
cd backend
pip install -r requirements.txtBackend Dependencies:
Flask: Web framework for REST APIflask-cors: CORS support for cross-origin requestsqiskit: Quantum computing frameworkqiskit-aer: Quantum circuit simulatornumpy: Numerical computinggunicorn: Production server
Start the Flask development server:
python app.pyThe backend API will be available at http://localhost:5000
API Endpoints:
POST /api/simulate: Simulate quantum circuitGET /api/health: Health check endpoint
Open a new terminal window and navigate to the frontend directory:
cd frontend
npm installFrontend Dependencies:
next: React frameworkreact&react-dom: React librariesthree: 3D graphics libraryplotly.js&react-plotly.js: Plotting librariestailwindcss: CSS framework
Start the Next.js development server:
npm run devThe frontend will be available at http://localhost:3000
Open your web browser and navigate to http://localhost:3000
- Drag Gates: From the Gate Palette on the left, drag quantum gates onto the circuit board
- Place Gates: Drop gates on either qubit line (q0 or q1) at any time step
- Two-Qubit Gates: CNOT and CZ gates automatically span both qubits
- The row you drop on becomes the control qubit
- The other row becomes the target qubit
- H (Hadamard): Creates superposition - 50/50 probability of 0 or 1
- X (Pauli-X): Bit flip - swaps |0β© and |1β©
- Y (Pauli-Y): Bit and phase flip combined
- Z (Pauli-Z): Phase flip - adds minus sign to |1β©
- S (Phase): Quarter turn phase rotation (Ο/2)
- T (T Gate): Eighth turn phase rotation (Ο/4)
- CNOT: Controlled-NOT - flips target if control is |1β©
- CZ: Controlled-Z - phase flips |11β© state
-
Build Circuit: Add gates to your circuit board
-
Simulate: Click the "Simulate" button to run the quantum simulation
-
View Results:
- State Vector: Quantum state in Dirac notation (e.g.,
0.707|00β© + 0.707|11β©) - Probability Chart: Bar chart showing measurement probabilities
- Bloch Spheres: 3D representation of each qubit's state
- Step-by-Step: Detailed breakdown of how each gate transforms the state
- State Vector: Quantum state in Dirac notation (e.g.,
-
Clear Circuit: Click "Clear Circuit" to reset and start over
Shows the quantum state in ket notation:
(0.707)|00β© + (0.707)|11β©
- Coefficients are complex probability amplitudes
|00β©, |01β©, |10β©, |11β©are the basis states- Only non-zero amplitudes are shown
- Shows
|amplitude|Β²as percentages - Must sum to 100%
- Represents measurement probabilities
- Each qubit visualized as a point on a 3D sphere
- North pole: |0β© state
- South pole: |1β© state
- Equator: Superposition states
- Vector length and direction show quantum state
- System automatically detects entangled states
- Entangled basis states are highlighted in the probability chart
- Mathematical criterion:
|Ξ±Ξ΄ - Ξ²Ξ³| > 0for stateΞ±|00β© + Ξ²|01β© + Ξ³|10β© + Ξ΄|11β©
Circuit: H gate on qubit 0
Mathematical Steps:
Initial: |Οββ© = |00β©
After H: |Οββ© = 1/β2(|00β© + |10β©)
Result:
- State:
0.707|00β© + 0.707|10β© - Probabilities: |00β©: 50%, |10β©: 50%
- Qubit 0 is in superposition, qubit 1 is in |0β©
Circuit: H gate on qubit 0, then CNOT with control on qubit 0
Mathematical Steps:
Initial: |Οββ© = |00β©
After H(q0): |Οββ© = 1/β2(|00β© + |10β©)
After CNOT: |Οββ© = 1/β2(|00β© + |11β©) = |Ξ¦βΊβ©
Matrix Calculation:
H β I applied to |00β©:
[1/β2] [1 1] [1] [1/β2]
[1/β2] = [1 -1] Γ [0] = [1/β2]
[0 ] [ ] [0] [0 ]
[0 ] [0 ]
After tensor product with I on second qubit:
|Οββ© = 1/β2(|00β© + |10β©)
CNOT applied:
[1 0 0 0] [1/β2] [1/β2]
[0 1 0 0] Γ [0 ] = [0 ]
[0 0 0 1] [1/β2] [1/β2]
[0 0 1 0] [0 ] [0 ]
|Οββ© = 1/β2(|00β© + |11β©)
Result:
- State:
0.707|00β© + 0.707|11β©(Bell state Ξ¦βΊ) - Probabilities: |00β©: 50%, |11β©: 50%
- Entangled! Measuring one qubit instantly determines the other
- If q0 is measured as 0, q1 must be 0
- If q0 is measured as 1, q1 must be 1
Circuit: H gate on qubit 0, S gate on qubit 0, H gate on qubit 0
Mathematical Steps:
Initial: |Οββ© = |00β©
After H(q0): |Οββ© = 1/β2(|00β© + |10β©)
After S(q0): |Οββ© = 1/β2(|00β© + i|10β©)
After H(q0): |Οββ© = 1/2[(1+i)|00β© + (1-i)|10β©]
Result:
- Complex amplitudes with phase information
- Demonstrates phase interference effects
- H-S-H sequence creates specific phase patterns
Circuit: H on q0, CNOT(q0βq1), X on q1
Mathematical Steps:
Initial: |Οββ© = |00β©
After H(q0): |Οββ© = 1/β2(|00β© + |10β©)
After CNOT: |Οββ© = 1/β2(|00β© + |11β©)
After X(q1): |Οββ© = 1/β2(|01β© + |10β©)
Result:
- State:
0.707|01β© + 0.707|10β© - Entangled state with different correlation pattern
- Anti-correlated: if q0=0 then q1=1, if q0=1 then q1=0
quantum-circuit-simulation/
βββ backend/ # Python Flask API server
β βββ app.py # Main Flask application with simulation logic
β βββ requirements.txt # Python dependencies (Flask, Qiskit, etc.)
β
βββ frontend/ # Next.js React application
β βββ src/
β β βββ app/
β β β βββ page.js # Main page component
β β β βββ layout.js # Application layout
β β β βββ globals.css # Global styles
β β β βββ api/
β β β βββ simulate/
β β β βββ route.js # API route proxy to backend
β β βββ components/
β β βββ CircuitBoard.jsx # Main circuit builder component
β β βββ DualSphere.jsx # Dual Bloch sphere visualization
β β βββ Sphere.js # Single Bloch sphere (Three.js)
β β βββ ProbabilityBarChart.js # Probability distribution chart
β βββ public/ # Static assets
β βββ package.json # Node.js dependencies
β βββ next.config.mjs # Next.js configuration
β βββ tailwind.config.js # Tailwind CSS configuration
β βββ postcss.config.mjs # PostCSS configuration
β
βββ .vscode/ # VS Code settings
βββ .gitignore # Git ignore file
βββ supervisord.conf # Process management configuration
βββ README.md # This file
The backend handles all quantum simulation logic:
Core Functions:
format_statevector(statevector): Formats state vectors into readable ket notationprobs_from_statevector(statevector): Calculates measurement probabilitiesgate_text_for_column(col): Generates human-readable gate descriptionsexplanation_for_column(col, probs_map): Provides educational explanations for each gatedetect_entanglement(statevector, prob_map): Mathematically detects entangled states
API Endpoints:
/api/simulate: Main simulation endpoint/api/health: Health check endpoint
Simulation Process:
- Receives circuit description as JSON
- Builds Qiskit QuantumCircuit progressively
- Simulates using AerSimulator after each gate
- Captures intermediate states for step-by-step display
- Detects entanglement using determinant criterion
- Returns state vectors, probabilities, and explanations
CircuitBoard.jsx
- Drag-and-drop quantum circuit builder
- Manages circuit state (12 time steps Γ 2 qubits)
- Handles single-qubit gates (H, X, Y, Z, S, T)
- Handles two-qubit gates (CNOT, CZ)
- Displays gate information tooltips with matrices
- Shows step-by-step execution results
- Probability bar chart integration
DualSphere.jsx
- Renders two Bloch spheres side-by-side
- Visualizes each qubit's reduced state
- Uses Three.js for 3D graphics
- Interactive camera controls
- Color-coded axes (X=red, Y=green, Z=blue)
Sphere.js
- Individual Bloch sphere implementation
- Converts state vector to Bloch sphere coordinates
- Formulas used:
ΞΈ = 2 * arccos(|Ξ±|) Ο = arg(Ξ²) - arg(Ξ±) x = sin(ΞΈ) * cos(Ο) y = sin(ΞΈ) * sin(Ο) z = cos(ΞΈ)
ProbabilityBarChart.js
- Plotly.js bar chart for measurement probabilities
- Highlights entangled basis states
- Color-coded bars for visual clarity
- Shows percentages for each basis state
Simulates a quantum circuit and returns comprehensive results.
Endpoint: POST http://localhost:5000/api/simulate
Request Headers:
Content-Type: application/json
Request Body:
{
"circuit": [
{"q0": "H", "q1": null},
{"q0": "CNOT_control", "q1": null}
]
}Circuit Format:
- Array of time step objects
- Each object has keys
q0andq1for the two qubits - Single-qubit gates:
"H","X","Y","Z","S","T" - Two-qubit control:
"CNOT_control"or"CZ_control" - Empty slot:
null
Response:
{
"statevector_str": "(0.707)|00β© + (0.707)|11β©",
"probabilities": {
"00": 50.0,
"01": 0.0,
"10": 0.0,
"11": 50.0
},
"human_steps": [
{
"step": 1,
"text": "H on q0",
"statevector_str": "(0.707)|00β© + (0.707)|10β©",
"probabilities": {"00": 50.0, "01": 0.0, "10": 50.0, "11": 0.0},
"explanation": "H created a superposition, splitting amplitude across basis states."
},
{
"step": 2,
"text": "CNOT: control=q0 target=q1",
"statevector_str": "(0.707)|00β© + (0.707)|11β©",
"probabilities": {"00": 50.0, "01": 0.0, "10": 0.0, "11": 50.0},
"explanation": "CNOT flips the target when the control is |1β©, creating correlation and potential entanglement."
}
],
"visualizationHints": {
"entangled": true,
"highlight": ["00", "11"]
}
}Response Fields:
statevector_str: Final quantum state in Dirac notationprobabilities: Measurement probabilities for each basis state (%)human_steps: Array of intermediate steps with explanationsvisualizationHints: Metadata for visualizationentangled: Boolean indicating if state is entangledhighlight: Basis states to highlight (if entangled)
Error Response:
{
"error": "Simulation failed",
"details": "Error message here"
}Health check endpoint to verify backend is running.
Response:
{
"status": "ok"
}Environment Setup:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtRunning in Development Mode:
python app.pyAdding New Gates:
- Add gate to
apply_columnfunction inapp.py:
if gate_q0 == 'my_gate':
qc.my_gate(0) # Use appropriate Qiskit gate method- Add explanation in
explanation_for_column:
if q0 == 'my_gate':
return "My gate does something interesting."- Update frontend gate palette (see Frontend Development)
Testing Simulation:
curl -X POST http://localhost:5000/api/simulate \
-H "Content-Type: application/json" \
-d '{"circuit": [{"q0": "H", "q1": null}]}'Environment Setup:
cd frontend
npm installRunning Development Server:
npm run devBuilding for Production:
npm run build
npm startLinting:
npm run lintAdding New Gates to UI:
- Add gate to
GATE_INFOobject inCircuitBoard.jsx:
'MY_GATE': {
name: 'My Gate Name',
matrix: [['a', 'b'], ['c', 'd']],
description: 'What my gate does'
}- Add to
GATESarray:
{ name: 'MY_GATE', display: 'MG', class: 'bg-gray-200' }- Update backend to handle the new gate
Component Structure:
CircuitBoard.jsx: Main UI logic and state managementDualSphere.jsx: Wraps two Sphere componentsSphere.js: Three.js Bloch sphere renderingProbabilityBarChart.js: Plotly chart configuration
- Hot Reload: Both frontend and backend support hot reload during development
- CORS: Already configured for local development (ports 3000 and 5000)
- Debugging: Use browser DevTools for frontend, Python debugger for backend
- State Inspection: Check browser console for circuit state and API responses
- Qiskit Documentation: Reference Qiskit docs for gate implementations
Common test circuits for validation:
Identity Test:
{"circuit": []}Expected: (1.000)|00β©, Probabilities: 100% for |00β©
Hadamard Test:
{"circuit": [{"q0": "H", "q1": null}]}Expected: Equal superposition on q0
Bell State Test:
{"circuit": [
{"q0": "H", "q1": null},
{"q0": "CNOT_control", "q1": null}
]}Expected: Entangled state 0.707|00β© + 0.707|11β©
Problem: Browser console shows CORS policy error
Solution:
- Ensure backend is running on port 5000
- Ensure frontend is running on port 3000 (or configured port)
- Check that
flask-corsis installed in backend - Verify CORS is enabled in
app.py
Problem: ModuleNotFoundError: No module named 'qiskit'
Solution:
cd backend
pip install -r requirements.txtIf issues persist:
pip install --upgrade pip
pip install Flask flask-cors qiskit qiskit-aer numpy gunicornProblem: Frontend cannot connect to backend
Solution:
- Verify backend is running:
curl http://localhost:5000/api/health - Check backend terminal for errors
- Ensure no firewall blocking port 5000
- Try restarting backend server
Problem: npm install fails with dependency errors
Solution:
rm -rf node_modules package-lock.json
npm cache clean --force
npm installIf using older Node.js version:
# Update Node.js to version 18 or higher
nvm install 18
nvm use 18
npm installProblem: Frontend loads but shows blank page
Solution:
- Check browser console for errors (F12)
- Verify all dependencies installed:
npm install - Clear browser cache
- Check that backend API is reachable
- Verify Next.js is running: should see compilation messages
Problem: 3D visualization not showing
Solution:
- Verify WebGL is enabled in browser
- Check browser console for Three.js errors
- Test WebGL support: visit https://get.webgl.org/
- Try different browser (Chrome recommended)
- Update graphics drivers if using desktop
Problem: Clicking "Simulate" returns error message
Solution:
- Check backend logs for detailed error
- Verify circuit format is correct (see API Reference)
- Ensure Qiskit is properly installed
- Try simpler circuit (e.g., just H gate)
- Check Python version: requires 3.8+
Problem: Simulation is slow or UI is laggy
Solution:
- Reduce number of gates in circuit
- Close other applications to free memory
- Check CPU usage in task manager
- For production, use Gunicorn instead of Flask dev server
- Consider using cloud deployment for heavy computations
Enable Backend Debug Logging:
# In app.py
logging.basicConfig(level=logging.DEBUG)Enable Frontend Debug Mode:
# Set environment variable
export NODE_ENV=development
npm run devCheck Backend Health:
curl http://localhost:5000/api/healthTest Backend Simulation:
curl -X POST http://localhost:5000/api/simulate \
-H "Content-Type: application/json" \
-d '{"circuit": [{"q0": "H", "q1": null}]}'Backend Requirements:
Flask>=2.0.0
flask-cors>=3.0.10
qiskit>=0.43.0
qiskit-aer>=0.12.0
numpy>=1.21.0
gunicorn>=20.1.0
Frontend Requirements:
- Node.js 18+ (LTS recommended)
- npm 9+ or yarn 1.22+
Verify Installations:
# Python version
python --version # Should be 3.8+
# Node.js version
node --version # Should be 18+
# Package versions
pip list | grep -E "qiskit|Flask|numpy"
npm list next react three plotlyIf you encounter issues not listed here:
- Check Logs: Review terminal output from both frontend and backend
- Browser Console: Press F12 and check Console and Network tabs
- GitHub Issues: Search existing issues or create a new one
- Qiskit Forums: For quantum computing specific questions
- Stack Overflow: Tag questions with
qiskit,quantum-computing,next.js
- Two Qubits Only: Currently supports maximum of 2 qubits
- Circuit Size: Maximum 12 time steps per circuit
- Browser Compatibility: Best on Chrome, Firefox, Edge; Safari may have WebGL issues
- Mobile: Optimized for desktop; mobile experience may be limited
- State Complexity: Very complex states may have truncated display
We welcome contributions! Here's how to get started:
- Fork the Repository
git clone https://github.com/YOUR_USERNAME/quantum-circuit-simulation.git
cd quantum-circuit-simulation- Create a Feature Branch
git checkout -b feature/your-feature-name- Set Up Development Environment
# Backend
cd backend
pip install -r requirements.txt
python app.py
# Frontend (new terminal)
cd frontend
npm install
npm run dev- Make Your Changes
- Follow existing code style
- Add comments for complex logic
- Update documentation if needed
- Test Your Changes
- Test manually with various circuits
- Verify backend API with curl/Postman
- Check browser console for errors
- Test on multiple browsers if UI changes
- Commit and Push
git add .
git commit -m "feat: add your feature description"
git push origin feature/your-feature-name- Create Pull Request
- Go to GitHub and create PR from your fork
- Describe your changes clearly
- Reference any related issues
Code Style:
- Python: Follow PEP 8
- JavaScript: Use ES6+ features
- React: Functional components with hooks
- Comments: Explain "why", not "what"
Commit Messages:
- Use conventional commits format
- Examples:
feat: add Y gate supportfix: correct Bell state calculationdocs: update API referencerefactor: simplify circuit rendering
Areas for Contribution:
- π Bug fixes
- β¨ New quantum gates
- π Additional visualizations
- π Documentation improvements
- π§ͺ Test coverage
- βΏ Accessibility improvements
- π Internationalization
- π± Mobile responsiveness
- β‘ Performance optimizations
- π¨ UI/UX enhancements
Short Term:
- Add more single-qubit gates (Rx, Ry, Rz rotations)
- Implement gate parameters (custom rotation angles)
- Circuit export/import functionality
- Circuit diagram SVG export
- Measurement operations
- Conditional operations
Medium Term:
- Support for 3+ qubits
- Quantum algorithm templates (Deutsch-Jozsa, Grover, etc.)
- Circuit optimization suggestions
- Real quantum hardware integration (IBM Q, etc.)
- Interactive tutorials for beginners
Long Term:
- Visual quantum algorithm builder
- Circuit composer with timing controls
- Quantum error correction visualization
- Educational lesson plans integration
- Collaborative circuit building
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the problem, not the person
- Help newcomers learn and grow
- Follow project conventions
This project is open source and available under the MIT License.
-
Qiskit: IBM's open-source quantum computing framework
- Developed by IBM Research
- Provides quantum circuit construction and simulation
- Industry-standard quantum computing toolkit
-
Three.js: 3D graphics library
- Created by Ricardo Cabello (mrdoob)
- Powers the Bloch sphere visualization
- Makes WebGL accessible
-
Plotly.js: Plotting library
- Open-source graphing library
- Interactive probability bar charts
- Responsive and customizable
-
Next.js: React framework
- Developed by Vercel
- Server-side rendering and optimization
- Modern web development
-
React: UI library
- Developed by Meta
- Component-based architecture
- Efficient rendering
-
Tailwind CSS: CSS framework
- Utility-first styling
- Rapid UI development
- Responsive design made easy
- Quantum Computation and Quantum Information by Nielsen & Chuang
- IBM Quantum Learning: https://learning.quantum.ibm.com/
- Qiskit Textbook: https://qiskit.org/learn
- Quantum Country: https://quantum.country/
This project was inspired by:
- IBM Quantum Composer
- Microsoft Q# quantum simulators
- Quirk quantum circuit simulator
- The need for educational quantum computing tools
- GitHub Issues: Report bugs or request features
- Discussions: Share ideas and ask questions
- Email: For private inquiries
- Support for 4+ qubits
- Custom gate parameters (rotation angles)
- Circuit import/export (QASM format)
- Quantum algorithm library
- Real-time collaboration
- Integration with real quantum hardware
- Advanced visualization modes
- Quantum error correction
- Performance optimizations for large circuits
- Mobile app version
Built with β€οΈ for quantum computing education and exploration
For questions, suggestions, or contributions, please open an issue or submit a pull request on GitHub.