-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve interface for bloqs with specialized single-qubit-controlled …
…versions (#1451) * get_ctrl_system for bloqs with custom single-qubit-controlled implementations * replace uses of old interface * replace uses of old interface * specialize when `ctrl_spec.num_qubits == 1` * add test example of bloq with a separate controlled bloq * refactor: pass parameters instead of using protocol * `CtrlSpec.get_single_control_bit` to get the correct control bit in the single qubit case. * cleanup * use new single control bit method * test ctrl bit * `control` -> `ctrl` * don't pass `bloq` * use callable * update examples * mypy * add helper method which accepts bloqs instead of a callable * upgrade more usecases * typo * fix bug in adder * rename file to `specialized_ctrl` * rename function to `get_ctrl_system_1bit_cv` * mypy * cleanup design - use a helper bloq that accepts CU to build CCU - do not pass `bloq_without_ctrl` * add exposed helpers with clearer types --------- Co-authored-by: Matthew Harrigan <[email protected]>
- Loading branch information
1 parent
e3aeee0
commit 7c6715b
Showing
12 changed files
with
650 additions
and
23 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
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
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
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
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
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
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
Oops, something went wrong.