Official Python SDK for the AnuAstra Virtual Quantum Processor and PQC API
Project description
AnuAstra Python SDK
The official Python SDK for the AnuAstra 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 AnuAstra 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, AnuAstra 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 AnuAstra 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).
# 1. Generate keys (Server A)
keys = astra.kyber.keygen(level=768)
public_key = keys['public_key']
private_key = keys['private_key']
# 2. Encapsulate (Server B uses Public Key to create a Shared Secret + Ciphertext)
capsule = astra.kyber.encapsulate(public_key)
# 3. Decapsulate (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
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 anuastra-1.0.0.tar.gz.
File metadata
- Download URL: anuastra-1.0.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
404a68b8f0151a8f25bfa6db0c8a5df7418105b01f5569af0baf7023f5c9c959
|
|
| MD5 |
4b2ff1f7a41a79051a9c5940577861b7
|
|
| BLAKE2b-256 |
32f7ea6758ce616e53cbd5b8a6db0b148a09564008100883317df25ec280a77f
|
File details
Details for the file anuastra-1.0.0-py3-none-any.whl.
File metadata
- Download URL: anuastra-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4384fb92d210369db75bc334c0c3d496fba9847530f3e4dc6b52e8091477dca4
|
|
| MD5 |
0c1c4cb37c9a22c10a36a123a2221ee6
|
|
| BLAKE2b-256 |
c129eef898e4880142bb5ee714b4b8e96667c60b08cd6146191cce22b8e585c9
|