Skip to content

Conversation

@elias-utf8
Copy link

qcaml.0.1.4

Experimental OCaml library for quantum computing simulation
QCaml is a lightweight OCaml library for experimenting with quantum states,
gates and measurements. It provides tools for learning quantum computing
concepts and visualizing qubit states on the Bloch sphere.

Features:

  • Single qubit state representation with complex amplitudes
  • Fundamental quantum gates (Hadamard, Pauli-X/Y/Z)
  • Quantum measurements with probabilistic state collapse
  • Interactive Bloch sphere visualization using OpenGL/GLUT
  • Comprehensive test suite


🐫 Pull-request generated by opam-publish v2.7.0

@elias-utf8 elias-utf8 mentioned this pull request Nov 5, 2025
Copy link
Member

@jmid jmid left a comment

Choose a reason for hiding this comment

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

OK, this is now down to

# In file included from /usr/include/GL/glut.h:17,
#                  from bloch_sphere.c:1:
# /usr/include/GL/freeglut_std.h:148:13: fatal error: GL/glu.h: No such file or directory
#   148 | #   include <GL/glu.h>
#       |             ^~~~~~~~~~
# compilation terminated.

As I am a GL novice, @Leonidas-from-XIV what do you think?

Otherwise, this LGTM - thanks for your effort!

@Leonidas-from-XIV
Copy link
Contributor

@jmid That's a good investigation and I concur. freeglut lists glu as make dependency (which I assume to be a equivalent to a build dependency in OPAM terms), but looking at glut.h, line 198 it seems like everyone using glut.h will also need glu.h which thus needs to be installed.

I'll try to create an account in the Arch Linux bug tracker and file it there.

@elias-utf8
Copy link
Author

OK, this is now down to

* a Cygwin MinGW failure
  
  * the paths are slightly different there https://www.cygwin.com/packages/noarch/mingw64-x86_64-freeglut/mingw64-x86_64-freeglut-2.8.1-1 (and the older version available doesn't include a .pc-file for pkg-config)

* an Arch failure, which I understand as an Arch packaging failure. From the below error it seems including `glut.h` includes `freeglut_std.h` which needs `GL/glu.h` - however that isn't installed, so it seems a dependency on the `glu` package https://archlinux.pkgs.org/rolling/archlinux-extra-x86_64/glu-9.0.3-2-x86_64.pkg.tar.zst.html is missing in Arch's `freeglut` package 🤔
# In file included from /usr/include/GL/glut.h:17,
#                  from bloch_sphere.c:1:
# /usr/include/GL/freeglut_std.h:148:13: fatal error: GL/glu.h: No such file or directory
#   148 | #   include <GL/glu.h>
#       |             ^~~~~~~~~~
# compilation terminated.

As I am a GL novice, @Leonidas-from-XIV what do you think?

Otherwise, this LGTM - thanks for your effort!

Okay, great! Thank you for the reviews :))

@Leonidas-from-XIV
Copy link
Contributor

I'll try to create an account in the Arch Linux bug tracker and file it there.

I've created a ticket here, but I have a suspicion that it might be an issue on our side, as glu is a makedepend and from what I understand we should probably install makedepends when trying to build packages that depend on these libraries.

@elias-utf8
Copy link
Author

elias-utf8 commented Nov 7, 2025

I'll try to create an account in the Arch Linux bug tracker and file it there.

I've created a ticket here, but I have a suspicion that it might be an issue on our side, as glu is a makedepend and from what I understand we should probably install makedepends when trying to build packages that depend on these libraries.

Thank you for your feedback, I will try to add makedepends this evening and see what happens 👍🏻

@jmid
Copy link
Member

jmid commented Nov 7, 2025

I've created a ticket here, but I have a suspicion that it might be an issue on our side, [...]

Your PR has now been merged - thanks @Leonidas-from-XIV! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants