{"id":37081031,"url":"https://github.com/sbalian/quantum-random","last_synced_at":"2026-04-15T22:04:56.370Z","repository":{"id":38329313,"uuid":"329689860","full_name":"sbalian/quantum-random","owner":"sbalian","description":"Quantum random numbers in Python","archived":false,"fork":false,"pushed_at":"2026-03-15T20:23:23.000Z","size":1339,"stargazers_count":42,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-16T06:06:31.163Z","etag":null,"topics":["python","quantum","random","random-generation"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sbalian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-01-14T17:40:25.000Z","updated_at":"2026-03-15T20:23:26.000Z","dependencies_parsed_at":"2024-02-25T19:46:53.869Z","dependency_job_id":"7829850a-5571-44af-8dd7-8baeb8e3ef09","html_url":"https://github.com/sbalian/quantum-random","commit_stats":{"total_commits":190,"total_committers":2,"mean_commits":95.0,"dds":"0.047368421052631615","last_synced_commit":"fe446511c2b75fee95a8865f7ce39c7201a5766a"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/sbalian/quantum-random","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbalian%2Fquantum-random","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbalian%2Fquantum-random/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbalian%2Fquantum-random/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbalian%2Fquantum-random/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sbalian","download_url":"https://codeload.github.com/sbalian/quantum-random/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sbalian%2Fquantum-random/sbom","scorecard":{"id":802469,"data":{"date":"2025-08-11","repo":{"name":"github.com/sbalian/quantum-random","commit":"95e58ffdf2362dd19f2e007a31f51c76f1eaf9f3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sbalian/quantum-random/publish.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sbalian/quantum-random/publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/sbalian/quantum-random/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/sbalian/quantum-random/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/sbalian/quantum-random/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/sbalian/quantum-random/tests.yml/main?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/publish.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.4.2 not signed: https://api.github.com/repos/sbalian/quantum-random/releases/187155461","Warn: release artifact v1.4.0 not signed: https://api.github.com/repos/sbalian/quantum-random/releases/143540224","Warn: release artifact v1.4.2 does not have provenance: https://api.github.com/repos/sbalian/quantum-random/releases/187155461","Warn: release artifact v1.4.0 does not have provenance: https://api.github.com/repos/sbalian/quantum-random/releases/143540224"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2019-156 / GHSA-xp76-357g-9wqq","Warn: Project is vulnerable to: PYSEC-2023-102","Warn: Project is vulnerable to: PYSEC-2023-114"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T10:52:30.225Z","repository_id":38329313,"created_at":"2025-08-23T10:52:30.225Z","updated_at":"2025-08-23T10:52:30.225Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31861730,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","quantum","random","random-generation"],"created_at":"2026-01-14T09:50:23.967Z","updated_at":"2026-04-15T22:04:56.350Z","avatar_url":"https://github.com/sbalian.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quantum random numbers in Python\n\n[![Tests](https://img.shields.io/github/actions/workflow/status/sbalian/quantum-random/tests.yml?label=tests\n)](https://github.com/sbalian/quantum-random/actions/workflows/tests.yml)\n[![Version](https://img.shields.io/pypi/v/quantum-random)](https://pypi.org/project/quantum-random/)\n![Python Versions](https://img.shields.io/pypi/pyversions/quantum-random)\n[![Download Stats](https://img.shields.io/pypi/dm/quantum-random)](https://pypistats.org/packages/quantum-random)\n![License](https://img.shields.io/github/license/sbalian/quantum-random)\n\nUse the [Python random module][pyrandom] with real quantum random numbers from\n[ANU Quantum Numbers][anu].\n\n## Usage\n\nImport `qrandom` and use it like the standard `random` module:\n\n```python\n\u003e\u003e\u003e import qrandom\n\n\u003e\u003e\u003e qrandom.random()\n0.15357449726583722\n\n\u003e\u003e\u003e qrandom.sample(range(10), 2)\n[6, 4]\n\n\u003e\u003e\u003e qrandom.gauss(0.0, 1.0)\n-0.8370871276247828\n```\n\nYou can also use the class `qrandom.QuantumRandom`. It has the same\ninterface as `random.Random`.\n\nThere is also a [NumPy][numpy] interface (implemented using [RandomGen][randomgen])\nbut it is not fully tested:\n\n```python\n\u003e\u003e\u003e from qrandom.numpy import quantum_rng\n\n\u003e\u003e\u003e qrng = quantum_rng()\n\n\u003e\u003e\u003e qrng.random((3, 3))  # use like numpy.random.default_rng()\narray([[0.37220278, 0.24337193, 0.67534826],\n       [0.209068  , 0.25108681, 0.49201691],\n       [0.35894084, 0.72219929, 0.55388594]])\n```\n\n## Installation\n\n```bash\npip install quantum-random\n```\n\nThe minimum supported version of Python is 3.9.\n\nThe NumPy interface is optional. To include it:\n\n```bash\npip install 'quantum-random[numpy]'\n```\n\n## Setting the ANU Quantum Numbers API key\n\nANU Quantum Numbers requires an API key. You can get a free trial or pay for a key\n[here][anupricing].\n\nYou can set the key in order of precedence as follows:\n\n1. Set the `QRANDOM_API_KEY` environment variable.\n2. Write the key to `qrandom.ini` using the `qrandom-init` setup utility (included with\nthe package). By default, the INI file is saved in your home config directory\n(e.g., `~/.config/` in Linux) and `qrandom` will find it without you having to set\nany environment variables. If you choose to save to a different location, you\nmust set `QRANDOM_CONFIG_DIR`.\n\nThe config file is ignored if `QRANDOM_API_KEY` is set.\n\n## Pre-fetching batches\n\nQuantum numbers are fetched from the API in batches of 1024 as needed. Use\n`qrandom.fill(n)` to pre-fetch `n` batches at the start of your computation.\n\n## Implementation details\n\nThe default pseudo-random generator is replaced by calls to\nthe ANU API. The `qrandom` module exposes a class derived from `random.Random` with a\n`random()` method that outputs quantum floats in the range [0, 1)\n(converted from 64-bit integers). Overriding `random.Random.random`\nis sufficient to make the `qrandom` module behave mostly like the\n`random` module as described in the [Python docs][pyrandom]. The exceptions\nare `getrandbits()` and `randbytes()`: these are not available in\n`qrandom`. Because `getrandbits()` is not available, `randrange()` cannot\nproduce arbitrarily long sequences. Finally, the user is warned when `seed()`\nis called because the quantum generator has no state. For the same reason,\n`getstate()` and `setstate()` are not implemented.\n\n[anu]: https://quantumnumbers.anu.edu.au\n[anupricing]: https://quantumnumbers.anu.edu.au/pricing\n[pyrandom]: https://docs.python.org/3/library/random.html\n[numpy]: https://numpy.org\n[randomgen]: https://github.com/bashtage/randomgen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbalian%2Fquantum-random","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsbalian%2Fquantum-random","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsbalian%2Fquantum-random/lists"}