-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate the gate definition from the QubitCircuit.propagators method (…
…#83) - Merge the duplicated `QubitCircuit.propagators` methods. - Move the definition for gate operators to the `Gate` class: one method defining the compact gate operator as Qobj, while the other one expands it to the full Hilbert space. This makes it easier to define subclasses for each gate later. - Rename a previously undocumented `QubitCircuit.get_inds` method to `get_all_qubits` and add documentation. It was added recently but never documented. There are two new method for `Gate`: `get_qobj` and `get_compact_qobj`. Although they could be merged into one, I made them two different methods because for custom gate, I wish that the user only need to define `get_compact_qobj`, without having to consider permutation and expanding etc. In `get_qobj`, we take care of that.
- Loading branch information
Showing
4 changed files
with
177 additions
and
223 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
Oops, something went wrong.