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

Migrate express functionality and AbstractRepresentation type to QuantumInterface #93

Merged
merged 6 commits into from
Jan 18, 2025

Conversation

apkille
Copy link
Member

@apkille apkille commented Dec 22, 2024

#92 qojulia/QuantumInterface.jl#46
The problem with this PR and the one in QuantumInterface is that a type piracy is introduced here:

express(s, repr::AbstractRepresentation) = express(s, repr, UseAsState())

I suppose we could migrate AbstractUse and its subtypes to QuantumInterface as well, but

function express(state::Symbolic, repr::AbstractRepresentation, use::AbstractUse)

would then be a type piracy. Plus AbstractUse is intended for dealing with edge cases in symbolic-to-Clifford translations, so to me it doesn't make sense to migrate it up to QuantumInterface.

@apkille apkille requested a review from Krastanov December 22, 2024 09:48
@apkille
Copy link
Member Author

apkille commented Dec 30, 2024

@Krastanov

Copy link
Member

@Krastanov Krastanov 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! Three minor things:

  • The comment about AbstractUse -- I think it makes sense to move this too. E.g. if QuantumClifford is converting an Operator it needs to know whether the user wants a Stabilizer or a CliffordOperator
  • The docstring update (or move)
  • Check that express still shows in the documentation -- now that it does not belong to QuantumSymbolics, it might need to be explicitly included.

Otherwise feel free to merge once CI passes, the Project.toml is bumped, without waiting for another review. I guess that requires the other PR in QuantumInterface to be merged first.

src/QSymbolicsBase/QSymbolicsBase.jl Outdated Show resolved Hide resolved
src/QSymbolicsBase/express.jl Show resolved Hide resolved
@Krastanov
Copy link
Member

Marking it as a draft to remove it from my review queue for now. Convert it back when ready and merge (or ping me to merge).

@Krastanov Krastanov marked this pull request as draft January 16, 2025 16:58
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.22%. Comparing base (be8cb24) to head (36f3903).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
- Coverage   75.46%   75.22%   -0.25%     
==========================================
  Files          19       19              
  Lines         803      791      -12     
==========================================
- Hits          606      595      -11     
+ Misses        197      196       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@apkille apkille marked this pull request as ready for review January 18, 2025 16:56
@apkille apkille merged commit e697f48 into QuantumSavory:main Jan 18, 2025
17 of 19 checks passed
@apkille
Copy link
Member Author

apkille commented Jan 18, 2025

  • Check that express still shows in the documentation -- now that it does not belong to QuantumSymbolics, it might need to be explicitly included.

It still shows in the docs.

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