Skip to content
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

Upgrade mapper/router to new IR #467

Merged
merged 4 commits into from
May 30, 2023
Merged

Upgrade mapper/router to new IR #467

merged 4 commits into from
May 30, 2023

Conversation

pablolh
Copy link
Contributor

@pablolh pablolh commented Dec 5, 2022

A long journey through the mapper

  • New IR in place of old IR
  • New DDG is used in place of old scheduler
  • Various code improvements (e.g. return result instead of modify reference parameter, paths as lists)
  • FreeCycle stores its map as an association list mapping new IR references to uints
  • Had to implement "remaining" path length in new DDG. Seems there is already some sort of implementation of criticality but those require scheduling to run first
  • Random number generation is seeded with constant seed

Note: the code is still quite untested. I've done my best to check that the program works as expected, but given the number of options and complexity of the code, only proper unit testing for each part and class (e.g. AlterTest, PastTest) can give a good guarantee of functionality. This would take quite some time to implement.

I have updated the docs to signal when an option is only valid when using the minextend/minextendrc route heuristics.

@pablolh pablolh force-pushed the newirmapper branch 2 times, most recently from 3ef487f to d32674e Compare December 7, 2022 14:35
@pablolh pablolh force-pushed the newirmapper branch 3 times, most recently from 9b9a8a8 to e5c452f Compare December 19, 2022 13:29
@pablolh pablolh requested a review from jvansomeren December 19, 2022 15:30
@pablolh pablolh marked this pull request as ready for review December 19, 2022 15:30
@pablolh
Copy link
Contributor Author

pablolh commented Dec 19, 2022

There is a new test map_test.cc that is not really a unit test but gives some guarantee as to preservation of the semantics of the circuit. It's quite basic though.
There is potentially more work to do on this mapper/router but let's not spend too much time on this since there are more urgent matters. namely removing the old IR

My work ethics tell me to signal that the decomposition to primitives is quite untested since I haven't set mapdecompositionrulepattern in any test (so the old tests now don't make use of the finer-grained scheduling obtained by decomposing to primitives) and I haven't updated the cclight platform configurations to use new-style decompositions.

See also #482

jvansomeren

This comment was marked as outdated.

jvansomeren

This comment was marked as resolved.

@jvansomeren

This comment was marked as resolved.

@pablolh

This comment was marked as resolved.

pablolh

This comment was marked as resolved.

@pablolh pablolh force-pushed the newirmapper branch 2 times, most recently from db18f71 to 4729ff5 Compare May 4, 2023 14:56
pablolh added 2 commits May 4, 2023 18:20
Allow an iteration order that does not depend on where the statements
are allocated in memory. Indeed, utils::One::operator< was used to order
the keys in the map, which can change between runs.
@pablolh pablolh force-pushed the newirmapper branch 10 times, most recently from ab242ca to 15e0563 Compare May 9, 2023 13:12
@pablolh pablolh force-pushed the newirmapper branch 4 times, most recently from fa24715 to 9d15589 Compare May 22, 2023 13:44
@jvansomeren jvansomeren dismissed their stale review May 23, 2023 10:12

Has been solved

pablolh added 2 commits May 23, 2023 14:32
- New IR in place of old IR
- New DDG is used in place of old scheduler
- Various code improvements (e.g. return result instead of modify
  reference parameter)
- Remove BASE_RC and MINEXTEND_RC mapper options
- Really order available gates by decreasing "criticality" which was the
original intent but was gonne from the code.
- create C++ version of decomposed_U tests for debugging
- this test is flaky and skipped in CI
- skip also the Python unitary tests in CI
src/ql/pass/map/qubits/map/detail/mapper.h Show resolved Hide resolved
src/ql/pass/map/qubits/map/detail/mapper.h Show resolved Hide resolved
src/ql/pass/map/qubits/map/detail/mapper.h Show resolved Hide resolved
tests/test_multi_core_4x4_full.json Show resolved Hide resolved
tests/cc/test_cfg_none_simple.json Show resolved Hide resolved
tests/golden/test_mapper_lingling7_last.qasm Show resolved Hide resolved
tests/golden/test_mapper_allD_last.qasm Show resolved Hide resolved
tests/golden/test_mapper_allNN_last.qasm Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants