{"id":23246252,"url":"https://github.com/subatomicerror/quantum-compute","last_synced_at":"2025-04-06T00:21:03.583Z","repository":{"id":265141557,"uuid":"895259870","full_name":"subatomicERROR/Quantum-Compute","owner":"subatomicERROR","description":"API designed to leverage the power of quantum computing for a variety of advanced computational tasks","archived":false,"fork":false,"pushed_at":"2024-12-06T21:12:42.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T06:30:32.164Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/subatomicERROR.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T21:35:14.000Z","updated_at":"2024-12-06T21:12:45.000Z","dependencies_parsed_at":"2024-11-28T00:44:00.994Z","dependency_job_id":null,"html_url":"https://github.com/subatomicERROR/Quantum-Compute","commit_stats":null,"previous_names":["subatomicerror/quantum-compute"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subatomicERROR%2FQuantum-Compute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subatomicERROR%2FQuantum-Compute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subatomicERROR%2FQuantum-Compute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/subatomicERROR%2FQuantum-Compute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/subatomicERROR","download_url":"https://codeload.github.com/subatomicERROR/Quantum-Compute/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247417499,"owners_count":20935656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-19T07:13:46.691Z","updated_at":"2025-04-06T00:21:03.560Z","avatar_url":"https://github.com/subatomicERROR.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum-Compute\n\nQuantum-Compute is a robust, modular API service designed to handle quantum computation tasks by integrating various quantum machine learning capabilities. The project combines **Quantum-API**, **Quantum-ML**, and **Quantum-Compute** to facilitate hybrid quantum-classical computations and provide an API interface for easy integration into other applications.\n\n## Features\n- Hybrid quantum-classical model for computation.\n- Integration with **Quantum-API** and **Quantum-ML** for seamless data processing.\n- Provides a simple REST API using **FastAPI** for interacting with quantum models.\n- Supports easy deployment and scalability.\n\n## Technologies\n- **Quantum-ML**: A hybrid quantum-classical machine learning model, using **PennyLane** for quantum computations and **PyTorch** for classical machine learning.\n- **Quantum-API**: Exposes quantum model computations as a REST API using **FastAPI**.\n- **Quantum-Compute**: The central API that coordinates quantum computing tasks between Quantum-ML and Quantum-API.\n\n## Installation\n\n### Prerequisites\n- Python 3.7 or later\n- `pip` (Python package installer)\n- A running **Quantum-API** and **Quantum-ML** service\n\n### Step-by-Step Installation\n1. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/subatomicERROR/Quantum-Compute.git\n   cd Quantum-Compute\n   ```\n\n2. **Create a Virtual Environment**:\n   If you haven't already, create a virtual environment to isolate your dependencies:\n   ```bash\n   python3 -m venv .venv\n   source .venv/bin/activate  # On Linux/macOS\n   .venv\\Scripts\\activate     # On Windows\n   ```\n\n3. **Install Dependencies**:\n   Install the required packages from `requirements.txt`:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. **Install Submodules**:\n   The project depends on two submodules: **Quantum-API** and **Quantum-ML**. Ensure they are initialized and updated:\n   ```bash\n   git submodule update --init --recursive\n   ```\n\n5. **Start the Quantum-API and Quantum-ML Services**:\n   - Start **Quantum-API** on port 5000:\n     ```bash\n     cd submodules/Quantum-API\n     uvicorn app:app --reload --host 0.0.0.0 --port 5000\n     ```\n   - Start **Quantum-ML** on port 7000:\n     ```bash\n     cd submodules/Quantum-ML\n     uvicorn main:app --reload --host 0.0.0.0 --port 7000\n     ```\n\n6. **Start Quantum-Compute**:\n   Start the **Quantum-Compute** API on port 8000:\n   ```bash\n   cd ..\n   uvicorn app:app --reload --host 0.0.0.0 --port 8000\n   ```\n\n## Usage\n\nOnce the servers are up and running, you can access the following endpoints:\n\n### Root Endpoint\n- **GET /**  \n  Returns a simple greeting message indicating the API is running.\n\n### Status Endpoint\n- **GET /quantum-ai/status**  \n  Returns the status of the Quantum AI system.\n  - **Response**: `{ \"status\": \"Quantum AI is up and running!\" }`\n\n### Prediction Endpoint\n- **POST /quantum-ai/predict**\n  This endpoint accepts a quantum input and returns predictions from the hybrid quantum-classical model. The request body should be a JSON object with a `input_value` field:\n  - **Request Body**:\n    ```json\n    {\n      \"input_value\": 1.0\n    }\n    ```\n  - **Response**:\n    ```json\n    {\n      \"quantum_result\": 0.8329,\n      \"classical_result\": 0.7463\n    }\n    ```\n\n### Subscription Endpoint\n- **POST /quantum-ai/subscribe**  \n  Allows users to subscribe to the API (simulated for freemium model).\n  - **Request Body**:\n    ```json\n    {\n      \"user_email\": \"user@example.com\"\n    }\n    ```\n  - **Response**:\n    ```json\n    {\n      \"status\": \"Subscription successful\",\n      \"email\": \"user@example.com\"\n    }\n    ```\n\n## Testing\n\nTo confirm the functionality of each service:\n1. Start the servers for **Quantum-API**, **Quantum-ML**, and **Quantum-Compute** as described above.\n2. Use `curl`, Postman, or Swagger UI to interact with the API.\n\nExample command to test the Quantum-Compute prediction:\n```bash\ncurl -X 'POST' \\\n  'http://127.0.0.1:8000/quantum-ai/predict' \\\n  -H 'accept: application/json' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\"input_value\": 1.0}'\n```\n\n## Contributing\n\nContributions are welcome! To get started:\n1. Fork the repository.\n2. Create a new branch (`git checkout -b feature-name`).\n3. Make your changes.\n4. Commit your changes (`git commit -am 'Add new feature'`).\n5. Push to the branch (`git push origin feature-name`).\n6. Create a new pull request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\nFor more information or to contribute, visit the repository at [https://github.com/subatomicERROR/Quantum-Compute](https://github.com/subatomicERROR/Quantum-Compute).\n\n```\n\n### Breakdown of Sections:\n1. **Introduction**: Explains the purpose of the Quantum-Compute API.\n2. **Technologies**: Lists the key components such as **Quantum-API**, **Quantum-ML**, and **Quantum-Compute**.\n3. **Installation**: Detailed steps to clone the repo, set up the virtual environment, install dependencies, and run the services.\n4. **Usage**: Describes the key API endpoints and how to use them.\n5. **Testing**: Instructions for confirming everything is running correctly.\n6. **Contributing**: Explains how others can contribute to the project.\n7. **License**: Basic licensing info.\n\nLet me know if you want any adjustments or additions!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubatomicerror%2Fquantum-compute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsubatomicerror%2Fquantum-compute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsubatomicerror%2Fquantum-compute/lists"}