Domcsi's Epic Tinker Box
Hello stranger!
Domcsi's Epic Tinker Box is my little repository of Python and Julia libraries filled (gradually) with code and routines that I use throughout my coding, scientific and research journey.
This is also a playground for myself to learn and grow as a programmer.
Table of contents:
Implemented Features
statistics
| Function | Description | Python | Julia |
|---|---|---|---|
mean |
Arithmetic mean of a numeric vector | ✅ | ✅ |
mean_complex |
Population mean of complex samples; returns (real_part, complex_mean) |
✅ | ❌ |
variance |
Population variance (N denominator) | ✅ | ❌ |
skewness |
Pearson's moment coefficient of skewness | ✅ | ❌ |
generate_gaussian_rnd_numbers |
Samples from 𝒩(μ, σ²) | ✅ | ❌ |
generate_uniform_rnd_numbers |
Samples from Uniform(a, b) | ✅ | ❌ |
generate_exponential_rnd_numbers |
Samples from Exp(λ) | ✅ | ❌ |
generate_wigner_surmise_rnd_numbers |
Samples from the generalised Wigner surmise (GOE/GUE/GSE and beyond) | ✅ | ❌ |
generate_random_numbers |
Unified dispatch wrapper for all distributions | ✅ | ❌ |
All Python samplers support optional rng injection or seed for reproducible, non-global-state sampling.
pauli_algebra
| Function / Class | Description | Python | Julia |
|---|---|---|---|
pauli_matrix(which) |
Single-qubit Pauli matrix in sparse CSR format | ✅ | ❌ |
generate_all_pauli_strings(n) |
All 4ⁿ Pauli strings for n qubits in lexicographic order | ✅ | ❌ |
generate_pauli_operators(n) |
All 4ⁿ sparse Pauli matrices | ✅ | ❌ |
PauliOperators |
Immutable validated collection with factories all(n) and from_strings(set) |
✅ | ❌ |
quantum_state
| Constructor | Description | Python | Julia |
|---|---|---|---|
QuantumState.from_vector(ψ) |
Pure state from state vector (2ᴺ,) |
✅ | ❌ |
QuantumState.from_density_matrix(ρ) |
State from density matrix (2ᴺ, 2ᴺ) |
✅ | ❌ |
QuantumState.from_vectorized_density_matrix(ρ_vec) |
State from vec(ρ) (4ᴺ,) |
✅ | ❌ |
Derived quantities computed on demand:
| Property | Returns | Python | Julia |
|---|---|---|---|
.vector |
State vector; raises for mixed states | ✅ | ❌ |
.density_matrix |
ρ = |ψ⟩⟨ψ| or stored ρ | ✅ | ❌ |
.purity |
Tr(ρ²) | ✅ | ❌ |
.dim |
Hilbert space dimension 2ᴺ | ✅ | ❌ |
| Function | Description | Python | Julia |
|---|---|---|---|
bell_state |
Generate general Bell-states | ✅ | ❌ |
w_state |
Generate general w-states | ✅ | ❌ |
bell_state |
Generate general Bell-states | ✅ | ❌ |
generate_all_stabilizer_states |
- | ❌ | ❌ |
generate_random_stabilizer_state |
- | ❌ | ❌ |
magic
| Function | Description | Python | Julia |
|---|---|---|---|
stabilizer_renyi_entropy(state, paulis, α) |
α-Stabilizer Rényi Entropy M_α | ✅ | ❌ |
_stabilizer_renyi_entropy_unchecked(...) |
Fast path for hot loops | ✅ | ❌ |
characteristic_function(ψ, paulis) |
Ξ(P) = |⟨ψ|P|ψ⟩|² / 2ⁿ for all P | ✅ | ❌ |
validate_alpha(α) |
Standalone α validator | ✅ | ❌ |
validate_compatible(state, paulis) |
Checks n_qubits agreement | ✅ | ❌ |
Metrics
Number of Tests
- Python tests: 344 tests
- Julia tests: 6 tests
LOC metrics
Now this is not important, and I do not think that it is a good idea to attribute quality, effort or productiveness to the following metric, but it is like the first, easy-peasy GitHub Action that one can set up, so here it is:
LOC is lines of code
LOCo is lines of comments
code share is LOC/(LOC + LOCo)
- Python: 2613 LOC, code share = 65.7%
- Julia: 36 LOC, code share = 97.3%
Metadata
Release files for domcsis-epic-tinker-box 0.5.1
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 |
|---|---|---|---|---|
| domcsis_epic_tinker_box-0.5.1.tar.gz | 31.7 kB | With provenance | Details for domcsis_epic_tinker_box-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| domcsis_epic_tinker_box-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for domcsis_epic_tinker_box-0.5.1-py3-none-any.whl |
Total release size: 66.8 kB
Release files / domcsis_epic_tinker_box-0.5.1.tar.gz
| Download URL | domcsis_epic_tinker_box-0.5.1.tar.gz |
|---|---|
| Size | 31.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
805e8af52ecc8b1ef50aa88eaf0f256c0130816d246633643cdb07366ebc4abe
|
|
BLAKE2b-256 checksum How to use checksums |
6c7e5ad8dfb1baf348f6dae5b57ba749d2cc1f9e7c30d176b3dcc80612169265
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logRelease files / domcsis_epic_tinker_box-0.5.1-py3-none-any.whl
| Download URL | domcsis_epic_tinker_box-0.5.1-py3-none-any.whl |
|---|---|
| Size | 35.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbbc94b28d2408dc399cacf20e66f7814d596a92ef29758cd5bedbddb457b17c
|
|
BLAKE2b-256 checksum How to use checksums |
1ae163e11a1e66b86aaeb30873ff5b518da9a8e4dbd69e7353cb52bf60dec5d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logSecurity for domcsis-epic-tinker-box 0.5.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for domcsis_epic_tinker_box-0.5.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 28, 2026.
Transparency logA 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.