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

Add Cifford.from_label method #4222

Merged
merged 7 commits into from
Apr 28, 2020
Merged

Conversation

chriseclectic
Copy link
Member

@chriseclectic chriseclectic commented Apr 22, 2020

Summary

Adds Clifford.from_label method.

This functions like Operator.from_label but only for single-qubit clifford gates I,X,Y,Z,H,S.

Todo

  • Add tests
  • Add release note

@chriseclectic chriseclectic added this to the 0.14 milestone Apr 22, 2020
@jaygambetta
Copy link
Member

i agree with adding this but i think you need to change the reverse from to_dict to to_label

@chriseclectic
Copy link
Member Author

@jaygambetta there is no reverse to this function, it is a convenience for initializing simple tensor-product Clifford states.

There are already to_dict and from_dict methods that can serialize/deserialize Clifford as a python dict object. These are very different to the single-qubit gate string labels. Eg Clifford.from_label('I').to_dict() will return {"stabilizer": ["+Z"], "destabilizer": ["+X"]}

@chriseclectic chriseclectic changed the title [WIP] Add Cifford.from_label method Add Cifford.from_label method Apr 24, 2020
@chriseclectic chriseclectic added the Changelog: New Feature Include in the "Added" section of the changelog label Apr 24, 2020
@mergify mergify bot merged commit 06c030e into Qiskit:master Apr 28, 2020
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* Add Cifford.from_label method

* Add release note

* Add test

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants