This project is an MVP for a quantum-resilient digital identity system.
We combine quantum-inspired consensus, biometric integration, and a dynamic trust engine to ensure secure, tamper-resistant identity verification.
The system is modular and future-ready:
- Classical + Quantum Simulation (via Cirq)
- Dynamic Trust Engine with entropy-based scoring
- Wallet layer (identity + trust visualization)
- Verifier portal (real-time trust & consensus checks)
- Planned: holographic rendering, offline quantum cache, swarm consensus
# 1. Clone the repository
git clone <repository-url>
cd xplore-ieee
# 2. Set up environment variables
cp env.example .env
# Edit .env with your configuration (see Environment Configuration section below)
# 3. Start all services
docker-compose build
docker-compose up
# 4. Access the applications
# - Quantum Wallet UI: http://localhost:3000
# - Biometric Capture: http://localhost:3001
# - Quantum Verifier Portal: http://localhost:3002
# - Trust Calculator API: http://localhost:8001/docs
# - Quantum Oracle API: http://localhost:8002/docs
# - Temporal Scheduler: http://localhost:8003/docs
# - Context Analyzer: http://localhost:8004/docs
# - Offline Quantum Cache: http://localhost:8005/docs
# - Grafana Monitoring: http://localhost:3003 (admin/admin123)# Start with hot reload for development
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up# Linux/macOS
chmod +x scripts/*.sh
./scripts/setup-env.sh
# Windows
scripts\setup-env.batCreate a .env file from the provided env.example template:
# Linux/macOS
cp env.example .env
# Windows
copy env.example .env| Variable | Description | Example |
|---|---|---|
POSTGRES_PASSWORD |
Database password | quantum_pass_secure_123 |
SECRET_KEY |
JWT secret key | your-super-secret-key-here |
JWT_SECRET_KEY |
JWT signing key | your-jwt-secret-key-here |
ETH_RPC_URL |
Ethereum RPC endpoint | https://sepolia.infura.io/v3/YOUR_PROJECT_ID |
ORACLE_PRIVATE_KEY |
Private key for blockchain | 0x1234... |
TRUSTFABRIC_CONTRACT |
Smart contract address | 0x1234567890123456789012345678901234567890 |
| Variable | Default | Description |
|---|---|---|
GRAFANA_PASSWORD |
admin123 |
Grafana admin password |
DEBUG |
true |
Enable debug mode |
LOG_LEVEL |
INFO |
Logging level |
QUANTUM_SIMULATOR_BACKEND |
simulator |
Quantum simulator backend |
MAX_QUBITS |
10 |
Maximum qubits for simulation |
TRUST_DECAY_RATE |
0.9 |
Trust score decay rate |
MIN_TRUST_THRESHOLD |
0.3 |
Minimum trust threshold |
MAX_TRUST_SCORE |
1.0 |
Maximum trust score |
# Linux/macOS
./scripts/validate-env.sh
# Windows
scripts\validate-env.bat# Linux/macOS
./scripts/generate-secrets.sh
# Windows
scripts\generate-secrets.bat# Start all services
docker-compose up -d
# Start specific service
docker-compose up -d [service-name]
# View logs
docker-compose logs -f [service-name]
# Restart a service
docker-compose restart [service-name]
# Stop all services
docker-compose down
# Stop and remove volumes (WARNING: deletes data)
docker-compose down -v
# Rebuild services
docker-compose build [service-name]# Run health check
./scripts/health-check.sh
# Windows
scripts\health-check.bat# Start with hot reload
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
# Rebuild and start
docker-compose up --build
# View service status
docker-compose ps
# Execute commands in running container
docker-compose exec [service-name] [command]
# Access database
docker-compose exec postgres psql -U quantum_user -d quantum_identityIf you prefer to run without Docker:
# 1. Set up Python environment
conda create -n quantum-identity python=3.11
conda activate quantum-identity
pip install -r requirements.txt
# 2. Set up databases
# Install PostgreSQL and Redis locally
# Create database: quantum_identity
# 3. Install Node.js dependencies
cd wallet/quantum-wallet-ui && npm install
cd ../biometric-capture && npm install
cd ../../verifier/quantum-verifier-portal && npm install
# 4. Start services (in separate terminals)
uvicorn services.trust_calc.calc:app --host 0.0.0.0 --port 8001 --reload
uvicorn services.quantum_oracle_api.server:app --host 0.0.0.0 --port 8002 --reload
uvicorn services.temporal_scheduler.app.main:app --host 0.0.0.0 --port 8003 --reload
uvicorn verifier.context-analyser.server:app --host 0.0.0.0 --port 8004 --reload
uvicorn verifier.offline-quantum-cache.app.main:app --host 0.0.0.0 --port 8005 --reload
# 5. Start frontend applications
cd wallet/quantum-wallet-ui && npm run dev
cd wallet/biometric-capture && npm run dev
cd verifier/quantum-verifier-portal && npm run devThe system is containerized with the following services:
- trust-calculator (Port 8001): Core trust computation engine
- quantum-oracle (Port 8002): Quantum operations and fidelity checks
- temporal-scheduler (Port 8003): Time-locked execution system
- context-analyzer (Port 8004): Context-aware verification
- offline-quantum-cache (Port 8005): Offline quantum state storage
- quantum-wallet-ui (Port 3000): Main wallet interface
- biometric-capture (Port 3001): Biometric data collection
- quantum-verifier-portal (Port 3002): Verification dashboard
- postgres (Port 5432): Primary database
- redis (Port 6379): Caching and job queue
- prometheus (Port 9090): Metrics collection
- grafana (Port 3003): Monitoring dashboard
postgres_data: PostgreSQL database filesredis_data: Redis cache datagrafana_data: Grafana configuration and dashboards
1. Port Conflicts
# Check if ports are in use
netstat -tulpn | grep :8001
# Stop conflicting services or change ports in docker-compose.yml2. Database Connection Issues
# Check database logs
docker-compose logs postgres
# Reset database
docker-compose down -v
docker-compose up -d postgres3. Environment Variables Not Loading
# Verify .env file exists and has correct format
cat .env
# Restart services after changing .env
docker-compose restart4. Frontend Build Issues
# Rebuild frontend containers
docker-compose build quantum-wallet-ui
docker-compose up -d quantum-wallet-ui5. Service Health Checks Failing
# Check service logs
docker-compose logs [service-name]
# Verify service is responding
curl http://localhost:8001/healthHot Reload Issues:
- Use
docker-compose.dev.ymlfor development - Ensure volumes are properly mounted
- Check file permissions
Database Migrations:
# Run Alembic migrations
docker-compose exec temporal-scheduler alembic upgrade head
docker-compose exec offline-quantum-cache alembic upgrade headMonitoring Setup:
- Access Grafana at http://localhost:3003
- Default credentials: admin/admin123
- Import dashboards from
monitoring/grafana/directory
- Docker Desktop installed and running
- Git installed
- At least 4GB RAM available for Docker
# Clone the repository
git clone <repository-url>
cd xplore-ieee
# Run automated setup
# Linux/macOS:
chmod +x scripts/*.sh
./scripts/setup-env.sh
# Windows:
scripts\setup-env.bat- Edit
.envfile with your configuration - Set up Ethereum RPC URL (Infura, Alchemy, or local node)
- Configure smart contract addresses
- Set up private keys for blockchain transactions
# Linux/macOS:
./scripts/validate-env.sh
# Windows:
scripts\validate-env.bat# Start all services
docker-compose up -d
# Check health
./scripts/health-check.sh
# Windows: scripts\health-check.bat- Quantum Wallet UI: http://localhost:3000
- Biometric Capture: http://localhost:3001
- Quantum Verifier Portal: http://localhost:3002
- API Documentation: http://localhost:8001/docs
- Monitoring Dashboard: http://localhost:3003
xplore-ieee/
βββ blockchain/ # Smart contracts and Web3 integration
βββ core/ # Core quantum identity logic
βββ demos/ # Demo applications
βββ monitoring/ # Prometheus and Grafana configs
βββ services/ # Backend API services
βββ verifier/ # Verification and analysis tools
βββ wallet/ # Frontend wallet applications
βββ scripts/ # Setup and utility scripts
βββ docker-compose.yml # Main Docker orchestration
βββ docker-compose.dev.yml # Development overrides
βββ Dockerfile.python # Python services container
βββ Dockerfile.react # React applications container
βββ env.example # Environment template
βββ README.md # This file
-
Entanglement Sharding (
entanglement_sharding.py)
Simulates quantum entangled shards using Cirq.- Models consensus via correlated collapse (e.g.,
0000or1111) - Tampering / early unlock detection
- Outputs agreement rate β input for Trust Engine
- Models consensus via correlated collapse (e.g.,
-
Temporal Locks (
temporal_locks.py)
Adds time-based restrictions on shard participation.
Prevents replay/tampering attacks by locking nodes until expiry. -
Biometric Quantum (
biometric_quantum.py)
Converts biometric data β normalized quantum-like features.
Used as an input fidelity signal for trust scoring.
-
Trust Calculator (FastAPI)
POST /compute-trustβ Update trust score for an identityGET /trust/{id}β Retrieve trust scoreGET /rankβ Ranked list of identitiesPOST /bulk-updateβ Batch trust updates
Powered by the Dynamic Trust Engine:
- Aggregates signals:
agreement_rate,biometric_fidelity,witness_score - Entropy-aware scoring (detects inconsistencies across signals)
- Decay model (trust fades over time without reaffirmation)
-
Quantum Wallet UI (React)
Displays enrolled identities and their live trust scores.
Simple badges & charts (holographic rendering planned later). -
Biometric Capture (Stub)
For MVP: Upload an image β hashed β sent to trust calculator.
No raw biometric stored.
- Quantum Verifier Portal (Web Dashboard)
Allows a verifier (e.g., bank KYC officer) to:- Input identity ID
- Fetch trust score & consensus state
- Check whether βconsensus achievedβ
- User provides biometric sample (image upload β hash).
- Cirq-based entanglement sharding simulates agreement rate.
- Dynamic Trust Engine computes trust using:
- Agreement Rate
- Biometric Fidelity
- Witness Score
- Entropy factor + decay
- Trust score is updated in Trust Calculator Service.
- Wallet UI fetches scores β shows them in real-time.
- Verifier Portal checks trust & consensus for external validation.
{
"identity_id": "alice",
"trust_score": 0.546,
"updated_at": 1736050973.23
}quantum-identity-system/
βββ core/
β βββ quantum-engine/ # Qiskit-based quantum simulators
β β βββ entanglement-sharding.py
β β βββ temporal-locks.py
β β βββ quantum-consensus.py
β β βββ biometric-quantum.py
β βββ mesh-network/ # QMesh implementation
β β βββ quantum-oracle.py
β β βββ consensus-cluster.py
β β βββ witness-validator.py
β βββ identity-core/ # Core identity logic
β βββ holographic-identity.py
β βββ dynamic-trust.py
β βββ swarm-coordinator.py
βββ blockchain/
β βββ contracts/
β β βββ QuantumDIDRegistry.sol
β β βββ TemporalCredentials.sol
β β βββ TrustFabric.sol
β β βββ SwarmConsensus.sol
β βββ quantum-web3/ # Quantum-enhanced Web3 interface
βββ services/
β βββ quantum-oracle-api/ # REST API for quantum operations
β βββ biometric-processor/ # Real-time biometric β quantum conversion
β βββ temporal-scheduler/ # Time-lock automation
β βββ trust-calculator/ # Dynamic trust computation
βββ wallet/
β βββ quantum-wallet-ui/ # React app with quantum visualizations
β βββ holographic-renderer/ # 3D identity visualization
β βββ biometric-capture/ # Camera/mic integration
βββ verifier/
β βββ quantum-verifier-portal/
β βββ offline-quantum-cache/ # Quantum state snapshots for offline use
β βββ context-analyzer/ # Smart verification based on use case
βββ demos/
β βββ bb84-simulator/ # Visual QKD demonstration
β βββ identity-attack-sim/ # Show quantum attack resistance
β βββ swarm-demo/ # Identity swarm visualization
βββ monitoring/
βββ quantum-metrics/ # Quantum-specific system monitoring
βββ trust-analytics/ # Trust pattern analysis
βββ threat-prediction/ # ML-based threat forecasting