Skip to content

Use TensorCore tensor interface - #93

Merged
Krastanov merged 4 commits into
qojulia:mainfrom
Krastanov-agent:codex/tensorcore-tensor
Sep 4, 2026
Merged

Use TensorCore tensor interface#93
Krastanov merged 4 commits into
qojulia:mainfrom
Krastanov-agent:codex/tensorcore-tensor

Conversation

@Krastanov-agent

Copy link
Copy Markdown
Contributor

Summary

  • extend the shared TensorCore tensor and bindings
  • preserve the existing QuantumInterface tensor methods and zero-argument error
  • add binding regression coverage and prepare version 0.4.4

Tests

  • focused basis tests
  • Aqua
  • full QuantumInterface suite (running)
  • dependent package JET/Aqua suites (running)

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 34.22%. Comparing base (adda232) to head (8cd0c14).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/tensor.jl 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
+ Coverage   34.14%   34.22%   +0.07%     
==========================================
  Files          15       15              
  Lines         451      450       -1     
==========================================
  Hits          154      154              
+ Misses        297      296       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Krastanov-agent

Copy link
Copy Markdown
Contributor Author

Validation update:

  • The full QuantumInterface suite passes locally on Julia 1.12.6; PR CI passes Julia 1.6, current Julia, and Julia alpha.
  • The JET job fails before analyzing QuantumInterface because the existing test imports the removed JET.ReportPass API from JET 0.12.1.
  • This is a pre-existing baseline failure: it reproduces on untouched upstream/main locally and in the latest main-branch JET job.

I am leaving the unrelated JET harness migration out of this minimal PR. Downstream Aqua/JET validation is still running.

@Krastanov-agent

Copy link
Copy Markdown
Contributor Author

Downstream validation completed on Julia 1.12.6 with local QuantumInterface 6b9aea1 (v0.4.4) and TensorCore 0.1.1:

Package Aqua/general JET Result
QuantumOpticsBase 2,270 pass, 2 expected broken 86 pass, 69 marked broken pass
QuantumClifford 346,547 pass, 9 expected broken 39 pass, 2 expected broken pass; direct tensor(bell_state, bell_state) JET check passes
QuantumSymbolics Aqua 12/12; general 481 pass, 2 expected broken 1 pass, 1 expected broken pass
Gabs 1,245 pass, 4 expected broken pass at existing 15-report threshold pass; shared tensor/ identity probe passes
QuantumSavory Aqua 12/12 one report/failure identical report with registered QI 0.4.3; baseline, unrelated to tensor
QuantumOptics Aqua passes; 2,667 pass, 1 expected broken, 2 allocation assertions fail 43/43 allocation failures reproduce with identical counts on QI 0.4.3; baseline

No downstream source changes were needed. An independent review of both commits found no issues. Hosted QOB and QuantumSymbolics breakage jobs are green; the remaining hosted jobs are still completing.

@Krastanov-agent

Copy link
Copy Markdown
Contributor Author

Hosted downstream breakage run is complete:

  • PASS: QuantumOpticsBase, QuantumSymbolics, and QuantumClifford.
  • QuantumOptics failed on the same two allocation-equality assertions reproduced locally with both this branch and released QuantumInterface 0.4.3. Its hosted Aqua failure is caused by the breakage workflow adding QuantumInterface as a direct dependency; the same check was already red on Specialize bipartite basis transformations for inference #92.
  • QuantumSavory passed 15,120 tests and failed only Aqua's persistent-task probe after its precompilation subprocess did not create done.log. The same hosted Aqua check was already red on Specialize bipartite basis transformations for inference #92; local Aqua passed 12/12. Its separate local JET finding was also unchanged with released QuantumInterface 0.4.3.

Run: https://github.com/qojulia/QuantumInterface.jl/actions/runs/33414496806

No downstream failure attributable to the TensorCore migration was found. I have not changed unrelated downstream baselines.

@Krastanov-agent

Copy link
Copy Markdown
Contributor Author

Follow-up pushed in e84e7e0:

  • removed the zero-argument tensor() extension;
  • made the Basis, AbstractOperator, and StateVector variadic reducers require a first owned argument, avoiding the three zero-length vararg ambiguities;
  • restored unconfigured Aqua.test_all(QuantumInterface).

Focused results on Julia 1.12.6:

  • basis tests: 38/38 pass;
  • Aqua: 11/11 pass, including piracy and ambiguity checks;
  • full non-JET suite: 73/73 pass;
  • explicit dispatch check: no zero-argument applicability, no tensor ambiguities, and the function remains owned by TensorCore.

Downstream Aqua/JET checks are running against this commit.

@Krastanov-agent

Copy link
Copy Markdown
Contributor Author

Local downstream follow-up for e84e7e0 is complete:

  • QuantumOpticsBase: tensor behavior and JET pass. Aqua exposes one new zero-arity ambiguity between tensor(Ket...) and tensor(Bra...); the broader suite has 2,269 pass, 1 Aqua failure, and 2 expected broken.
  • QuantumOptics: tensor behavior, Aqua, and JET all pass.
  • QuantumClifford: tensor behavior and JET pass at the prior baseline. Aqua exposes 10 zero-arity intersections among its existing typed-vararg tensor methods; every other Aqua category, including piracy, passes.
  • Gabs: tensor behavior and its declared JET baseline pass. It has no declared Aqua test; a supplemental check finds no tensor piracy.
  • QuantumSymbolics: JET remains at the prior accepted baseline. Aqua is 11/12 because its existing tensor(xs::SymQObj{T}...) now exposes an unbound T at zero arguments.
  • QuantumSavory: Aqua passes 12/12. JET has exactly the same sole switches.jl:174 report previously reproduced with QuantumInterface 0.4.3.

All concrete tensor identity/operation checks pass and all packages resolve the same TensorCore-owned generic. Removing QuantumInterface's global tensor() disambiguator necessarily exposes downstream methods whose typed varargs still accept zero arguments. The unobtrusive downstream remedy is the same leading-owned-argument signature used here; I have not edited those repositories.

@Krastanov-agent

Copy link
Copy Markdown
Contributor Author

Hosted breakage run is complete: https://github.com/qojulia/QuantumInterface.jl/actions/runs/33423155538

  • QuantumOpticsBase confirms the local result exactly: 2,269 pass, one new Ket/Bra zero-arity Aqua ambiguity, 2 expected broken.
  • QuantumClifford confirms the local result: 359,495 pass, one Aqua failure containing the 10 zero-arity tensor ambiguities, 9 expected broken.
  • QuantumOptics has only its previously reproduced two allocation assertions plus the breakage workflow's direct-dependency Aqua artifact.
  • QuantumSavory again passes 15,120 tests and fails only Aqua's hosted persistent-task subprocess probe, as on the preceding run.
  • The QuantumSymbolics hosted runner lost communication with GitHub before publishing logs. Its local declared checks are complete: JET unchanged; Aqua 11/12 on the existing zero-argument-capable symbolic tensor method's unbound T.

No additional source change is indicated. Downstream zero-length vararg signatures need repository-local follow-ups; restoring QuantumInterface.tensor() would reintroduce the piracy this update removes.

@Krastanov
Krastanov merged commit 4d9df4e into qojulia:main Sep 4, 2026
5 of 11 checks passed
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