-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes for new adder and multiplier gates classes (#13530)
* Fixes to AdderGate classes Added define method to HalfAdder, FullAdder, and ModularAdder classes to allow constructing Operators from quantum circuits containing such adder gates. Fixing plugins related to adder_ripple_v95, the plugins can be used only if n-1 clean ancillas are available. Improved the default adder plugins to choose the best decomposition based on the number of state qubits and the number of ancilla qubits. * Adding tests for the case that adder plugins do not apply * Constructing Operators from circuits with MultiplierGates * release notes * docstring fix * apply suggestions from code review * futher improving tests based on additional review comments
- Loading branch information
1 parent
17a2ccc
commit b9ea266
Showing
7 changed files
with
279 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
fixes: | ||
- | | ||
Added default definitions for :class:`.FullAdderGate`, :class:`.HalfAdderGate`, | ||
:class:`.ModularAdderGate` and :class:`.MultiplierGate` gates, allowing to | ||
contruct :class:`.Operator`\s from quantum circuits containing these gates. | ||
- | | ||
Fixed the number of clean ancilla qubits required by | ||
:class:`.FullAdderSynthesisV95`, :class:`.HalfAdderSynthesisV95`, and | ||
:class:`.ModularAdderSynthesisV95` plugins. | ||
- | | ||
Added missing :class:`.FullAdderSynthesisDefault` plugin that chooses the best | ||
decomposition for :class:`.FullAdderGate` based on the number of clean ancilla qubits | ||
available. | ||
- | | ||
Fixed :class:`.HalfAdderSynthesisDefault` and :class:`.ModularAdderSynthesisDefault` | ||
plugins, for :class:`.HalfAdderGate` and :class:`.ModularAdderGate` respectively, | ||
to choose the best decomposition based on the number of clean ancilla qubits available. |
Oops, something went wrong.