From 90428ac5e8f66f4e3dd465232788234918855784 Mon Sep 17 00:00:00 2001 From: Stephen Shao Date: Mon, 8 Sep 2025 09:26:35 -0400 Subject: [PATCH] Updated license --- BEGINNERS_GUIDE.md | 4 +- CLAUDE.md | 182 ----------------------------------- LICENSE | 232 +++++++++++++++++++++++++++++++++++++++++---- README.md | 6 +- setup.py | 2 +- 5 files changed, 218 insertions(+), 208 deletions(-) delete mode 100644 CLAUDE.md diff --git a/BEGINNERS_GUIDE.md b/BEGINNERS_GUIDE.md index 795771d..ce1bbcb 100644 --- a/BEGINNERS_GUIDE.md +++ b/BEGINNERS_GUIDE.md @@ -103,7 +103,7 @@ Welcome to your quantum computing journey! This guide will help you navigate the ### Quick Start (5 minutes): ```bash -# Install Python 3.8+ if not already installed +# Install Python 3.11+ if not already installed (3.12+ recommended) # Clone this repository first git clone https://github.com/AIComputing101/quantum-computing-101.git cd quantum-computing-101 @@ -121,7 +121,7 @@ python verify_examples.py --quick ``` ### Recommended Development Environment: -- **Python 3.8+** (required) +- **Python 3.11+** (required, 3.12+ recommended for best performance) - **Jupyter Notebook** (optional but helpful for experimentation) - **VS Code** with Python extension (great for beginners) - **Git** (for version control) diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index c7e44d7..0000000 --- a/CLAUDE.md +++ /dev/null @@ -1,182 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -## Repository Overview - -Quantum Computing 101 is a comprehensive educational platform with 45 production-ready quantum computing examples across 8 modules. The project uses Qiskit as the primary quantum computing framework and follows a structured modular approach for progressive learning. - -## Common Development Commands - -### Installation and Setup -```bash -# Install core dependencies (minimal setup for basic examples) -pip install -r examples/requirements-core.txt - -# Install all dependencies (includes cloud SDKs, Jupyter, advanced libraries) -pip install -r examples/requirements.txt - -# Install development dependencies (includes testing, linting, documentation) -pip install -r examples/requirements-dev.txt - -# Install as package (enables CLI) -pip install -e . -``` - -### Running Examples -```bash -# Run individual examples -cd examples/module1_fundamentals -python 01_classical_vs_quantum_bits.py - -# Most examples support CLI arguments -python 01_classical_vs_quantum_bits.py --help -python 01_classical_vs_quantum_bits.py --verbose --shots 5000 - -# Use the CLI interface -quantum101 list # List all modules -quantum101 list module1_fundamentals # List examples in a module -quantum101 run module1_fundamentals 01_classical_vs_quantum_bits.py -``` - -### Testing and Quality Assurance -```bash -# Basic functionality testing -python -c "import sys; sys.path.append('examples'); import utils.visualization" -python examples/module1_fundamentals/01_classical_vs_quantum_bits.py --help - -# Optional code formatting (for contributions) -black examples/ - -# Full development tools (optional): -# pytest examples/ # Unit testing -# pylint examples/ # Code quality -# mypy examples/ # Type checking -``` - -### Visualization and Headless Mode -```bash -# For headless systems, set backend -export MPLBACKEND=Agg - -# Many examples support --no-plots flag -python example.py --no-plots -``` - -## Architecture and Code Structure - -### Module Organization -- `examples/module1_fundamentals/` - Basic quantum concepts (8 examples, 1,703 LOC) -- `examples/module2_mathematics/` - Mathematical foundations (5 examples, 2,361 LOC) -- `examples/module3_programming/` - Advanced Qiskit programming (6 examples, 3,246 LOC) -- `examples/module4_algorithms/` - Core quantum algorithms (5 examples, 1,843 LOC) -- `examples/module5_error_correction/` - Noise and error handling (5 examples, 2,111 LOC) -- `examples/module6_machine_learning/` - Quantum ML applications (5 examples, 3,157 LOC) -- `examples/module7_hardware/` - Hardware and cloud platforms (5 examples, 4,394 LOC) -- `examples/module8_applications/` - Industry use cases (6 examples, 5,346 LOC) -- `examples/utils/` - Shared utilities and helpers (387 LOC) - -### Code Patterns and Standards - -**Example Structure**: All examples follow a consistent pattern: -- CLI interface with argparse for user interaction -- Professional docstrings explaining learning objectives -- Error handling with informative messages -- Rich visualizations using matplotlib and Qiskit's plotting tools -- Progressive complexity building on previous concepts - -**Utility Architecture**: -- `utils/quantum_helpers.py` - Circuit creation helpers (Bell states, rotations, etc.) -- `utils/visualization.py` - Enhanced plotting and Bloch sphere tools -- `utils/educational_tools.py` - Learning aids and concept explanations -- `utils/classical_helpers.py` - Classical algorithm implementations for comparison -- `utils/cli.py` - Main CLI interface for the quantum101 command - -**Framework Integration**: -- Primary: Qiskit 2.x with Aer simulator -- Cloud platforms: IBM Quantum, AWS Braket integration in Module 7 -- Extension points for Cirq and PennyLane in Module 3 -- Machine learning: Integration with scikit-learn, PyTorch, TensorFlow in Module 6 - -### Dependencies and Platform Support -- Python 3.11+ required (3.12+ recommended) -- Multi-platform support (Linux, macOS, Windows) -- Core quantum frameworks: Qiskit, Cirq, PennyLane -- Cloud SDKs: amazon-braket-sdk, azure-quantum, qiskit-ibm-runtime -- Scientific computing: numpy, scipy, matplotlib, pandas -- Optional dependencies for specific modules (openfermion for chemistry, networkx for optimization) - -### Hardware and Cloud Integration -- Module 7 provides real quantum device examples -- IBM Quantum cloud platform integration with account setup -- AWS Braket examples for accessing different quantum hardware -- Hardware-optimized circuit compilation and noise analysis -- Real device error characterization and mitigation techniques - -## Development Guidelines - -### When Adding New Examples -- Follow the established CLI pattern with argparse -- Include comprehensive docstrings with learning objectives -- Add visualization outputs where educational value exists -- Ensure compatibility with both simulator and real hardware execution -- Test examples across different environments before integration -- Maintain the progressive complexity model within each module - -### Code Quality Standards -- All code includes production-quality error handling -- Comprehensive inline documentation and comments -- Rich educational visualizations for concept reinforcement -- CLI interfaces for user customization and exploration -- Professional logging and progress indication for long-running examples -- Black formatting enforced for consistent code style -- Pylint configured for educational code patterns with appropriate disables - -### Testing Requirements -- All examples must be runnable without external accounts (use simulators as default) -- Hardware examples should gracefully degrade to simulation when credentials unavailable -- Cross-platform compatibility required (handle different matplotlib backends) -- Memory and performance considerations for large quantum simulations -- Simplified CI/CD pipeline validates: basic imports, CLI help functionality, and example count -- Educational focus: prioritize functionality over strict code quality enforcement - - - - - - - - - -## CI/CD Pipeline Design - -### Educational Project Focus (2025-01-09) -For this educational quantum computing project, we prioritize **functionality over complexity**: - -- ✅ **Simplified Pipeline**: Streamlined from 3 complex jobs to 2 lightweight validation jobs -- ✅ **Essential Testing Only**: Focus on imports, basic functionality, and CLI help -- ✅ **Faster PR Validation**: Reduced matrix testing (Python 3.11, 3.12 on Ubuntu only) -- ✅ **Educational Priorities**: Structure validation and documentation checks -- ✅ **Flexible Validation**: Warnings instead of failures for educational content variations - -### Current Pipeline Jobs -1. **Validate Job**: Tests core imports, basic functionality, and CLI interfaces -2. **Documentation Job**: Validates project structure and example counts - -### Benefits for Educational Project -- 🚀 **Fast PR Checks**: Typical CI run completes in 2-3 minutes -- 🎓 **Education First**: No strict code quality enforcement that blocks learning -- 🛠️ **Developer Friendly**: Easy contribution process for educational content -- 📚 **Content Focus**: Validates what matters - working examples and documentation - -## Verification Results - -Last verified: 2025-01-09 - -- ✅ **CI Pipeline**: Fully operational across all test matrices -- ✅ **Code Formatting**: All 51 files Black-compliant -- ✅ **Linting**: Pylint passing with educational code standards -- ✅ **Examples**: 45 production-ready examples validated -- 🎯 **Success Rate**: 100% CI pipeline success - -All core quantum computing functionality is working correctly with Qiskit 2.x and modern Python versions. diff --git a/LICENSE b/LICENSE index 4c79033..dccd807 100644 --- a/LICENSE +++ b/LICENSE @@ -1,24 +1,216 @@ -MIT License +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ -Copyright (c) 2025 AI Computing 101 +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: +1. Definitions. -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + "Licensor" shall mean the copyright owner or entity granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (which shall not include communication of copyright holders' names). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based upon (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and derivative works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control + systems, and issue tracking systems that are managed by, or on behalf + of, the Licensor for the purpose of discussing and improving the Work, + but excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to use, reproduce, modify, distribute, and create + Derivative Works of the Work, in compliance with the License. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright notice to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Support. As you distribute the Work, + You may choose to offer, and charge a fee for, warranty, support, + indemnity, or other liability obligations and/or rights consistent + with this License. However, in accepting such obligations, You may + act only on Your own behalf and on Your sole responsibility, not on + behalf of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or support. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in comments for the + file format. You may also include a copyright line. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +================================================================================ +COPYRIGHT NOTICE +================================================================================ + +Copyright 2025 AI Computing 101 + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. ================================================================================ ADDITIONAL TERMS FOR EDUCATIONAL CONTENT @@ -32,7 +224,7 @@ resources for quantum computing. The following additional terms apply: include a link to the original repository. 2. EDUCATIONAL USE: This content is specifically designed for educational - purposes. Commercial use is permitted under the MIT License terms, but + purposes. Commercial use is permitted under the Apache License terms, but we encourage giving back to the quantum computing education community. 3. QUANTUM HARDWARE ACCESS: Some examples and exercises may require access @@ -54,7 +246,7 @@ CONTRIBUTING ================================================================================ Contributions to improve this educational content are welcome! By contributing, -you agree that your contributions will be licensed under the same MIT License. +you agree that your contributions will be licensed under the same Apache License. Areas where contributions are especially valuable: - Corrections and improvements to existing content @@ -79,4 +271,4 @@ including: - The broader open-source quantum computing ecosystem We are grateful for their contributions to making quantum computing accessible -to developers worldwide. +to developers worldwide. \ No newline at end of file diff --git a/README.md b/README.md index 65371c5..814e2da 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **The most comprehensive, beginner-friendly quantum computing course** with **45 production-ready examples** covering everything from "what is a qubit?" to industry applications in drug discovery and financial optimization. -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/) [![Qiskit](https://img.shields.io/badge/Qiskit-2.x-purple.svg)](https://qiskit.org/) [![Beginner Friendly](https://img.shields.io/badge/beginner-friendly-brightgreen.svg)]() @@ -156,7 +156,7 @@ Experience quadratic speedup in unstructured search problems. ``` quantum-computing-101/ ├── README.md # This file -├── LICENSE # MIT License +├── LICENSE # Apache 2.0 License ├── modules/ # Theoretical curriculum │ ├── Module1_Quantum_Fundamentals.md │ ├── Module2_Mathematical_Foundations.md @@ -275,7 +275,7 @@ If you use this project in your research, education, or publications, please cit ## 📋 License -This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. +This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details. ## 🙏 Acknowledgments diff --git a/setup.py b/setup.py index bfa6d84..efdb95b 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ def read_requirements(filename): "Intended Audience :: Science/Research", "Topic :: Education", "Topic :: Scientific/Engineering :: Physics", - "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8",