Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Bugfix/dexter2206/zqs 770 add symbol ordering with fixed names order #426

Conversation

dexter2206
Copy link
Contributor

This implements a variant of natural symbol ordering in which symbol names (without indices) are ordered in some custom fashion.

For instance, consider QAOA ansatz with symbols ordered as gamma_0 < beta_0 < gamma_1 < beta_1 <.....

This is an example of natural_keys_fixed_names_order(["gamma", "beta"]) key. In other words, we compare indices first, and names second, but names are compared according to some user-defined ordering.

@dexter2206 dexter2206 requested a review from mstechly September 22, 2021 12:58
@codecov
Copy link

codecov bot commented Sep 22, 2021

Codecov Report

Merging #426 (1df5203) into dev (994ac0c) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #426      +/-   ##
==========================================
+ Coverage   90.92%   90.94%   +0.01%     
==========================================
  Files          63       63              
  Lines        3571     3577       +6     
  Branches      574      575       +1     
==========================================
+ Hits         3247     3253       +6     
  Misses        217      217              
  Partials      107      107              
Impacted Files Coverage Δ
...python/zquantum/core/circuits/symbolic/__init__.py 100.00% <100.00%> (ø)
...python/zquantum/core/circuits/symbolic/_sorting.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 994ac0c...1df5203. Read the comment docs.

@dexter2206 dexter2206 merged commit d285f7f into dev Sep 22, 2021
@dexter2206 dexter2206 deleted the bugfix/dexter2206/ZQS-770-add-symbol-ordering-with-fixed-names-order branch September 22, 2021 14:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants