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

fix(qir2cirq): add a parameter 'args' for '_circuit_diagram_info_' #188

Merged
merged 2 commits into from
Nov 1, 2023

Conversation

ztzhu1
Copy link
Contributor

@ztzhu1 ztzhu1 commented Oct 31, 2023

The original function _circuit_diagram_info_ of CustomizedCirqGate lacks a parameter called args, which will cause TypeError when cirq invokes this function.

@refraction-ray
Copy link
Contributor

thanks for the contribution, is this a cirq version related bug? since in https://github.com/tencent-quantum-lab/tensorcircuit/blob/master/tests/test_circuit.py#L948 we have tested the customized gate. if there is cirq version difference for this arg, maybe (self, *args) is more flexible to pass both cases

@ztzhu1
Copy link
Contributor Author

ztzhu1 commented Oct 31, 2023

thanks for the contribution, is this a cirq version related bug? since in https://github.com/tencent-quantum-lab/tensorcircuit/blob/master/tests/test_circuit.py#L948 we have tested the customized gate. if there is cirq version difference for this arg, maybe (self, *args) is more flexible to pass both cases

Aah, I didn't realize that. The version of my cirq is 1.2.0. Thanks for pointing out that😊. Should I close this PR and open a new one?

@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #188 (da04635) into master (56b44c5) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #188   +/-   ##
=======================================
  Coverage   75.51%   75.51%           
=======================================
  Files          67       67           
  Lines       10708    10708           
=======================================
  Hits         8086     8086           
  Misses       2622     2622           
Files Coverage Δ
tensorcircuit/translation.py 83.56% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@refraction-ray
Copy link
Contributor

Aah, I didn't realize that. The version of my cirq is 1.2.0. Thanks for pointing out that😊. Should I close this PR and open a new one?

I think a further commit on your forked branch to define the function as (self, *args) is ok. the pr is auto linked no need to recreate a new pr

@ztzhu1
Copy link
Contributor Author

ztzhu1 commented Oct 31, 2023

Aah, I didn't realize that. The version of my cirq is 1.2.0. Thanks for pointing out that😊. Should I close this PR and open a new one?

I think a further commit on your forked branch to define the function as (self, *args) is ok. the pr is auto linked no need to recreate a new pr

Thanks for your help! I have made a new commit :)

@refraction-ray refraction-ray merged commit c0d6ddd into tencent-quantum-lab:master Nov 1, 2023
@refraction-ray
Copy link
Contributor

LGTM, thanks for the contribution. @all-contributors please add @ztzhu1 for code

Copy link
Contributor

@refraction-ray

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

I've put up a pull request to add @ztzhu1! 🎉

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.

2 participants