Skip to main content

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

  1. Quantum Entropy Simulation: The library creates a Quantum Circuit with n qubits (where n is based on the requested password length).

  2. Superposition: It applies Hadamard gates to all qubits, putting them into a state of equal probability (superposition).

  3. Measurement: The qubits are measured, forcing them to collapse into classical bits (0 or 1).

  4. Secure Seeding: The simulator is seeded using Python's secrets module (OS-level cryptographically secure source) to ensure the simulation itself is unpredictable.

  5. Mapping: The resulting random bits are converted into characters from your chosen character set.

  6. 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

qabpassgen-0.0.4.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qabpassgen-0.0.4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

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

Hashes for qabpassgen-0.0.4.tar.gz
Algorithm Hash digest
SHA256 5427a90355921d0a4dbaba65548942c1077a6f1baacc7a394f4e7a2c2e1861af
MD5 7aa246ca692d51f3ed0069fb1f043d21
BLAKE2b-256 def8aba43cf38a5d30fe31054b156ad378aeaf9f40ab29ac9d08bb676dd42ede

See more details on using hashes here.

Provenance

The following attestation bundles were made for qabpassgen-0.0.4.tar.gz:

Publisher: publish.yml on AdilDyer/qabpassgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for qabpassgen-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8fbe83ed0348da69c07e47ace21b0d51a4427b0cde8a02d0779a17cb117186b9
MD5 e1582c164683ed27dac2b4ca4d47aac2
BLAKE2b-256 71dfcd60e9f969696124bdf35f26cbf6bd7c2c0fa61c67d8f3cbcb306f1e6a00

See more details on using hashes here.

Provenance

The following attestation bundles were made for qabpassgen-0.0.4-py3-none-any.whl:

Publisher: publish.yml on AdilDyer/qabpassgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page