Conversation
Test Status
NoteThis repo is currently focusing on refactoring methods related to the pattern module in graphix. The resource optimization itself is out of scope now although this repo provides natural interface(GraphState) for it(Pauli preprocessing or ZX calculus). Currenlty I think It might be better to create ZX wrapper after the above TODO list is completed and merged into graphix. |
|
memo: plan to create mutable and immutable pattern. The former has a measurement calculus method as in the original repo. The latter is fixed pattern generated from the new transpiler. |
|
I have refactored pattern object. Now it splits into two steps. One is I have noticed that |
|
Next, change data type of |
|
memo: is minimize space necessary in mutable pattern? |
I have implemented this. It is probably necessary to add more tests to ensure it. Anyway, I proceed to test space reduction methods in |
I have made it work and added example to generate reduced space pattern decomposed subgraph sequence. It seems to need a little refactoring. Next add an example of signal shifted pattern generation |
|
Next things to do
|
|
As for local Clifford on outputs, Euler decompisition seems the most natural way on the perspective of ZX-Calculus. I will implement it after reflecting the feedback of the last offline meeting. |
|
I encounterd 695 errors when I try to introduce the recommended ruff setting. I will improve my code step by step...... |
|
I will merge this PR once after the updated TODOs are completed, which means the fundamental modules will have been implemented sparsely and properly aligned with the underlying theory. |
* ✅ Add tests for remove_physical_node * ✨ Add remove_physical_node to GraphState * 🎨 Fix docs * 🎨 Fix measurement_action * 🎨 Fix measurement_action in local_complement * ✅ Add tests for remove_clifford with restricted cases * 🚧 Add remove_clifford only valid for restricted cases * ✅ Add tests for Clifford removal with 4 new cases * ✅ Add tests for exception in Clifford removal * ✅ Add tests for exception in Clifford removal * ✨ Update Clifford removal * 🎨 Modified after mypy & pyright * ♻️ Refactor remove_clifford * 🎨 Improve test_remove_clifford_fails_for_special_clifford_vertex * 🚧 Add necessary test case * ✨ Add new case for Clifford removal * 📝 Improve docs * 💚 Enable CI on all PRs * ♻️ Refactor test_remove_clifford * ♻️ Refactor tests for clifford removal * 🎨 Improve readability * ♻️ Refactor initial graph preparation for tests * 🎨 Modify to pass mypy & pyright * 🐛 Fix set_output * 🐛 Fix set_meas_angle and set_meas_plane * 🎨 Apply is_clifford_angle * ♻️ Refactor test_graphstate.py * 🐛 Fix local_complement and pivot on output nodes * 🐛 Fix bug caused by incorrect output node handling * 🎨 Fix to pass mypy & pyright * 🐛 Fix test_graphstate.py * ✨ Add remove_cliffords * 🐛 Fix remove_cliffords * 🎨 Improve readability of remove_cliffords * 📝 Add docstrings to _step*_action * ⚡ Improve performance * 🐛 Fix bug in pivot_1 * 🙈 Ignore .DS_Store * 🚚 Move ZXGraphState into zxgraphstate.py * 🚚 Move ZXGraphState into zxgraphstate.py * 🎨 Rename _is_removable_clifford into _needs_nop * 🐛 Fix bug in removing cliffords from a random graph * ⚡ Fix condition check in remove_cliffords * 🐛 Fix measurement actions * 🙈 Fix .gitignore * 🚚 Move zxgraphstate tests from graphstate tests * ♻️ Refactor to reflect meas_bases * 🎨 Apply ruff --------- Co-authored-by: nabe98 <watanabeyuki@watanabeyuumarenoMacBook-Pro.local>
* 🐛 Remove side effect in focus_gflow func * 💚 Enable CI on every PR --------- Co-authored-by: nabe98 <watanabeyuki@watanabeyuumarenoMacBook-Pro.local>
* ✅ Add tests for convert_to_phase_gadget * ✨ Add convert_to_phase_gadget to ZXGraphState * 🎨 Add diagramatic representation for each tests in convert_to_phase_gadget * ✅ Add tests for merge_yz_to_xy * 🎨 Add merge_yz_to_xy * 🎨 Improve tests' readability * ✅ Add tests for merge_yz_nodes * 🎨 Add merge_yz_nodes * ♻️ Refactor test codes * ✅ Add tests for prune_non_clifford * ✨ Add prune_non_clifford to ZXGraphState * 🎨 Apply ruff check * ✏️ Fix typo * 🐛 Fix merge_yz_to_xy & merge_yz_nodes * ✨ Add get_random_gflow_circ * ✨ Add an example for Clifford/non-Clifford removal * 🐛 Fix _angle_check * 🐛 Fix test_local_complement in test_euler.py * 🐛 Fix update rule * 🐛 Add property method * 🎨 Apply ruff * ✅ Add pivot tests for euler.py * ✨ Add measurement_actions in test_zxgraphstate * ✨ Add plane_combinations in test_zxgraphstate * ✨ Add rng in test_zxgraphstate * ✨ Add doc in plane_combinations * 🎨 Change typehints * 🐛 Fix bug in _test * 🎨 Fix test_local_complement_with_no_edge * 🎨 Fix test_local_complement_on_output_node * 🎨 Fix test_local_complement_with_two_nodes_graph * 🎨 Fix test_local_complement_with_minimal_graph * 🎨 Fix test_local_complement_4_times * 🚧 Migrate local_complement & pivot into new version * 🎨 Fix lc & import * 🔥 Remove old local_complement, pivot, remove_clifford * 🎨 Fix typehints in test * ♻️ Refactor test_zxgraphstate * 🔥 Delete unneccesary tests * 🎨 Fix measurement action readability * 🎨 Rename get_random_gflow_circ into random_circ * 🎨 Fix typehints for random_circ * 🔥 Remove unnecessary del sentences * 🎨 Rename prune_non_cliffords method into full_reduce * 🎨 Format docstring * ♻️ Merge if block into while block * ♻️ Refactor check conditions * 🎨 Migrate from get_random_gflow_circ to random_circ * 📝 Fix docstrings * 🐛 Fix typehint in random_objects * 🎨 Fix typehints * 🎨 Rewrite angle condition with _is_close_angle * 🎨 Improve readability * ✅ Add corner case for test_remove_clifford * 🎨 Apply ruff * ♻️ Refactor test_zxgraphstate * ⚡ Improve performance for merge_yz_nodes * 📝 Fix docstrings * 🎨 Integrate the term 'vertex' into 'node' * 🔥 Remove _update_new_measurement method * 🎨 Simplify * 🎨 Apply ruff * 🎨 Improve docstrings and variable name * 🐛 Fix bug in _remove_clifford * ♻️ Refactor merge_yz_nodes * ♻️ Refactor _extract_yz_adjacent_pair * 🔥 Delete an uneccesary line * ♻️ Refactor ZXGraphState * ♻️ Refactor ZXGraphState * 🐛 Fix bug in merge_yz_to_xy * 🐛 Fix bug when referencing _clifford_rules * 🚚 Rename --------- Co-authored-by: nabe98 <watanabeyuki@watanabeyuumarenoMacBook-Pro.local>
TODO
ZXGraphState(pyzx implementation)Will be implemented by ourselves in another issue bacause it's not the fundamental functionality in MBQC[ ] cover APIoptimizationflow and gflow(use fastflow instead)transpiler.generate_m_cmd)transpiler.transpiler)collectionsmoduleRef: