Simulated CPU Quantum Build Audit Toolkit
This project is packaged as an installable Python program named wifi-cpu.
It now acts as an audit toolkit for simulated CPU builds, with a focus on logic
flow, data flow, and audit checks for claimed quantum-style builds.
Project site:
https://fitzyracing1.github.io/mars-suit-communication-ai-cpu-sim/
What it does
It gives people a small simulated CPU they can install from pip and use to test:
- logic flow between instructions
- data flow through registers, memory, ports, and output
- custom programs loaded from text files
- audit specifications that verify a build against expected CPU behavior
- a Wi-Fi call demo path for the original concept
Install as a program
From the project root:
python3 -m pip install -e .
This installs a command-line program:
wifi-cpu --demo
You can also install test dependencies:
python3 -m pip install -e '.[test]'
Example usage
Run the built-in demo:
wifi-cpu --demo
Run the Wi-Fi call path:
wifi-cpu +14155550123
Run a custom program file:
wifi-cpu --program-file examples/data_flow.cpu
Run an audit spec:
wifi-cpu --audit-file examples/quantum_build_audit.json
Use it from Python:
from wifi_cpu import SimulatedCPU
program = """
LOAD R1 5
LOAD R2 8
ADD R1 R2 R3
EMIT R3
HALT
"""
cpu = SimulatedCPU()
cpu.load_program(program)
result = cpu.run_with_state()
print(result.trace)
print(result.state.output)
Instruction set
LOAD <register> <value>MOVE <source_register> <target_register>ADD <left_register> <right_register> <target_register>SUB <left_register> <right_register> <target_register>STORE <register> <memory_key>READ <memory_key> <register>SEND <register> <port_name>RECV <port_name> <register>EMIT <register>CALL_WIFI <number>HALT
Audit spec format
Audit files are JSON documents that declare a target build, a simulator, a program, and the expected observed behavior.
{
"name": "Quantum Uplink Build",
"target": "uplink-audit",
"simulator": "wifi_cpu",
"program": [
"LOAD R1 5",
"LOAD R2 8",
"ADD R1 R2 R3",
"EMIT R3",
"HALT"
],
"expectations": {
"halted": true,
"output": [13],
"registers": {"R3": 13},
"trace_contains": ["EMIT R3"]
}
}
If an audit expectation does not match the simulated CPU result, the CLI exits with a failing status and lists the findings.
Testing
Run the tests:
pytest
Build distributable files:
python3 -m pip install '.[build]'
python3 -m build
The built wheel and source tarball will be created in dist/.
Publishing
Build locally:
python3 -m build
Upload manually with Twine:
python3 -m pip install twine
python3 -m twine upload dist/*
Or use the GitHub Actions workflow in .github/workflows/publish-pypi.yml
with PyPI Trusted Publishing after configuring the project on PyPI.
Project structure
pyproject.toml: package metadata and CLI entry pointsrc/wifi_cpu/simulator.py: simulator coresrc/wifi_cpu/audit.py: audit model and report generationsrc/wifi_cpu/cli.py: command-line interfacetests/test_simulator.py: package teststests/test_audit.py: audit testsexamples/data_flow.cpu: sample custom programexamples/quantum_build_audit.json: sample audit speccpu_simulator.py: compatibility launcherindex.html: GitHub Pages landing pagerobots.txtandsitemap.xml: crawler metadata
Metadata
Release files for wifi-cpu 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wifi_cpu-0.2.0.tar.gz | 9.7 kB | Without provenance | Details for wifi_cpu-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wifi_cpu-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for wifi_cpu-0.2.0-py3-none-any.whl |
Total release size: 17.3 kB
Release files / wifi_cpu-0.2.0.tar.gz
| Download URL | wifi_cpu-0.2.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38a89f76f57783dc0a87cd3f13cad8ce6cee6048f017edb89a2e4a96e367e134
|
|
BLAKE2b-256 checksum How to use checksums |
ff20fb62cf79fc4f435caeffa458402fff4dcee1e8136ed2898d5d0acbd7b737
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / wifi_cpu-0.2.0-py3-none-any.whl
| Download URL | wifi_cpu-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41bfd97cc4c5fb7aa0754b120909c209fcd50bb7f18443d598ec1bdaf9627aca
|
|
BLAKE2b-256 checksum How to use checksums |
9c353e3e96176d5c89cf1ca1b059843bf2aa1005ad19eae55d3f3508e073cb4a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for wifi-cpu 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.