Skip to main content

Official Python SDK for the Aṇu Astra Virtual Quantum Processor and PQC API

Project description

Aṇu Astra Python SDK

The official Python SDK for the Aṇu Astra Virtual Quantum Processor and Post-Quantum Cryptography (PQC) API.

Build and evaluate path-integral quantum circuits locally, run native OpenQASM 2.0 payloads, and secure your applications against "Store Now, Decrypt Later" threats using NIST-standardized Kyber and Dilithium algorithms.

Documentation

Full API references and interactive tutorials are available at docs.anuastra.com (Coming Soon).

Installation

Install the package via pip:

pip install anuastra

Quick Start: Quantum Execution (Qiskit-Style)

The QuantumCircuit builder provides a declarative, strictly-typed interface mirroring industry standards like IBM Qiskit.

from anuastra import Client, QuantumCircuit

# Initialize with your Developer Key
astra = Client(api_key='YOUR_API_KEY_HERE')

def run_quantum():
    # Scaffold a 2-qubit circuit
    circuit = QuantumCircuit(2)
    
    # Create a Bell State (Superposition + Entanglement)
    circuit.h(0)
    circuit.cx(0, 1)

    # Execute the circuit using the Aṇu Astra path-integral engine
    result = astra.execute(circuit, shots=10)
    
    print(f"Executed on: {result['engine']}")
    print(f"Measurement Result (Binary): {result['results']['state_binary']}")
    print(f"Credits Remaining: {result['remaining_credits']}")

if __name__ == "__main__":
    run_quantum()

Quick Start: OpenQASM 2.0 Ingestion

For research teams migrating from legacy hardware, Aṇu Astra natively ingests raw .qasm strings.

from anuastra import Client

astra = Client(api_key='YOUR_API_KEY_HERE')

qasm_payload = """OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0],q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];
"""

response = astra.execute_qasm(qasm_payload)
print(response['results'])

Post-Quantum Cryptography (PQC)

The Aṇu Astra SDK exposes NIST FIPS-203 and FIPS-204 standardized algorithms.

1. Key Encapsulation (ML-KEM / Kyber)

Used for establishing symmetric quantum-resistant tunnels over public networks (TLS/TCP).

[!IMPORTANT] Zero-Trust Architecture (v1.0.2+): keygen and decapsulate are now executed entirely locally on your device using the pure-Python fips203 distribution. Aṇu Astra never transmits or stores your private parameters.

# 1. Generate keys LOCALLY (Server A)
# No private keys leave your device
keys = astra.kyber.keygen(level=768)
public_key = keys['public_key']
private_key = keys['private_key']

# 2. Encapsulate via VQP (Server B)
# Server B uses Public Key to create a Shared Secret + Ciphertext
capsule = astra.kyber.encapsulate(public_key)

# 3. Decapsulate LOCALLY (Server A)
# Server A uses Private Key + Ciphertext to derive the exact same Shared Secret
resolved = astra.kyber.decapsulate(capsule['ciphertext'], private_key)

2. Digital Signatures (ML-DSA / Dilithium)

Used for unbreakable document signing, firmware validation, and transaction authentication.

# 1. Generate keys
keys = astra.dilithium.keygen(level=3)
public_key = keys['public_key']
private_key = keys['private_key']

# 2. Sign a payload
message = "Quantum Safe transaction payload"
signed = astra.dilithium.sign(message, private_key)

# 3. Verify the payload cryptographically
validation = astra.dilithium.verify(signed['signature'], message, public_key)
print(validation['is_valid']) # Returns True

License

MIT

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

anuastra-1.0.2.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

anuastra-1.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file anuastra-1.0.2.tar.gz.

File metadata

  • Download URL: anuastra-1.0.2.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for anuastra-1.0.2.tar.gz
Algorithm Hash digest
SHA256 5bc1ee8096c748d4e5e98fbf05f10e70c378c806b4930594c6fd1162cf8364d1
MD5 863ed74482af079ebe9375e5bc67f878
BLAKE2b-256 f101709f8f55866263cd3d0e470a2af2320458e146e0cce9045dd2a7ef68b711

See more details on using hashes here.

File details

Details for the file anuastra-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: anuastra-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for anuastra-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 225f24d73b7698cc5d2183a32ce2d9860d7e0cd176d9f6fd8d61fb7d1b8f9d3d
MD5 9d3bca57dce0a493670fae7af34c2132
BLAKE2b-256 10e4d79220fab8ce655b13d966763f34f2716765b2873c800a6ab05695817180

See more details on using hashes here.

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