{"id":22882554,"url":"https://github.com/cqcl/ethz-hack-24","last_synced_at":"2025-10-12T03:41:53.778Z","repository":{"id":237204663,"uuid":"794027049","full_name":"CQCL/ethz-hack-24","owner":"CQCL","description":"ETH Quantum Hackathon 2024 -- w/ Quantinuum","archived":false,"fork":false,"pushed_at":"2024-05-04T20:39:46.000Z","size":1767,"stargazers_count":1,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-12T03:41:53.078Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"OpenQASM","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/CQCL.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-30T10:13:25.000Z","updated_at":"2025-02-19T02:00:05.000Z","dependencies_parsed_at":"2024-05-03T07:56:46.403Z","dependency_job_id":"a731b7d9-49cc-4e91-99d3-ffcad1defcef","html_url":"https://github.com/CQCL/ethz-hack-24","commit_stats":null,"previous_names":["cqcl/ethz-hack-24"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CQCL/ethz-hack-24","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fethz-hack-24","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fethz-hack-24/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fethz-hack-24/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fethz-hack-24/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CQCL","download_url":"https://codeload.github.com/CQCL/ethz-hack-24/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CQCL%2Fethz-hack-24/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010141,"owners_count":26084692,"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","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-12-13T18:18:19.567Z","updated_at":"2025-10-12T03:41:53.754Z","avatar_url":"https://github.com/CQCL.png","language":"OpenQASM","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ethz-hack-24 - Normal forms for $T$ Gate Optimisation\n ETH Quantum Hackathon 2024 with Quantinuum\n\n Join our slack channel for community discussion and support\n\n [![Slack](https://img.shields.io/badge/Slack-4A154B?style=for-the-badge\u0026logo=slack\u0026logoColor=white)](https://tketusers.slack.com/join/shared_invite/zt-18qmsamj9-UqQFVdkRzxnXCcKtcarLRA#)\n\n\n# Update [04/05/24 @ 22:36]\n\n\n We’ve been discussing the problem and would like to give you some guidance. Roughly, the steps involved in the implementation are the following\n\n1. Replace each internal Hadamard with a “Hadamard gadget”, introducing the right number of ancillary qubits. Make sure understand well the idea of classically controlled gates\n\n2. Commute the resulting classically controlled Paulis to the end (SEE NOTE BELOW)\n\n3. Rewrite the resulting CNOT+S+T circuit as a phase gadget + CNOT circuit. You can achieve this using the ComposePhasePolyBoxes pass. Find out how to extract the phase polynomial and the CNOT circuit from it, and then replace them with a diagonal gate and a ToffoliBox, to obtain your final normal form. You may find the following links useful:\n\n- [Phase Polynomial overview](https://tket.quantinuum.com/user-manual/manual_circuit.html#phase-polynomials)\n- [PhasePolybox docs](https://tket.quantinuum.com/api-docs/circuit.html#pytket.circuit.PhasePolyBox)\n- [ComposePhasePolyBoxes docs](https://tket.quantinuum.com/api-docs/passes.html#pytket.passes.ComposePhasePolyBoxes)\n\n## NOTE ON COMMUTATION OF PAULIs\n\nWe have re-examined the paper, as well as the original authors’ implementation of the procedure (https://github.com/Luke-Heyfron/TOpt) and it is no longer clear to us how the Pauli commutation used after Hadamard gadgetisation works in the general, non-clifford non-diagonal CNOT+T+S gate set.\n\nWe suggest you make the following simplifying assumptions:\n- U_f3 has at most one T-gate\n- You should gadgetise all Hadamards, however it is sufficient to commute the last Pauli X correction past the last U_f3 block. You DO NOT need to commute any other Pauli X gates. In other words, in the screenshot below, you may leave the first Pauli X gate unchanged and should only commute the second Pauli X gate past U_f3\n\nAlternatively, you can consider the case where all U_fi blocks are diagonal. In this case, commuting the Pauli X gates through to the end should be straightforward.\n\nBonus: make up your own mind on the feasibility of the procedure described in the paper, and present your arguments tomorrow :)\n\n## Evaluation criteria\n\nThe grading tomorrow will be done exclusively by us, and you will only be compared to other teams within our challenge. We do not expect you to have a perfect final solution to this problem, but rather:\n - show us what you have learnt and the journey\n - highlights all your attempts — failed or successful — and explain your approach\n - tell us what you found the most interesting, surprising and what you found particularly challenging.\n\n\nWe wish you a good night and the best of luck for tomorrow!\n\nLuca \u0026 Callum\n\n\n\n\n# FIRST: give us your email\n\n-\u003e Fill in [this form](https://forms.office.com/r/MGCB3bTxEm). As soon as we have your email address we will send you an invitation to join the Nexus cloud environment.\n\n\n# When you are ready to begin\n\n* One member of the team should fork this repository and share the URL with team members. \n* When the challenge begins you will get an email inviting you to set up an account on the Quantinuum Nexus website.\n* Follow the instructions on the invite email and visit [https://nexus.quantinuum.com](https://nexus.quantinuum.com). \n* Once you've logged in, click on the burger menu in the top left corner and select 'Lab'.\n* Select 'Start' to boot up your hosted workspace.\n* Once in the workspace, click on the Git icon in the left-most panel and clone your team's forked repo using the URL from above.\n* Run through the Quantinuum Nexus tutorial in [start_here_nexus_tutorial.ipynb](https://github.com/CQCL/ETHZ-HACK-2024/start_here_nexus_tutorial.ipynb) to get started with the Quantinuum Nexus platform.\n* Run through the challenge tutorial in [problemsheet.ipynb](https://github.com/CQCL/ETHZ-HACK-2024/problemsheet.ipynb) for the challenge statement and some relevant background.\n* When you are ready to submit your project, send a link to your fork of this repository in the slack or with the organisers before the time limit.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fethz-hack-24","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcqcl%2Fethz-hack-24","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcqcl%2Fethz-hack-24/lists"}