Skip to content

Conversation

@albertomercurio
Copy link
Member

@albertomercurio albertomercurio commented Apr 29, 2025

Checklist

Thank you for contributing to QuantumToolbox.jl! Please make sure you have finished the following tasks before opening the PR.

  • Please read Contributing to Quantum Toolbox in Julia.
  • Any code changes were done in a way that does not break public API.
  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in docs/ folder) related to code changes were updated and able to build locally by running: make docs.
  • (If necessary) the CHANGELOG.md should be updated (regarding to the code changes) and built by running: make changelog.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.

Description

The current version uses both OperatorQuantumObject and Operator to handle the same type of QuantumObject. This can be a bit misleading. The same happens for all the other QuantumObjectTypes (e.g., Ket or SuperOperator).

As an example of the ambiguities given by this, in the documentation we often write something like

... where A is a Operator

but code-wise A is a OperatorQuantumObject.

Here I try to unify everything, leaving only the shorter synonyms like Operator.

We only ask the users to call QuantumObject(data, Operator(), dims) instead of QuantumObject(data, Operator, dims).

@albertomercurio albertomercurio marked this pull request as ready for review May 2, 2025 13:07
@albertomercurio albertomercurio requested a review from ytdHuang May 2, 2025 13:13
@ytdHuang ytdHuang changed the title Unify structure of QuantumObjectTypes Unify structure of QuantumObjectType May 3, 2025
@albertomercurio albertomercurio requested a review from ytdHuang May 3, 2025 08:40
@ytdHuang ytdHuang merged commit 201e066 into qutip:main May 3, 2025
14 of 16 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