Skip to content

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 22, 2025

This PR contains the following updates:

Update Change
lockFileMaintenance All locks refreshed

🔧 This Pull Request updates lock files to use the latest dependency versions.


Configuration

📅 Schedule: Branch creation - "before 4am on monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot added dependencies Pull requests that update a dependency file python Anything related to Python code labels Sep 22, 2025
@github-project-automation github-project-automation bot moved this to In Progress in MQT Verification Sep 22, 2025
@renovate renovate bot added the python Anything related to Python code label Sep 22, 2025
@renovate renovate bot enabled auto-merge (squash) September 22, 2025 01:39
@renovate renovate bot force-pushed the renovate/lock-file-maintenance branch 4 times, most recently from 5a1abef to 9d98610 Compare September 27, 2025 13:01
@renovate renovate bot force-pushed the renovate/lock-file-maintenance branch from 9d98610 to 93fff0d Compare October 4, 2025 04:55
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/lock-file-maintenance branch from 93fff0d to 8cd7638 Compare October 4, 2025 08:06
Copy link
Contributor Author

renovate bot commented Oct 7, 2025

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@denialhaag denialhaag self-assigned this Oct 7, 2025
@denialhaag
Copy link
Contributor

@burgholzer, I'm a bit confused here... I already replaced the profiles, and the tests pass for me locally. 🤔

@burgholzer
Copy link
Member

@burgholzer, I'm a bit confused here... I already replaced the profiles, and the tests pass for me locally. 🤔

That is definitely not the only strange thing here..
For some reason, the Python tests are all fetching MQT Core via FetchContent (https://github.com/munich-quantum-toolkit/qcec/actions/runs/18321885866/job/52177392611?pr=720#step:8:14427) although it should be available from the build time dependency to the Python package, which is also found according to the logs.
Something is broken here (and potentially in other repos that depend on MQT Core).

@denialhaag
Copy link
Contributor

Huh... I'll have a look at this tomorrow!

@burgholzer
Copy link
Member

Huh... I'll have a look at this tomorrow!

I dug a little bit into this and this seems to have to do with something that we did to the nlohmann_json dependency over the last couple of releases.
For some reason, it is no longer part of the wheel distribution while it was previously.

If one includes a find_package(mqt-core REQUIRED) call before the FetchContent directive in cmake/ExternalDependencies, one gets a proper error message that is probably swallowed by the FetchContent/find_package integration:

      [stderr]
      fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't figure out the architecture type of: /Users/burgholzer/.local/bin/cmake
      CMake Error at /Users/burgholzer/.local/share/uv/tools/cmake/lib/python3.10/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake:76 (find_package):
        By not providing "Findnlohmann_json.cmake" in CMAKE_MODULE_PATH this
        project has asked CMake to find a package configuration file provided by
        "nlohmann_json", but CMake did not find one.

        Could not find a package configuration file provided by "nlohmann_json"
        with any of the following names:

          nlohmann_jsonConfig.cmake
          nlohmann_json-config.cmake

        Add the installation prefix of "nlohmann_json" to CMAKE_PREFIX_PATH or set
        "nlohmann_json_DIR" to a directory containing one of the above files.  If
        "nlohmann_json" provides a separate development package or SDK, be sure it
        has been installed.
      Call Stack (most recent call first):
        /Users/burgholzer/.cache/uv/builds-v0/.tmpOmKl5v/lib/python3.12/site-packages/mqt/core/share/cmake/mqt-core/mqt-core-config.cmake:23 (find_dependency)
        cmake/ExternalDependencies.cmake:53 (find_package)
        CMakeLists.txt:55 (include)



      *** CMake configuration failed

      hint: This usually indicates a problem with the package or the build environment.

This indicates that the config script is looking for nlohmann_json, which is a public dependency for some of our libraries that we ship with mqt-core, but cannot find it.

@burgholzer
Copy link
Member

Okay, a little more info:
The culprit is munich-quantum-toolkit/core#1021, which explicitly set the install components and, in the process, removed the install of nlohmann_json.
This was released as part of mqt-core v3.1.0 and exists since then 😅 v3.0.2 should be unaffected.

However, all of that is independent from the error here I suppose. For me, the tests here pass as well. I can check on Thursday on my Linux machine, whether I can reproduce the failures.

@denialhaag
Copy link
Contributor

denialhaag commented Oct 8, 2025

I have now created the profiles in an Ubuntu Docker container. The CI should be green now, but now the tests are failing for me locally, of course. 🙃

@denialhaag
Copy link
Contributor

Now that the mqt-core issue is fixed, this can go in, I'd say.

The only problem I do see is that the profile tests will fail on macOS systems. I can change the tests to be skipped on non-Linux systems. What do you think, @burgholzer?

@burgholzer
Copy link
Member

Now that the mqt-core issue is fixed, this can go in, I'd say.

The only problem I do see is that the profile tests will fail on macOS systems. I can change the tests to be skipped on non-Linux systems. What do you think, @burgholzer?

Hm. Previously, these tests were deterministic on all systems if I remember correctly. I don't see an obvious reason why that should have changed. Can we investigate the cause for this so that we better understand if this is expected behavior or whether something is broken here?

@denialhaag
Copy link
Contributor

denialhaag commented Oct 12, 2025

Okay, I think I found the issue.

On macOS, the script below prints 5. On Linux (tested using a python:3.12 Docker image), it prints 10.

from qiskit import QuantumCircuit, transpile
import numpy as np

qc = QuantumCircuit(2)
rng = np.random.default_rng(seed=12345)
param = rng.uniform(-np.pi, np.pi)
qc.cp(param, 0, 1)
print(len(transpile(qc, basis_gates=["id", "rz", "sx", "x", "cx"], optimization_level=2, seed_transpiler=12345)))

Judging by 973ae0f, this platform dependence of transpile() seems to be restricted to p, s, sdg, t, and tdg gates with one control qubit (at least for our test cases).

Should I bring this up with the Qiskit devs? 🤔

@burgholzer
Copy link
Member

Okay, I think I found the issue.

On macOS, the script below prints 5. On Linux (tested using a python:3.12 Docker image), it prints 10.

from qiskit import QuantumCircuit, transpile
import numpy as np

qc = QuantumCircuit(2)
rng = np.random.default_rng(seed=12345)
param = rng.uniform(-np.pi, np.pi)
qc.cp(param, 0, 1)
print(len(transpile(qc, basis_gates=["id", "rz", "sx", "x", "cx"], optimization_level=2, seed_transpiler=12345)))

Judging by 973ae0f, this platform dependence of transpile() seems to be restricted to p, s, sdg, t, and tdg gates with one control qubit (at least for our test cases).

Should I bring this up with the Qiskit devs? 🤔

This might actually be a numpy thing.
What's the value of param printed on macOS?
My linux system produces -1.7131982974314244.
Rotation gates with different angles may have different costs.
Maybe it would be more robust for us to take fixed numbers for the parameters.

@denialhaag
Copy link
Contributor

I tried around a bit now, and it does seem to be a numpy issue (although the printed param is the same on macOS).

I have switched to integer parameters now, and the tests are passing on Linux and macOS. 👍

@denialhaag denialhaag requested a review from burgholzer October 13, 2025 10:57
Copy link
Member

@burgholzer burgholzer left a comment

Choose a reason for hiding this comment

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

This looks reasonable now. Let's get this in

@burgholzer burgholzer enabled auto-merge (squash) October 13, 2025 12:01
@burgholzer burgholzer merged commit a5bd728 into main Oct 13, 2025
24 checks passed
@burgholzer burgholzer deleted the renovate/lock-file-maintenance branch October 13, 2025 12:35
@github-project-automation github-project-automation bot moved this from In Progress to Done in MQT Verification Oct 13, 2025
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

dependencies Pull requests that update a dependency file python Anything related to Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants