{"id":33931544,"url":"https://github.com/d-drozhzhin/qvnt","last_synced_at":"2026-04-05T17:39:07.974Z","repository":{"id":40574006,"uuid":"369000920","full_name":"d-drozhzhin/qvnt","owner":"d-drozhzhin","description":"Advanced quantum computation simulator","archived":false,"fork":false,"pushed_at":"2023-03-14T15:25:33.000Z","size":2843,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-08T10:00:49.609Z","etag":null,"topics":["multithreading","qasm","qasm-compiler","quantum-computing","rust-crate"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/d-drozhzhin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-05-19T21:05:01.000Z","updated_at":"2025-12-24T03:02:10.000Z","dependencies_parsed_at":"2023-01-23T21:00:17.948Z","dependency_job_id":null,"html_url":"https://github.com/d-drozhzhin/qvnt","commit_stats":null,"previous_names":["d-drozhzhin/qvnt"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/d-drozhzhin/qvnt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-drozhzhin%2Fqvnt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-drozhzhin%2Fqvnt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-drozhzhin%2Fqvnt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-drozhzhin%2Fqvnt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-drozhzhin","download_url":"https://codeload.github.com/d-drozhzhin/qvnt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-drozhzhin%2Fqvnt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"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":["multithreading","qasm","qasm-compiler","quantum-computing","rust-crate"],"created_at":"2025-12-12T12:51:39.228Z","updated_at":"2026-01-24T20:14:31.830Z","avatar_url":"https://github.com/d-drozhzhin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QVNT\n\n[![build](https://img.shields.io/github/actions/workflow/status/MucTepDayH16/qvnt/unit-tests.yml?style=for-the-badge\u0026logo=github\u0026label=build/tests)](https://github.com/MucTepDayH16/qvnt/actions/workflows/unit-tests.yml)\n[![rustc](https://img.shields.io/badge/rustc-1.58.1+-blue?style=for-the-badge\u0026logo=rust)](https://www.rust-lang.org)\n[![crates.io](https://img.shields.io/crates/v/qvnt?style=for-the-badge\u0026logo=hackthebox\u0026logoColor=white)](https://crates.io/crates/qvnt)\n[![docs.rs](https://img.shields.io/docsrs/qvnt?style=for-the-badge\u0026logo=rust)](https://docs.rs/qvnt/)\n\n### Advanced quantum computation simulator, written in *Rust*\n\n\n## Features\n1. Ability to simulate up to 64 qubits.\n   Common machine with 4-16 Gb of RAM is able to simulate 26-28 qubits, which is enough for several study cases;\n2. Set of 1- or 2-qubits operations to build your own quantum circuits;\n3. Quantum operations are tested and debugged to be safe in use;\n4. Circuit execution is accelerated using multithreading *Rayon* library;\n5. Complex quantum registers manipulations: tensor product of two registers and aliases for qubit to simplify interaction with register.\n\n___\n## Usage\n\nAdd this lines to your *Cargo.toml* file to use __QVNT__ crate:\n\n```toml\n[dependencies]\nqvnt = { version = \"0.4.4\", features = [\"multi-thread\"] }\n```\n\nQuantum register and operators are controlled by bitmasks.\nEach *bit* in it will act on a specific *qubit*.\n\n```rust\nuse qvnt::prelude::*;\n\n//  Create quantum register with 10 qubits\nlet mut q_reg = QReg::new(10);\n//  or with initial state, where 5th, 6th and 7th qubits are already in state |1\u003e.\nlet mut q_reg = QReg::with_state(10, 0b0011100000);\n\n//  Create qft (Quantum Fourier Transform) operation, acting on first 5 qubits in q_reg.\nlet op = op::qft(0b0000011111);\n\n//  Apply created operation\nq_reg.apply(\u0026op);\n\n//  Measure and write first 3 qubit, which leads to collapse of q_reg wave function.\n//  Measured variable will contain one of the following values:\n//  0b000, 0b001, 0b010, 0b011, 0b100, 0b101, 0b110, 0b111\nlet measured = q_reg.measure_mask(0b0000000111);\n```\n\nYou're able to use *VReg* to simplify operations definition:\n\n```rust\nuse qvnt::prelude::*;\n\nlet mut q_reg = QReg::new(10);\nlet q = q_reg.get_vreg();\n\n//  Crate Hadamard operator, that act on odd qubits.\nlet op = op::h(q[1] | q[3] | q[5] | q[7] | q[9]);\n//  This is equivalent to op::h(0b0101010101);\n```\n\n___\n## Implemented operations\n* Pauli's *X*, *Y* \u0026 *Z* operators;\n* Square and fourth root of *Z* - *S* \u0026 *T* operators;\n* Phase shift operator - *phi*;\n* 1-qubit rotation operators - *rx*, *ry* \u0026 *rz*;\n* 2-qubits rotation operators, *aka* Ising coupling gates, - *rxx*, *ryy* \u0026 *rzz*;\n* *SWAP*, *iSWAP* operators and square rooted ones;\n* Quantum Fourier and Hadamard Transform;\n* Universal *U1*, *U2* and *U3* operators;\n\n__ALL__ operators have inverse versions, accessing by ```.dgr()``` method:\n```rust\nuse qvnt::prelude::*;\n\nlet usual_op = op::s(0b1);\n//  Inverse S operator\nlet inverse_op = op::s(0b1).dgr();\n```\n\nAlso, __ALL__ these operators could be turned into controlled ones, using ```.c(...)``` method:\n```rust\nuse qvnt::prelude::*;\n\nlet usual_op = op::x(0b001);\n//  NOT gate, controlled by 2 qubits, aka CCNOT gate, aka Toffoli gate\nlet controlled_op = op::x(0b001).c(0b110).unwrap();\n```\nControlled operation has to be unwrapped, since it could be None if its mask overlaps with the mask of operator.\nFor example, this code will *panic*:\n```rust,should_panic,panics\nuse qvnt::prelude::*;\nlet _ = op::x(0b001).c(0b001).unwrap();\n```\n\n\n___\n## License\nLicensed under [MIT License](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-drozhzhin%2Fqvnt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-drozhzhin%2Fqvnt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-drozhzhin%2Fqvnt/lists"}