{"id":13776559,"url":"https://github.com/haykkh/qSim","last_synced_at":"2025-05-11T10:31:10.284Z","repository":{"id":87778491,"uuid":"143720432","full_name":"haykkh/qSim","owner":"haykkh","description":"Quantum computer simulator library","archived":false,"fork":false,"pushed_at":"2022-08-15T20:22:55.000Z","size":6486,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-02-15T09:33:15.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/haykkh.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}},"created_at":"2018-08-06T11:41:50.000Z","updated_at":"2023-09-14T15:51:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab8cdf29-e9bc-4be6-aad3-403e9a4545f1","html_url":"https://github.com/haykkh/qSim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haykkh%2FqSim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haykkh%2FqSim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haykkh%2FqSim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haykkh%2FqSim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haykkh","download_url":"https://codeload.github.com/haykkh/qSim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253551620,"owners_count":21926324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-03T18:00:28.915Z","updated_at":"2025-05-11T10:31:08.940Z","avatar_url":"https://github.com/haykkh.png","language":"C++","funding_links":[],"categories":["Quantum simulators"],"sub_categories":[],"readme":"# qSim-cpp\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/964dabd527814bf189a8f60ee21aa807)](https://app.codacy.com/app/haykkh/qSim?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=haykkh/qSim\u0026utm_campaign=Badge_Grade_Dashboard)\n\n\u003e Quantum computer simulator library\n\n![](img/atom.png)\n\nI'm building this to learn **C++** and **Quantum Information Theory** simultaneously, so don't be surprised if they're both wrong. Instead, feel free to [create a new issue](https://github.com/haykkh/qSim-cpp/issues/new) or a [new pull request](https://github.com/haykkh/qSim-cpp/pull/new/master) so you can rub in exactly what I did wrong in a concise, well commented manner.\n\nThanks **x**\n\n## Installation\n\n### Requirements\n\n-   C++14\n\n### Instructions\n\nDownload or clone [qSim-cpp](https://github.com/haykkh/qSim-cpp) into `some/directory/qSim`\n\n## Usage example\n\n```CPP\n// A confused qubit\n// confused.cpp\n\n#include \"qSim.h\"\n\nusing namespace qsim;\n\nint main() {\n    // initialize a |0\u003e qubit\n    math::Ket qubit = states::z0;\n\n    std::cout \u003c\u003c \"qubit:\\n\";\n    qubit.print();\n\n    // apply a Hadamard gate to qubit\n    qubit *= gates::H;\n\n    std::cout \u003c\u003c \"confused qubit:\\n\";\n    qubit.print();\n}\n```\n\nFrom this directory, compile `confused.cpp` using your compiler of choice:\n\n```sh\n$ g++ -std=c++14 -I some/directory/qSim/include confused.cpp -o confused\n```\n\nThen run your compiled file:\n\n```sh\n$ ./confused\n```\n\nShould output something like:\n\n```sh\nqubit:\n\n| 1 |\n| 0 |\n\nconfused qubit:\n\n| 0.707 |\n| 0.707 |\n```\n\n_For more examples and usage, please refer to the [examples](https://github.com/haykkh/qSim-cpp/tree/master/examples)._\n\n## Release History\n\n-   0.0.1\n    -   Work in progress\n\n## Meta\n\nHayk Khachatryan – [chat w/ me](https://chat.hayk.io) – hi@hayk.io\n\nDistributed under the MIT license. See `LICENSE` for more information.\n\n\u003chttps://github.com/haykkh/\u003e\n\n## Contributing\n\n1.  Fork it (\u003chttps://github.com/haykkh/qSim-cpp/fork\u003e)\n2.  Create your feature branch (`git checkout -b feature/fooBar`)\n3.  Commit your changes (`git commit -am 'Add some fooBar'`)\n4.  Push to the branch (`git push origin feature/fooBar`)\n5.  Create a new Pull Request\n\n\u003c!-- Markdown link \u0026 img dfn's --\u003e\n\n[npm-image]: https://img.shields.io/npm/v/datadog-metrics.svg?style=flat-square\n\n[npm-url]: https://npmjs.org/package/datadog-metrics\n\n[npm-downloads]: https://img.shields.io/npm/dm/datadog-metrics.svg?style=flat-square\n\n[travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square\n\n[travis-url]: https://travis-ci.org/dbader/node-datadog-metrics\n\n[wiki]: https://github.com/yourname/yourproject/wiki\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaykkh%2FqSim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaykkh%2FqSim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaykkh%2FqSim/lists"}