Skip to content

Fix apply_gate and apply_channel for GPUs#243

Merged
scarrazza merged 9 commits intomainfrom
apply_gate
Mar 1, 2026
Merged

Fix apply_gate and apply_channel for GPUs#243
scarrazza merged 9 commits intomainfrom
apply_gate

Conversation

@renatomello
Copy link
Contributor

@renatomello renatomello commented Mar 1, 2026

@renatomello renatomello requested a review from scarrazza March 1, 2026 05:40
@renatomello renatomello self-assigned this Mar 1, 2026
@codecov
Copy link

codecov bot commented Mar 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d25ee78) to head (d69b355).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #243   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          668       669    +1     
=========================================
+ Hits           668       669    +1     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@renatomello renatomello added the bug Something isn't working label Mar 1, 2026
@renatomello renatomello changed the title Fix apply_gate for GPUs Fix apply_gate and apply_channel for GPUs Mar 1, 2026
@renatomello renatomello marked this pull request as ready for review March 1, 2026 06:23
@renatomello renatomello linked an issue Mar 1, 2026 that may be closed by this pull request
@scarrazza
Copy link
Member

scarrazza commented Mar 1, 2026

Thanks @renatomello. My last commit fixes a series of errors of this type when running pytest on GPU:

E           cupy.cuda.compiler.CompileException: qibojit/env/lib/python3.12/site-packages/cupy/_core/include/cupy/_cccl/thrust/thrust/detail/config/cpp_dialect.h(74): catastrophic error: #error directive: Thrust requires at least C++17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
E             #    error Thrust requires at least C++17. Define CCCL_IGNORE_DEPRECATED_CPP_DIALECT to suppress this message.
E                  ^
E
E           1 catastrophic error detected in the compilation of "/tmp/tmpoo1e14fs/41bab56b6448eeb8d40b98d19aedbe370eef70f1.cubin.cu".
E           Compilation terminated.****

Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

The backend test which fails for numba-dia appears ramdomly on my local system. @renatomello could you please have a look?

@renatomello
Copy link
Contributor Author

renatomello commented Mar 1, 2026

The backend test which fails for numba-dia appears ramdomly on my local system. @renatomello could you please have a look?

It's been happening for a while. It seems to be a scipy issue instead of a qibo issue. It is also not deterministic, so it is hard to reproduce. My best guess is that it happens whenever the sparse dia matrix has an empty diagonal, but anyone's guess is as good as mine.

@scarrazza scarrazza merged commit 2f30049 into main Mar 1, 2026
27 checks passed
@renatomello renatomello deleted the apply_gate branch March 4, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VRAM usage increase in main vs v0.1.12

2 participants