{"id":48010150,"url":"https://github.com/hiibolt/qsharp_rs","last_synced_at":"2026-04-04T13:37:20.635Z","repository":{"id":318703591,"uuid":"875437415","full_name":"hiibolt/qsharp_rs","owner":"hiibolt","description":"Zero-Dependency Quantum Simulator written in Rust with custom Complex, Matrix, and System libraries based on the principles of Q#","archived":false,"fork":false,"pushed_at":"2026-01-12T02:35:14.000Z","size":23,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-01T19:47:29.977Z","etag":null,"topics":["qsharp","quantum-algorithms","quantum-computing","quantum-information","quantum-physics"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hiibolt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-10-20T01:15:36.000Z","updated_at":"2026-01-12T02:35:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"70954160-ba4d-42e6-a12b-e13f5f24a0de","html_url":"https://github.com/hiibolt/qsharp_rs","commit_stats":null,"previous_names":["hiibolt/qsharp_rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hiibolt/qsharp_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiibolt%2Fqsharp_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiibolt%2Fqsharp_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiibolt%2Fqsharp_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiibolt%2Fqsharp_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiibolt","download_url":"https://codeload.github.com/hiibolt/qsharp_rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiibolt%2Fqsharp_rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31402276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":["qsharp","quantum-algorithms","quantum-computing","quantum-information","quantum-physics"],"created_at":"2026-04-04T13:37:20.116Z","updated_at":"2026-04-04T13:37:20.626Z","avatar_url":"https://github.com/hiibolt.png","language":"Rust","readme":"# Q#-rs: A Quantum Circuit Simulator in Rust\n\nA comprehensive quantum computing simulator written in Rust, implementing the fundamental concepts from Microsoft's Q# documentation and Quantum Katas. This project serves as both a learning tool for quantum computing concepts and a functional quantum circuit simulator with support for multi-qubit systems, entanglement, and various quantum gates.\n\n## Project Overview\n\nThis simulator was built as a hands-on approach to understanding quantum computing fundamentals while learning Rust. It implements a complete quantum computing stack from the ground up, including:\n\n- **Complex number arithmetic** with full mathematical operations\n- **Matrix operations** optimized for quantum computations\n- **Quantum state representation** using state vectors\n- **Complete quantum gate library** (Pauli, Hadamard, rotation, phase gates)\n- **Multi-qubit systems** with entanglement support\n- **Quantum measurement simulation** with probability visualization\n\n## Features\n\n### Core Quantum Operations\n- **Single-qubit gates**: X, Y, Z (Pauli gates), H (Hadamard), S, T, rotation gates (Rx, Ry, Rz, R1)\n- **Multi-qubit gates**: CNOT, SWAP, and extensible controlled gate framework\n- **Quantum state preparation**: Support for basis states (|0⟩, |1⟩), superposition states (|+⟩, |-⟩), and arbitrary states\n- **Measurement simulation**: Visual probability bars and phase information\n\n### Mathematical Foundation\n- **Complex number operations**: Addition, multiplication, division, conjugation, polar conversion\n- **Matrix operations**: Multiplication, inversion, transposition, tensor products, eigenvalue/eigenvector computation\n- **Quantum-specific operations**: Inner/outer products, normalization, unitary verification\n\n### System Architecture\n- **Modular design**: Separate modules for complex numbers, matrices, qubits, and quantum systems\n- **Entanglement handling**: Automatic detection and management of entangled qubit states\n- **Memory efficient**: Smart state representation that tracks individual qubits vs. entangled systems\n\n## Implementation Highlights\n\n### Complex Number System\n- Full complex arithmetic with optimized operations\n- Polar/Cartesian coordinate conversion\n- Support for arbitrary complex exponentiation\n\n### Matrix Operations\n- Efficient matrix multiplication for quantum gate operations\n- Tensor product implementation for multi-qubit operations\n- Eigenvalue/eigenvector computation for quantum state analysis\n- Inverse tensor product for quantum state decomposition\n\n### Quantum State Management\n- Automatic entanglement detection and state consolidation\n- Visual measurement output with probability bars and phase information\n- Support for arbitrary quantum state preparation\n\n### Gate Implementation\nAll major quantum gates are implemented with proper mathematical foundations:\n- **Pauli Gates**: X (NOT), Y, Z (phase flip)\n- **Hadamard Gate**: Creates superposition states\n- **Phase Gates**: S (π/2 phase), T (π/4 phase), arbitrary phase rotation\n- **Rotation Gates**: Arbitrary rotations around X, Y, Z axes\n- **Multi-qubit Gates**: CNOT, SWAP with extensible framework\n\n## Educational Value\n\nThis project implements solutions to exercises from:\n- **Microsoft Quantum Katas**: Basic quantum operations and multi-qubit systems\n- **Quantum State Preparation**: Various superposition and entangled states\n- **Gate Composition**: Building complex operations from fundamental gates\n- **Quantum Algorithms**: Foundational quantum computing algorithms\n\nEach implementation includes detailed examples showing:\n- How quantum gates affect qubit states\n- Probability calculations for measurement outcomes\n- Phase relationships in quantum superposition\n- Entanglement creation and manipulation\n\n## Technical Details\n\n### Performance Considerations\n- Efficient complex number operations using f32 precision\n- Optimized matrix multiplication for common quantum gate sizes\n- Memory-efficient representation of quantum states\n- Lazy evaluation for entanglement operations\n\n### Mathematical Accuracy\n- Proper normalization of quantum states\n- Accurate complex number arithmetic including phase calculations\n- Correct implementation of quantum gate matrices\n- Verified against known quantum computing results\n\n## Primary Resources\n- [Microsoft Quantum Katas](https://github.com/microsoft/QuantumKatas/tree/c15d99e4e505a67ef58c2c60ae50d11b0d09a443) - Home Repository\n- [Complex Arithmetic Tutorial](https://github.com/microsoft/QuantumKatas/tree/c15d99e4e505a67ef58c2c60ae50d11b0d09a443/tutorials/ComplexArithmetic)\n- [Linear Algebra Tutorial](https://github.com/microsoft/QuantumKatas/tree/c15d99e4e505a67ef58c2c60ae50d11b0d09a443/tutorials/LinearAlgebra)\n\n### Additional Resources\n- [Awesome Q#](https://github.com/ebraminio/awesome-qsharp) - Curated list of Q# resources\n- [The Hitchhiker's Guide to Quantum Computing and Q#](https://learn.microsoft.com/en-us/archive/blogs/uk_faculty_connection/the-hitchhikers-guide-to-the-quantum-computing-and-q-blog)\n- [Quirk - Quantum Circuit Simulator](https://algassert.com/quirk) - Interactive quantum circuit visualization\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiibolt%2Fqsharp_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiibolt%2Fqsharp_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiibolt%2Fqsharp_rs/lists"}