Skip to main content

tqp-readscope

readscope-backed read-operator providers for turboquant-pro.

turboquant-pro has two extension points. turboquant_pro.plugins plugs in quantizers, the things being certified. turboquant_pro.read_operators plugs in the read operator P_C they are certified against, so that

D = tr(P_C @ Sigma_delta)

is a number you compute rather than a claim you make. This package supplies P_C for consumers that have no closed form, by measuring it.

from turboquant_pro.read_operators import (
    create_read_operator, consumer_distortion, error_covariance,
)

P = create_read_operator("readscope_jacobian", consumer=my_head).operator(keys)
sigma = error_covariance(keys, codec.decompress(codec.compress(keys)))
consumer_distortion(P, sigma)      # what the consumer actually loses

Two providers

name consumer shape recovers
readscope_blind vector → scalar margin E[g gᵀ]
readscope_jacobian vector → vector E[Jᵀ J]

Prefer readscope_jacobian where the consumer emits a vector: each probe direction then returns m numbers instead of one, at the same call cost.

The budget is not a tuning knob

readscope's calibration found that recovery against the direction budget k/d is a cliff at k = d, and that the cliff is rank independent — asking for one direction costs the same as asking for sixteen, because below full dimension the estimate is a projection onto a random subspace and a projected operator's leading eigenvector is not the operator's.

So both providers default to k = d and warn when given less, rather than quietly returning a one-direction reading that looks like a measurement. Full specification, including what is still unmeasured: readscope SPEC.md.

Neither package depends on the other

turboquant-pro declares the protocol. readscope measures the operator. This adapter is the only code that knows about both, and it is about a hundred lines. readscope stays numpy-only and usable by people with no interest in compression, which is worth more than the convenience of merging them.

Install

pip install -e plugins/tqp-readscope

Discovered automatically through the turboquant_pro.read_operators entry point. MIT.

Metadata

Release files for tqp-readscope 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tqp-readscope 0.1.0
File Size Uploaded Provenance
tqp_readscope-0.1.0.tar.gz 5.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for tqp-readscope 0.1.0
File Interpreter ABI Platform
tqp_readscope-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.6 kB

Release files / tqp_readscope-0.1.0.tar.gz

Download URL tqp_readscope-0.1.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b348c2761ea8aad06ce2c08c5025d149d96c723a7238653435e1f50051bde2ea
BLAKE2b-256 checksum
How to use checksums
894990856ec1533e5404b562b004d33cfc73829874443bdc4b85bd833be937e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / tqp_readscope-0.1.0-py3-none-any.whl

Download URL tqp_readscope-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3f817f2a4c2790fc3c961e1bbc55078adbad3b631c21748ce4695300ebbe21d
BLAKE2b-256 checksum
How to use checksums
817c60b6cf459f4572908fd79d9ee20872cdae39eee287f348c3ae6d4d1ddf45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Security for tqp-readscope 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page