qiskit/test/python/qasm
Jake Lishman e016f9ca61
Remove Sabre's manual insertion-order iteration and unnecessary sorts (#9560)
* Remove Sabre's manual insertion-order iteration and unnecessary sorts

The manual insertion-order tracking was initially added in 02a1939
(gh-9012) during a complete rewrite of the scoring algorithms for Sabre
to demonstrate that the new algorithm could be made fully RNG
compatible.  It maintained the identical iteration order to the previous
iteration once the front-layer data structure was swapped from being a
raw list to hash-based.

The new data structure doesn't require the manual tracking to be
reproducible as long as the iteration order is independent of the hash
seed.  This swaps the relevant places over the `IndexMap` to be able to
remove a lot of the manual tracking.  In casual testing, this didn't
appear to have much effect on performance, but the resulting code is
much simpler.

The sorts (and deliberate canonicalisation of the swaps) was necessary
to match RNG compatibility in the pre-relative-score Sabre, but since
the swaps are now iterated through in a deterministic order and
guaranteed to be generated only once each (the previous version used a
hashset to remove duplicates), neither step is necessary.

For a QV circuit of depth 5 at 1081 qubits on heavy hex, this is worth
almost a 2x speedup in routing performance.

* Fix RNG-related tests

* Add RNG-change note
2023-02-15 00:08:30 +00:00
..
TestBasisTranslator_skip_target.qasm Update basis equivalence test to be more specific (#6532) 2021-06-11 15:14:50 +00:00
TestsBasicSwap_a_cx_to_map.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsBasicSwap_handle_measurement.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsBasicSwap_initial_layout.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsLookaheadSwap_a_cx_to_map.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsLookaheadSwap_handle_measurement.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsLookaheadSwap_initial_layout.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsSabreSwap_a_cx_to_map.qasm Sabre layout and routing transpiler passes (#4537) 2020-06-23 12:35:17 +00:00
TestsSabreSwap_handle_measurement.qasm Remove Sabre's manual insertion-order iteration and unnecessary sorts (#9560) 2023-02-15 00:08:30 +00:00
TestsSabreSwap_initial_layout.qasm Sabre layout and routing transpiler passes (#4537) 2020-06-23 12:35:17 +00:00
TestsStochasticSwap_a_cx_to_map.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
TestsStochasticSwap_handle_measurement.qasm Implement multithreaded stochastic swap in rust (#7658) 2022-02-28 21:49:54 +00:00
TestsStochasticSwap_initial_layout.qasm pickles to QASM (#4226) 2020-04-23 03:51:42 +00:00
all_gates.qasm Fixes QASM parser to handle U (#6077) 2021-03-25 21:27:02 +00:00
entangled_registers.qasm Modify linux 3.7 CI job to install from sdist (#6175) 2021-04-10 14:37:26 +00:00
example.qasm start of the json backend 2017-06-27 16:33:41 -04:00
example_fail.qasm First tests for the parser. (#60) 2017-09-08 16:48:57 +02:00
example_if.qasm Fix "if" not having Node children, add test file 2017-10-02 10:44:16 -04:00
example_minor_version_fail.qasm Reject other QASM versions in QASM 2 parser (#7456) 2022-01-18 19:17:16 +00:00
example_version_2.qasm Reject other QASM versions in QASM 2 parser (#7456) 2022-01-18 19:17:16 +00:00
example_version_fail.qasm Reject other QASM versions in QASM 2 parser (#7456) 2022-01-18 19:17:16 +00:00
move_measurements.qasm Fix #674: Measurements before swap mapping (#691) 2018-07-30 11:30:37 +02:00
random_n5_d5.qasm More use of sympy internally (#196) 2017-12-21 20:10:51 +01:00