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 equiv method to Operator and Statevector classes #2910

Merged
merged 8 commits into from
Aug 6, 2019

Conversation

chriseclectic
Copy link
Member

@chriseclectic chriseclectic commented Aug 5, 2019

Summary

  • Adds equiv method to Operator class that returns True if two operators are equivalent up to global phase.
  • Adds equiv method to Statevector class that returns True if two statevectors are equivalent up to global phase.
  • Adds equiv tests
  • Adds Statevector and DensityMatrix classes to quantum_info.__init__.py

Details and comments

@chriseclectic chriseclectic changed the title add Statevector, DensityMatrix classes to quantum_info init Add equiv method to Operator class Aug 5, 2019
@chriseclectic chriseclectic changed the title Add equiv method to Operator class Add equiv method to Operator and Statevector classes Aug 5, 2019
@chriseclectic chriseclectic added this to the 0.9 milestone Aug 5, 2019
kdk
kdk previously approved these changes Aug 6, 2019
@kdk kdk merged commit 86fb7f9 into Qiskit:master Aug 6, 2019
@chriseclectic chriseclectic deleted the add-quantum-states-init branch November 14, 2019 15:11
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this pull request Aug 5, 2020
* add Statevector, DensityMatrix classes to quantum_info init

* add equiv method to Operator

* Checks if two operators are equivalent up to global phase

* return false rather than raise in equiv

* add Operator.equiv test

* add equiv method to Statevector

* update changelog

* mr lint
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.

None yet

2 participants