-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: align the
keep_only_odd
logic between backends (#55)
* refactor: quimb_layers.LayerModel.keep_only_odd logic Rather than having the `.terms` of the `LayerModel` report confusing values, this refactors the internal workings of this method to be in-line with the tenpy-based implementation. This also removes an unnecessary factor of 2.0 in the Rz gate conversion. In doing so, this commit ensures that the reported Hamiltonian interactions terms are compatible between the quimb- and tenpy-based implementations. * fix: assertion accuracy for Python 3.9 * refactor: remove the scaling_factor keyword argument * fix: adapt convergence check for MacOS in CI
- Loading branch information
Showing
10 changed files
with
79 additions
and
96 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
8 changes: 8 additions & 0 deletions
8
releasenotes/notes/quimb-layers-keep-only-odd-bd6c831bb50c18b7.yaml
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,8 @@ | ||
--- | ||
upgrade: | ||
- | | ||
The ``keep_only_odd`` attribute of :class:`.quimb_layers.LayerModel` has | ||
been removed. The internal workings have been refactored to ensure that data | ||
reported by its ``terms`` attribute (which is inherited from the base class) | ||
is already taking the ``keep_only_odd`` argument of the | ||
:meth:`.quimb_layers.LayerModel.from_quantum_circuit` constructor method. |
6 changes: 6 additions & 0 deletions
6
releasenotes/notes/remove-scaling-factor-064e157afdfeadc9.yaml
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,6 @@ | ||
--- | ||
upgrade: | ||
- | | ||
The ``scaling_factor`` keyword argument of the ``from_quantum_circuit`` | ||
constructor methods has been removed. It is not actually needed and was | ||
merely adding an additional (confusing) re-scaling. |
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