{"id":42581206,"url":"https://github.com/bloch-labs/bloch","last_synced_at":"2026-01-28T22:09:07.588Z","repository":{"id":301951619,"uuid":"1010755374","full_name":"bloch-labs/bloch","owner":"bloch-labs","description":"The Bloch Quantum Programming Language","archived":false,"fork":false,"pushed_at":"2026-01-21T00:54:44.000Z","size":978,"stargazers_count":16,"open_issues_count":14,"forks_count":2,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-01-21T09:43:35.358Z","etag":null,"topics":["hybrid","programming-language","quantum","strongly-typed"],"latest_commit_sha":null,"homepage":"https://bloch-labs.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloch-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","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":"2025-06-29T18:28:50.000Z","updated_at":"2026-01-21T00:40:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"52ea47ac-438c-4181-abe6-f828a3b24c2a","html_url":"https://github.com/bloch-labs/bloch","commit_stats":null,"previous_names":["bloch-lang/bloch","bloch-labs/bloch"],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/bloch-labs/bloch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloch-labs%2Fbloch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloch-labs%2Fbloch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloch-labs%2Fbloch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloch-labs%2Fbloch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloch-labs","download_url":"https://codeload.github.com/bloch-labs/bloch/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloch-labs%2Fbloch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28853227,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"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":["hybrid","programming-language","quantum","strongly-typed"],"created_at":"2026-01-28T22:09:07.469Z","updated_at":"2026-01-28T22:09:07.561Z","avatar_url":"https://github.com/bloch-labs.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bloch - A Strongly Typed, Hybrid Quantum Programming\n\nBloch is an open-source, strongly typed hybrid quantum programming language. The language is designed to be hardware-agnostic, so you can move from research sketches to production-grade circuits without switching stacks.\n\n## Highlights\n- Seamless classical/quantum integration with clear type boundaries.\n- Readable, expressive syntax that stays approachable under load.\n- Hardware-agnostic execution across simulators and future hardware backends.\n- Write once, run anywhere as targets evolve.\n\n## See It In Action\n![Demo](demo/demo.svg)\nPrepare an entangled Bell state, then measure both qubits 8192 times using a tracked array to observe the expected 00 / 11 correlation.\n\n```bloch\n@quantum\nfunction createBellState(qubit a, qubit b) -\u003e void {\n    h(a);\n    cx(a, b);\n}\n\nfunction main() -\u003e void {\n    @tracked qubit[2] qreg;\n\n    createBellState(qreg[0], qreg[1]);\n\n    bit[2] out = {measure qreg[0], measure qreg[1]};\n\n    echo(out);\n}\n```\n\n## Get Started\nBloch is available as source plus manually produced release archives until the automated pipeline lands. The instructions below cover installing pre-built artifacts as well as building from source.\n\n### Install a release build\n\n#### Linux \u0026 macOS\n```bash\ncurl -fsSL https://raw.githubusercontent.com/bloch-labs/bloch/HEAD/scripts/install.sh | bash -s -- latest\n```\n\nSwap `latest` for a specific tag (eg `v1.0.0`). The script downloads the matching archive for your platform, verifies its checksum, installs the `bloch` binary into a writable directory, and updates your shell profile if needed. Add `INSTALL_DIR=/custom/path` before `bash` to override the destination.\nYou can also self-update later with `bloch --update`; major version jumps will prompt for confirmation and link the changelog.\n\n#### Windows\n```powershell\npowershell -NoProfile -ExecutionPolicy Bypass -Command \"iwr https://raw.githubusercontent.com/bloch-labs/bloch/HEAD/scripts/install.ps1 -UseBasicParsing -OutFile $env:TEMP\\\\bloch-install.ps1; \u0026 $env:TEMP\\\\bloch-install.ps1 -Version latest\"\n```\n\nSwap `-Version latest` for any tag you want. The script downloads the Windows ZIP, verifies its checksum, installs `bloch.exe` into `%LOCALAPPDATA%\\Programs\\Bloch` by default, and adds that directory to your user `PATH` (opens in new shells).\nYou can self-update later with `bloch --update`; major version jumps prompt for confirmation and show the changelog link.\n\n### Build from source\n\n#### Linux \u0026 macOS\n```bash\ngit clone https://github.com/bloch-labs/bloch.git\ncd bloch\ncmake -S . -B build -DCMAKE_BUILD_TYPE=Release\ncmake --build build --parallel\nctest --test-dir build --output-on-failure\n```\n\nRun the compiler against an example with `./build/bin/bloch examples/02_bell_state.bloch`.\n\n### Windows (Visual Studio)\n```powershell\ngit clone https://github.com/bloch-labs/bloch.git\ncd bloch\ncmake -S . -B build -G \"Visual Studio 17 2022\" -A x64 -DCMAKE_BUILD_TYPE=Release\ncmake --build build --config Release --parallel\nctest --test-dir build --config Release --output-on-failure\n```\n\nThis produces a `build/Bloch.sln` you can open directly in Visual Studio for editing and debugging. The `bloch.exe` binary is placed in `build/bin/Release/`.\n\nAdditional generator options (Ninja, CLion toolchains, etc.) are covered in [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Code Layout\n- `bloch::core` (`src/bloch/core/*`): lexer, Pratt parser, AST, and semantic analysis.\n- `bloch::runtime` (`src/bloch/runtime/*`): runtime evaluator plus the OpenQASM/statevector simulator.\n- `bloch::support` (`src/bloch/support/*`): errors, feature flags, and lightweight helpers shared across layers.\n- `bloch::update` (`src/bloch/update/*`): self-update plumbing used by the CLI.\n\n## User Documentation\n[docs.bloch-labs.com/bloch/overview](https://docs.bloch-labs.com/bloch/overview)\n\n## VS Code Extension\n[bloch-labs/bloch-vscode](https://github.com/bloch-labs/bloch-vscode)\n\n## Contributing\nContributions are welcome! [CONTRIBUTING.md](CONTRIBUTING.md) covers the development environment, conventions, and the lightweight review process we follow while the language is in active development.\n\n## How to Cite\n- If you use Bloch in research, cite it via the repository’s [`CITATION.cff`](CITATION.cff) file (GitHub exposes a “Cite this repository” button) or copy the metadata directly into your BibTeX database. The entry tracks the software release and the forthcoming JOSS article so reviewers can attribute the correct artifact.\n\n## Community\n- Website: [bloch-labs.com](https://bloch-labs.com)\n- Substack: [blochlabs.substack.com](https://blochlabs.substack.com/subscribe)\n- X/Twitter: [@blochlabs](https://x.com/blochlabs)\n- Contact: [hello@bloch-labs.com](mailto:hello@bloch-labs.com)\n\n## Acknowledgements\n- [cpp-httplib](https://github.com/yhirose/cpp-httplib) (MIT) for HTTPS calls used in update checks and downloads.\n- [OpenSSL](https://www.openssl.org/) for TLS support during release downloads (prefer statically linked in shipped binaries to avoid runtime deps).\n\n## License\nBloch is licensed under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloch-labs%2Fbloch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloch-labs%2Fbloch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloch-labs%2Fbloch/lists"}