{"id":16212453,"url":"https://github.com/rootenginear/qemmet","last_synced_at":"2025-04-07T21:49:06.855Z","repository":{"id":45355543,"uuid":"436757098","full_name":"rootEnginear/Qemmet","owner":"rootEnginear","description":"A shorthand notation for generating a quantum circuit.","archived":false,"fork":false,"pushed_at":"2022-01-22T07:03:09.000Z","size":1289,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-13T23:19:23.342Z","etag":null,"topics":["qasm","qiskit","quantum","quantum-circuit","quantum-circuit-diagram"],"latest_commit_sha":null,"homepage":"https://rootenginear.github.io/Qemmet/","language":"JavaScript","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/rootEnginear.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}},"created_at":"2021-12-09T20:48:54.000Z","updated_at":"2022-01-19T01:20:55.000Z","dependencies_parsed_at":"2022-09-02T00:02:42.322Z","dependency_job_id":null,"html_url":"https://github.com/rootEnginear/Qemmet","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/rootEnginear%2FQemmet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2FQemmet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2FQemmet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootEnginear%2FQemmet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootEnginear","download_url":"https://codeload.github.com/rootEnginear/Qemmet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247737741,"owners_count":20987718,"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":["qasm","qiskit","quantum","quantum-circuit","quantum-circuit-diagram"],"created_at":"2024-10-10T10:52:21.886Z","updated_at":"2025-04-07T21:49:06.834Z","avatar_url":"https://github.com/rootEnginear.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Qemmet\nA shorthand notation for generating a quantum circuit.\n\n## A shorthand notation?\nWell, I was creating some random circuits in Qiskit and I'm kind of lazy. So I thought, \"It would be cool if we had something like Emmet, but in Quantum\". So I create a new syntax that can hold enough information about a circuit and, yeah, this is it. Now I can write a simple Bell's state in a syntax of `h1cx12` instead of a lengthy `qc.h(0)` and `qc.cx(0,1)`.\n\n## How does this work?\nGood question! Since writing all of the rules here are going to be pretty long and boring, I suggest you to look up our [wiki](https://github.com/rootEnginear/Qemmet/wiki) to learn more about the syntax and mechanics behind Qemmet. When you're ready, you can try the syntax out in our [playground website](https://rootenginear.github.io/Qemmet/) too!\n\n## How can I use this with my project?\nYou can download the compiled build in the `build` folder. You will required to import the parser and (at least) one translator as modules into your HTML file like this:\n\n```html\n\u003cscript type=\"module\"\u003e\n    import { parseQemmetString } from 'qemmet.js';\n    import { translateQemmetString } from 'translators/qiskit.js';\n\u003c/script\u003e\n```\n\nFirst, you need to parse a Qemmet string by using the function `parseQemmetString(qemmet_string)`.\n\n```js\nconst parsed_qemmet = parseQemmetString(\"2;;h1cx\");\n```\n\nAfter the parsing, you can translate the output into the target language by using the function `translateQemmetString(parsed_qemmet)` from the translating module.\n\n```js\nconst output = translateQemmetString(parsed_qemmet);\n```\n\nIf you have multiple translating modules, you can rename each of them to differentiate the languages.\n\n```js\nimport { translateQemmetString as getQiskitString } from 'translators/qiskit.js';\nimport { translateQemmetString as getQASMString } from 'translators/qasm3.js';\n\nconst qiskit_code = getQiskitString(parsed_qemmet);\nconst qasm3_code = getQASMString(parsed_qemmet);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootenginear%2Fqemmet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootenginear%2Fqemmet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootenginear%2Fqemmet/lists"}