Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renamings in circuit/library/data_encoding #4318

Merged
merged 27 commits into from
Apr 30, 2020

Conversation

Cryoris
Copy link
Contributor

@Cryoris Cryoris commented Apr 28, 2020

Summary

Rename the module qiskit/circuit/library/data_encoding to data_preparation as this is more expressive. Also rename the contents to more descriptive names.

Details and comments

Suggestions (can be changed):

PauliExpansion -> PauliEvolutionFeatureMap
FirstOrderExpansion -> ZExpansionFeatureMap
SecondOrderExpansion -> ZZExpansionFeatureMap

Reasons:

  • the circuits consist of time evolutions of Pauli strings and are known as "feature maps" in literature
  • pauli_evolution would be nice because it is short, but these circuits do also the repetitions, entanglements and H-layers on top of the evolutions
  • first-order expansion is the special case of the Pauli string Z
  • second-order expansion is the special case of the Pauli strings ZZ and Z

@jaygambetta
Copy link
Member

what about
PauliFeatureMap
LocalFeatureMap
TwoLocalFeatureMap

@Cryoris
Copy link
Contributor Author

Cryoris commented Apr 28, 2020

I'm fine with PauliFeatureMap 👍
Local and TwoLocal however might be a bit misleading since these classes don't accept arbitrary local and two local gates (for which you would use TwoLocal) but really only use exp(i*t*Z) and exp(i*t*ZZ). How about ZFeatureMap or PauliZFeatureMap instead?

@jaygambetta
Copy link
Member

I'm good with ZFeatureMap and ZZFeatureMap. You are correct for some reason i was thinking i could make it X and XX but since we use the H at the start only Z makes sense.

@kdk kdk added this to the 0.14 milestone Apr 28, 2020
jaygambetta
jaygambetta previously approved these changes Apr 28, 2020
jaygambetta
jaygambetta previously approved these changes Apr 28, 2020
Comment on lines 163 to 165
RY
RYRZ
RYRZAnsatz
SwapRZ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only one of these we are going to call Ansatz?

jaygambetta
jaygambetta previously approved these changes Apr 29, 2020
jaygambetta
jaygambetta previously approved these changes Apr 29, 2020
jaygambetta
jaygambetta previously approved these changes Apr 29, 2020
@ajavadia ajavadia merged commit 250068a into Qiskit:master Apr 30, 2020
@Cryoris Cryoris deleted the data-preparation-renaming branch April 30, 2020 08:18
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* renamings

* remove 'evolution' and ryrz -> ryrzansatz

* more renaming, missing: SwapRZ

* put ry/ryrz naming on hold

* rename n local circuits

* fix test

* try to fix sphinx

* fix spacing??

Co-authored-by: Jay Gambetta <jay.gambetta@us.ibm.com>
Co-authored-by: Kevin Krsulich <kevin.krsulich@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants