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

Remove non-deterministic hash from circuit diagram. #4712

Merged
merged 2 commits into from
Nov 29, 2021

Conversation

thanacles
Copy link

This is to fix bug #4240

@thanacles thanacles requested review from cduck, vtomole and a team as code owners November 28, 2021 02:01
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Nov 28, 2021
@thanacles thanacles requested a review from viathor November 28, 2021 02:01
@CirqBot CirqBot added the size: S 10< lines changed <50 label Nov 28, 2021
@@ -88,11 +88,6 @@ def device(self) -> devices.Device:
def __hash__(self):
return hash((self.moments, self.device))

def diagram_name(self):
Copy link
Author

@thanacles thanacles Nov 28, 2021

Choose a reason for hiding this comment

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

This is no longer used anywhere within the Cirq library. Do you think it is safe to remove?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems fine to me - I only added it to handle the CircuitOperation tests.

@thanacles thanacles force-pushed the issue4240 branch 2 times, most recently from 581f39e to 2a0b506 Compare November 28, 2021 02:47
Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@@ -88,11 +88,6 @@ def device(self) -> devices.Device:
def __hash__(self):
return hash((self.moments, self.device))

def diagram_name(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Seems fine to me - I only added it to handle the CircuitOperation tests.

@95-martin-orion 95-martin-orion merged commit d7611dc into quantumlib:master Nov 29, 2021
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
* Remove non-deterministic hash from circuit diagram.

* Fix CI issues.

Co-authored-by: Nate Thompson <thanacles@google.com>
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
* Remove non-deterministic hash from circuit diagram.

* Fix CI issues.

Co-authored-by: Nate Thompson <thanacles@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining. size: S 10< lines changed <50
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants