Qiskit Aer based Random password generator
Project description
QabPassGen 🔐⚛️
Quantum-Simulation Backed Password Generator
qabpassgen is a Python library that generates strong, random passwords using quantum circuit simulation for entropy. It leverages Qiskit Aer to simulate quantum superposition (Hadamard gates) and measures the collapse of quantum states to generate random bits, seeded by your OS's cryptographically secure random source.
It also includes built-in password strength estimation using zxcvbn.
📦 Installation
Install easily via pip:
pip install qabpassgen
Note: This library requires Python >=3.9 and <3.13.
🚀 Usage
Basic Generation
Generate a standard 12-character password:
import qabpassgen result = qabpassgen.generate_password()
print(f"Password: {result['password']}") print(f"Strength Score: {result['score']}/4") print(f"Feedback: {result['feedback']}")
Customizing Complexity
You can specify length, numbers, and symbols:
To Generate a complex 16-char password with numbers and symbols :
import qabpassgen complex_pass = qabpassgen.generate_password( length=16, include_numbers=True, include_symbols=True ) print(complex_pass['password'])
Output example: "K9$mP#v2!LqR5@xZ"
🧠 How It Works
-
Quantum Entropy Simulation: The library creates a Quantum Circuit with n qubits (where n is based on the requested password length).
-
Superposition: It applies Hadamard gates to all qubits, putting them into a state of equal probability (superposition).
-
Measurement: The qubits are measured, forcing them to collapse into classical bits (0 or 1).
-
Secure Seeding: The simulator is seeded using Python's secrets module (OS-level cryptographically secure source) to ensure the simulation itself is unpredictable.
-
Mapping: The resulting random bits are converted into characters from your chosen character set.
-
Validation: The final password is analyzed by zxcvbn to ensure it meets modern strength standards.
If quantum simulation fails (e.g., due to environment issues), the library gracefully falls back to standard cryptographically secure generation.
🛡️ Dependencies
-
qiskit: For defining quantum circuits.
-
qiskit-aer: For high-performance quantum simulation.
-
zxcvbn: For realistic password strength estimation.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qabpassgen-0.0.4.tar.gz.
File metadata
- Download URL: qabpassgen-0.0.4.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5427a90355921d0a4dbaba65548942c1077a6f1baacc7a394f4e7a2c2e1861af
|
|
| MD5 |
7aa246ca692d51f3ed0069fb1f043d21
|
|
| BLAKE2b-256 |
def8aba43cf38a5d30fe31054b156ad378aeaf9f40ab29ac9d08bb676dd42ede
|
Provenance
The following attestation bundles were made for qabpassgen-0.0.4.tar.gz:
Publisher:
publish.yml on AdilDyer/qabpassgen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qabpassgen-0.0.4.tar.gz -
Subject digest:
5427a90355921d0a4dbaba65548942c1077a6f1baacc7a394f4e7a2c2e1861af - Sigstore transparency entry: 724475890
- Sigstore integration time:
-
Permalink:
AdilDyer/qabpassgen@2549e0236133ec0fb68b6f0e3a013b419722c820 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/AdilDyer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2549e0236133ec0fb68b6f0e3a013b419722c820 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qabpassgen-0.0.4-py3-none-any.whl.
File metadata
- Download URL: qabpassgen-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8fbe83ed0348da69c07e47ace21b0d51a4427b0cde8a02d0779a17cb117186b9
|
|
| MD5 |
e1582c164683ed27dac2b4ca4d47aac2
|
|
| BLAKE2b-256 |
71dfcd60e9f969696124bdf35f26cbf6bd7c2c0fa61c67d8f3cbcb306f1e6a00
|
Provenance
The following attestation bundles were made for qabpassgen-0.0.4-py3-none-any.whl:
Publisher:
publish.yml on AdilDyer/qabpassgen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qabpassgen-0.0.4-py3-none-any.whl -
Subject digest:
8fbe83ed0348da69c07e47ace21b0d51a4427b0cde8a02d0779a17cb117186b9 - Sigstore transparency entry: 724475897
- Sigstore integration time:
-
Permalink:
AdilDyer/qabpassgen@2549e0236133ec0fb68b6f0e3a013b419722c820 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/AdilDyer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2549e0236133ec0fb68b6f0e3a013b419722c820 -
Trigger Event:
release
-
Statement type: