A quantum computing simulation platform for educational and research purposes.
- backend/: FastAPI backend application
- frontend/: Next.js frontend application
- Quantum circuit simulation
- User authentication (login/register)
- Circuit visualization
- QASM export
This project uses PostgreSQL as the database backend for user authentication and storing quantum circuits. PostgreSQL integrates seamlessly with FastAPI through SQLAlchemy.
-
Install PostgreSQL:
# Ubuntu/Debian sudo apt update sudo apt install postgresql postgresql-contrib # MacOS (using Homebrew) brew install postgresql
-
Start PostgreSQL service:
# Ubuntu/Debian sudo service postgresql start # MacOS brew services start postgresql
-
Create a database and user:
# Log into PostgreSQL as postgres user sudo -u postgres psql # Inside PostgreSQL shell CREATE USER bisqituser WITH PASSWORD 'your_secure_password'; CREATE DATABASE bisqit WITH OWNER bisqituser; \q
-
Configure environment variables:
Copy the example .env file and update it with your database credentials:
cd backend cp .env.example .env # Edit .env file with your database credentials # DATABASE_URL=postgresql://bisqituser:your_secure_password@localhost:5432/bisqit
-
Create and activate a virtual environment (recommended) :
python3 -m venv venv source venv/bin/activate -
Install Python dependencies:
cd backend pip install -r requirements.txt -
Run the backend server:
cd backend python3 server.pyThe backend server will run at http://localhost:8000.
-
Install Node.js dependencies:
cd frontend npm install -
Set environment variables:
Create a
.env.localfile in thefrontenddirectory:NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1 -
Run the development server:
cd frontend npm startThe frontend will run at http://localhost:3000.
The project includes a complete authentication system with:
- User registration
- User login with JWT tokens
- Protected routes requiring authentication
- Password security with bcrypt hashing
To access protected features:
- Register a new account
- Login with your credentials
- The system will automatically redirect you to the dashboard
The backend provides the following main endpoints:
-
Authentication:
POST /api/v1/auth/register- Register a new userPOST /api/v1/auth/login- Login and get JWT tokenGET /api/v1/users/me- Get current user information
-
Quantum Computing:
POST /simulate- Simulate a quantum circuitPOST /convert_to_qasm- Convert a circuit to QASM representation