Skip to content

unstructured-archive/bisqit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bisqit - Quantum Computing Platform

A quantum computing simulation platform for educational and research purposes.

Project Structure

  • backend/: FastAPI backend application
  • frontend/: Next.js frontend application

Features

  • Quantum circuit simulation
  • User authentication (login/register)
  • Circuit visualization
  • QASM export

Database Setup

This project uses PostgreSQL as the database backend for user authentication and storing quantum circuits. PostgreSQL integrates seamlessly with FastAPI through SQLAlchemy.

Setting up PostgreSQL

  1. Install PostgreSQL:

    # Ubuntu/Debian
    sudo apt update
    sudo apt install postgresql postgresql-contrib
    
    # MacOS (using Homebrew)
    brew install postgresql
  2. Start PostgreSQL service:

    # Ubuntu/Debian
    sudo service postgresql start
    
    # MacOS
    brew services start postgresql
  3. 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
  4. 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

Backend Setup

  1. Create and activate a virtual environment (recommended) :

    python3 -m venv venv
    source venv/bin/activate
  2. Install Python dependencies:

    cd backend
    pip install -r requirements.txt
  3. Run the backend server:

    cd backend
    python3 server.py

    The backend server will run at http://localhost:8000.

Frontend Setup

  1. Install Node.js dependencies:

    cd frontend
    npm install
  2. Set environment variables:

    Create a .env.local file in the frontend directory:

    NEXT_PUBLIC_API_URL=http://localhost:8000/api/v1
    
  3. Run the development server:

    cd frontend
    npm start

    The frontend will run at http://localhost:3000.

Authentication System

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:

  1. Register a new account
  2. Login with your credentials
  3. The system will automatically redirect you to the dashboard

Development

API Endpoints

The backend provides the following main endpoints:

  • Authentication:

    • POST /api/v1/auth/register - Register a new user
    • POST /api/v1/auth/login - Login and get JWT token
    • GET /api/v1/users/me - Get current user information
  • Quantum Computing:

    • POST /simulate - Simulate a quantum circuit
    • POST /convert_to_qasm - Convert a circuit to QASM representation

About

Basic Interactive Simulator for Quantum Information and Technology

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors