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: Abstract WORDSIZE to specify maxwidth on qasm conversion #204

Merged
merged 5 commits into from
Jul 16, 2024

Conversation

qartik
Copy link
Member

@qartik qartik commented Jul 15, 2024

Description

Makes pytket-phir compatible with pytket version 1.30.0 while maintaining backward compatibility.

Fixes: #203

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog with any user-facing changes

cqc-alec
cqc-alec previously approved these changes Jul 15, 2024
@qartik qartik requested a review from qciaran July 15, 2024 15:30
dlucchetti
dlucchetti previously approved these changes Jul 15, 2024
@@ -31,7 +31,7 @@ dependencies = [

[project.optional-dependencies]
docs = ["sphinx", "pydata_sphinx_theme"]
phirc = ["projectq", "quantum-pecos>=0.5.0.dev10"]
phirc = ["projectq", "quantum-pecos>=0.6.0.dev2"]
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -544,7 +556,7 @@ def get_decls(qbits: set["Qubit"], cbits: set[tkBit]) -> list[dict[str, str | in
decls += [
{
"data": "cvar_define",
"data_type": "u32",
"data_type": f"i{WORDSIZE}",
Copy link
Member Author

@qartik qartik Jul 15, 2024

Choose a reason for hiding this comment

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

Changing to i64 as the default as per the spec. Tested with previous version of pytket to check that i32 works as well.

@qartik qartik merged commit bf714a2 into main Jul 16, 2024
6 checks passed
@qartik qartik deleted the 203-incorrect-bitwidth-for-qasm-input-with-pytket-1300 branch July 16, 2024 14:36
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.

Incorrect bitwidth for QASM input with pytket 1.30.0
4 participants