Skip to content

Fortran interface#11

Merged
otbrown merged 39 commits into
developfrom
fortran
Apr 13, 2026
Merged

Fortran interface#11
otbrown merged 39 commits into
developfrom
fortran

Conversation

@m-meller

Copy link
Copy Markdown
Collaborator

Introduced CQ Fortran interface:

  • new modules (under include/fortran) and implementation (under device/fortran and host/fortran)
  • new examples
  • new tests

@m-meller
m-meller requested a review from otbrown February 24, 2026 13:56
@otbrown

otbrown commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

I have updated the call to the time evolution function to reflect the new API in QuEST. A boolean to determine whether the Pauli string should be permuted was added -- for now I've just set it to false, but we should explore the benefits of setting it to true. See QuEST#708.

@otbrown

otbrown commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

...test failure above is just a timing issue, probably not a 'real' failure

@otbrown

otbrown commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

Commenting here as a note to myself: it looks like the fortran qkern subroutine takes a classical reg which is fixed at size NQUBITS. This is probably not correct. We could try to pass it in as a c_ptr but the more "fortranic" way might be to make it an assumed shape integer(c_short) :: arr(:).

A problem for next week anyway!

@otbrown

otbrown commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator

As we discussed on the train, cr should be of arbitrary length in the quantum kernel -- when I attempted this it segfaulted in the registration step (which was a bit odd...).

Hopefully you have more luck getting it working!

@otbrown

otbrown commented Apr 13, 2026

Copy link
Copy Markdown
Collaborator

Thanks Mateusz, LGTM! I should update CQ-spec soon-ish.

@otbrown
otbrown merged commit 93dde09 into develop Apr 13, 2026
4 checks passed
@otbrown
otbrown deleted the fortran branch April 13, 2026 09:58
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