-
Notifications
You must be signed in to change notification settings - Fork 981
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve speed of random circuit generation (#4428)
Fixes #4337 Changes single-qubit layer generation into two steps. First step creates the `{qid: gate_index}` lookup so that we can compare against gate_index equality instead of gate equality. Then the second step is generating the moment from that lookup. ~~Note the change in algo will cause the random circuits generated by a specific seed to change (hence the change in one test case). If this is a blocker, it should be possible to revert to the old retry algo but just compare indexes instead of gates.~~ Reverted to the retry algo since some of the xeb tests were tied to the generated circuit. Also note any change like this assumes that each gate only appears once in the allowed-gates list. I assume that's a safe assumption. @mpharrigan
- Loading branch information
Showing
1 changed file
with
26 additions
and
16 deletions.
There are no files selected for viewing
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