-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
289 classic fib decoder #391
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* fix issue with string2nodes * ignore undeeded boundary nodes option * correct given nodes issue * make non-neutral cluster if contains only boundary * improvements to check_nodes * check nodes also outputs error_num * check_nodes also outputs error_num * add check_nodes to RepetitionCodeCircuits * black * add decoder * make decoder compatible with RepCodeCircs * lint and black * add tests for clustering decoder * have check nodes output flipped logicals as nodes * check_nodes outputs flipped logicals as nodes * check_nodes outputs flipped logicals as nodes * undo weirdness Co-authored-by: grace-harper-ibm <[email protected]>
* Moved qiskit_qec to src, refactor extenstions and builds * pylint and test updates * Test tox.ini update * Testing 3.9 on tests issue * Trying changed pyproject.toml * trying pyproject.toml again * Set skipdist = True * Adding verbose flags to find errors * Add -vv to tox command * Added envdir to toc.ini * update tox.ini * Set skipsdist=False * Update of MANIFEST.ini to add extern and intern directories * added isoltaed_build in tox and recurive item in MANIFEST.ini * Fixed MANIFEST.ini * Moved intern and extern, update tox to allow test in sdist * Corrected CMake filename error * Added --develop * Trying reducing CMakeLists.txt files * Trying moving intern and extern into qiskit_qec * Moving intern and extern back * Reset tests.yml * Another commit * Fix for Mac to linux filename case issues - part 1 * Part 2 * Adding -vv to tox run * Add -fPIC and other compile flags * Pylint fix, tox.ini tests to test * balck update * Moved intern and extern back to original correct loction * Removing pybind11 submodule * Manually added pybind11 - change later
* add decodoku * lint, black and extra files * improve variable names * fix variable name issues" " * change import path * add visualization test * fix assertations * add test for decodoku * move to utils * black --------- Co-authored-by: Drew Vandeth <[email protected]>
* improve process_string for 202s * overhaul process_string * add tests for single error 202s * deprecate option not to have resets * update doc string * re-enable resets=False option, but only when 202s are not used * improve tests * Combine ARC 306 and 295 (#315) * fix issue with buffer * fix another buffer bug * fix metabuffer bug * linting * classic Python, confusing 0 and False * add option for conditional resets * tests for conditional resets * fix issue with set reordering * slight offset to round buffer * typo in doc string * use correct T in test * correct string processing for rounds_per_link>5" * refine skip backs for just_finished * link and black * correct node flagged as conjugate * add extra method for probability analysis * remove glitchy behaviour for isotropic ARCs * allow logical 1 states * allow number of rounds per 202 to be varied * handle kwargs for string2nodes * added whitespace to induce new tests * base case for rep code * test T=3 * improve weight calculation * define undefined variable * more tests for logical 1 * more tests for logical 1 * move get_error_coords to code * test get_error_coords for ARCs * make error coords not fail for 202s * improve weight update * improve coord calculations * Update from pass through --------- Co-authored-by: Drew Vandeth <[email protected]>
* some css variables * minor improvements to repetition code * css attributes and partition_outcomes * remove partition_outcomes and add tests * lint and black * add check_nodes * fix distance calculation * fix check_nodes for marginal cases * fix thing * Decoders: Add Union Find decoder and fix bugs in Decoding Graph (#317) * DecodingGraph: Fix bugs in construction This patch solves two bugs: 1) Doesn't add empty edges, which allowed the decoder to take "shortcuts". 2) Used to treat edges with boundary as measurement errors, now it understands the difference. * Decoders: Add unoptimised UnionFind Decoder based on arXiv:1709.06218v3 This patch adds an unoptimised version (without the UnionFind datastructure from the paper) of the UnionFind decoder from arXiv:1709.06218v3. Maybe it might be worthwhile to think about extracting the peeling method to a separate decoder. * UnionFindDecoder: Implement decoder like in paper This patch changes the implementation of the UnionFindDecoder from a more or less adhoc to the one described in the paper. * UnionFindDecoder: Actually test for correct logical outcome and fix bug This patch fixes a bug when highlighting nodes for logical 1. It also fixes testing, so that the logical outcome now also gets tested, not just the syndromes. * UnionFindDecoder: Make it run on repetition codes This patch removes the restriction that the code has to be a surface code, such that it can now also run on repetition codes. It also adds the required tests. * UnionFindDecoder: Fix bug when updating odd clusters This patch fixes a bug caused by not checking if a cluster becomes odd and not adding it back to the odd clusters. Also fixes repetition code test. * UnionFindDecoder: Generalize odd logic This patch generalizes the is_odd logic, it does that by keeping track of the non_typical nodes in each cluster and then computes is_odd when merging. Remembering it for each cluster is therefore not necessary anymore. This allows us to generalise the decoder to codes, where the assumption that a cluster is even when the number of atypical qubits is even doesn't hold. * UnionFindDecoder: Add support for ARCs and fix some implementation issues * Codes+UnionFindDecoder: Add method to code for odd check This patch adds methods to the codes that determines whether a given set of atypical syndrome nodes could have been caused by one or more errors. It then uses this method in the union find decoder. * UnionFindDecoder: Add method descriptions * UnionFindDecoder: Create cluster method and add support for multiple errors/clusters This patch adds the cluster method, which returns a list of lists of indices of the nodes inside the clusters. It also adds the ability to correct for multiple errors at once, by adding support for multiple clusters. * SurfaceCode+RepCode+ARC: Rename is_cluster_even to is_cluster_neutral * Decoders: Move UnionFindDecoder to hdrg_decoders.py, rename ClusteringDecoder to BravyiHaahDecoder and create generic base class for clustering decoders * UnionFindDecoder: Fix some bugs in the decoder and add a test that measures logical error rate * Testing: Fix error rate testing for the union find decoder * Tutorials: Create tiny tutorial explaining how to use union find * black * more black * restore exception for pylint * complete move of rep tests * fix some linting * Fixed type hint error * UnionFindDecoder+Tests: Fix lint issues (#326) Co-authored-by: James Wootton <[email protected]> * more linting --------- Co-authored-by: Tommaso Peduzzi <[email protected]> Co-authored-by: Drew Vandeth <[email protected]>
* create CodeCircuit class * add more detail to init * add default is_cluster_neutral
* make hdrg decoder more universal * fix typos * Add first version of Node and Edge types Tests won't run because of circular import issue * create CodeCircuit class * add more detail to init * add default is_cluster_neutral * Add new DecodinGraph Node type support everywhere This patch adds support for the new Node everywhere, such that it passes all tests. It also moves DecodingGraph to the analysis module due to a circular dependency issue. * Move new Node and Edge types to utils and rename And lint and black * Move new Node and Edge types to utils and rename And lint and black * create CodeCircuit class (#329) * create CodeCircuit class * add more detail to init * add default is_cluster_neutral * Lint and Black * Update decoding graph caching to support new node tzpes * Added Cmake as a requirement (#336) * element->index in decodoku * DecodingGraph, Tests, ARC: Fix things for PR * DecodingGraph, Tests, ARC: Fix things for PR * remove unused import * use all logicals * Added Cmake as a requirement (#336) (#345) Co-authored-by: Drew Vandeth <[email protected]> * DecodingGraph: Add optional graph attribute for cached graphs * Update hdrg_decoders.py * Update hdrg_decoders.py --------- Co-authored-by: James Wootton <[email protected]> Co-authored-by: James Wootton <[email protected]> Co-authored-by: Drew Vandeth <[email protected]>
* ClAYG: Add first version * Add ClAYG Decoder * Weighted Union Find Original Implementation by Delfosse et al., next up is the Huang et al. implementation. * UF, ClAYG: Remove need for logical ClAYG currently doesn't pass surface code test, because certain cases depend on when the boundary nodes are added. * UF: Fix bug that caused infinite loop Instead of remove boundary nodes out of a cluster when it becomes neutral with a bulk node, we now don't do that. ClAYG tests still don't pass! * ClAYG: Update tests to reflect changes * UF: Only first boundary node is checked for neutrality * ClAYG: Fix how boundary nodes are handled * Lint and black
* approximate edge flip probabilities saturate at 1/2. Rather than raise an exception when the approximations appear to break down, instead choose the maximum edge flip probability to be 1/2. * lint. --------- Co-authored-by: grace-harper <[email protected]>
Co-authored-by: Drew Vandeth <[email protected]>
* added HeavyHex decoder to additional resources * submodule HeavyHex --------- Co-authored-by: Grace <[email protected]>
* Update decoding_graph.py * black * lint --------- Co-authored-by: grace-harper <[email protected]>
* Small fixes to make UnionFind run with real data (#355) * some quick hacks to try to make the UnionFind Decoder run with real data. Reversal of string in process() is not needed, and qubit-index fix for the correction * fixing unittests for unionfind * prevent infinite while loop * hacky avoidance of infinite loop * fix flatten nodes * improve cluster checking for ARCs * allow check_nodes to declare non-optimal clusters as neutral * remove bug test on while loop * make everything work! * improve printing of nodes * add minimal kwarg to check_nodes * change test to linear ARC * change test to linear ARC * use rep codes to test UF * put uf into standard form * don't test things that don't work * lint and black * move cluster processing to base * make all cluster methods use standard form * restore uf test file (but streamlined) * fix inconsistencies with logical strings --------- Co-authored-by: Milan Liepelt <[email protected]>
…antum_info.operators.symplectic.clifford.Clifford.stabilizer (#366) Co-authored-by: Grace <[email protected]>
* use sets rather than lists * speed up check_nodes * speed up check nodes * add lower bound errors for flattened nodes * undo flattened node count * reinstate flatten nodes * expand UF tests * use higher defaulty value for 202s * fix tests
* Code circuit builder -> integrate stim (#340) * create CodeCircuit class (#329) (#332) * create CodeCircuit class * add more detail to init * add default is_cluster_neutral * add css code circuit * Adding two methods: 'to_stim_circuit' and 'get_counts_via_stim' (#1) * Update css_code.py * Update css_code.py * Update css_code.py * stim integration in the CssCodeCircuit class (#341) * Update css_code.py * Update css_code.py * Update css_code.py * add stim * separate stim functions from class * move stim tools to utils * black and lint * document stim tools * document stim tools * add general noisification of circuits * add support for StabSubsystemCode * conflict avoidance * Update __init__.py * fix conflict * complete StabSubsystem compatibility * Stim DecodingGraph (#356) * decoding graph via stim New methods: 1) 'stim_circuit_with_detectors' converts the qiskit circuit to stim and appends detectors 2) '_make_syndrome_graph' creates a rustworkx graph and hyper edge list to be passed onto the DecodingGraph class * qiskit style decoding graph from stim circuit New function: 'detector_error_model_to_rx_graph' creates a qiskit style decoding graph from a stim circuit * Update decoding_graph_attributes.py * undo conflict fix * undo conflict resolution (#358) * Test (for CSS codes), black, lint, py39 tests (#361) * black + lint * Add files via upload * Update stim_tools.py * Update css_code.py * Grace's change requests (#363) 1) stim repeat block is still needed 2) specify what noise model means * per review * Documentation and functions (#374) * fix linting issues --------- Co-authored-by: hetenyib <[email protected]>
Removed cap on pylint Added compatibility for numpy>=1.25.0 Co-authored-by: Grace <[email protected]>
Co-authored-by: grace-harper <[email protected]>
Co-authored-by: grace-harper <[email protected]>
…381) * replace `execute` with `backend.run()` in `test_repetitionmatcher.py` * replace `execute` with `backend.run()` in `test_circuitmatcher.py` * replace `execute` with `backend.run()` in `test_heavy_hex_decoder.py` * replace `execute` with `backend.run()` in `faultsampler.py` * replace `execute` with `backend.run()` in `faultenumerator.py` * formatting * re-format test_repetitionmatcher.py --------- Co-authored-by: grace-harper <[email protected]>
#378) * Migration from QasmSimulator to qiskit_aer's AerSimulator * eliminate execute from imports (#1) * remove execute import from faultsampler.py * remove execute imports from faultenumerator.py * remove execute import from test_heavy_hex_decoder.py * remove execute import from test_repetitionmatcher.py * remove execute import from test_circuitmatcher.py --------- Co-authored-by: grace-harper <[email protected]>
* Removed old files and test * Corrected __init__.py for deleted old files --------- Co-authored-by: grace-harper <[email protected]>
* add aer decoding graph creation * avoid scheduling when no dd * update dd * remove version cap * polish error coords and remove invalid edges * add double length time edges when there are no resets * keep error_num an int * measurement coords for reset=False * a little polish * fix minimal issue * all access to sample number for error probs * all access to sample number for error probs * improve barriers for final readout and make barriers default * remove provider * readd provider * change provider version * change correct number of echos --------- Co-authored-by: grace-harper <[email protected]>
Co-authored-by: grace-harper <[email protected]>
* fix make_syndrome_graph * Update test_rep_codes.py test logical 1 ARCs
…nctionality into ClassicFibDecoder * ClassicFibDecoder -> ClassicFibonacciDecoder * Added Documentation * Pylint/Black Adherence
grace-harper
force-pushed
the
289_classic_fib_decoder
branch
from
October 2, 2023 21:05
5ca08aa
to
c8a8653
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Details and comments