Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Statefunction ket-bra composition #9824

Closed
hadizadeh-ali opened this issue Mar 19, 2023 · 1 comment
Closed

Statefunction ket-bra composition #9824

hadizadeh-ali opened this issue Mar 19, 2023 · 1 comment
Labels
mod: opflow Related to the Opflow module

Comments

@hadizadeh-ali
Copy link

hadizadeh-ali commented Mar 19, 2023

What is the expected behavior?

Code:

from qiskit.opflow import Zero
Zero @ ~Zero

Suggested output: e.g., a MatrixOp equivalent to |0⟩⟨0|.

Output now:

File "D:\Programs\Anaconda\Anaconda3-2019.10\install\envs\envi\lib\site-packages\qiskit\opflow\mixins\star_algebra.py", line 107, in __matmul__
    return self.compose(other)
  File "D:\Programs\Anaconda\Anaconda3-2019.10\install\envs\envi\lib\site-packages\qiskit\opflow\state_fns\state_fn.py", line 306, in compose
    raise ValueError(
ValueError: Composition with a Statefunction in the first operand is not defined.
>>> qiskit.__qiskit_version__
{'qiskit-terra': '0.23.2', 'qiskit-aer': '0.12.0', 'qiskit-ignis': '0.7.1', 'qiskit-ibmq-provider': '0.20.2', 'qiskit': '0.42.0', 'qiskit-nature': None, 'qiskit-finance': None, 'qiskit-optimization': None, 'qiskit-machine-learning': None}
@jakelishman jakelishman transferred this issue from Qiskit/qiskit-metapackage Mar 20, 2023
@jakelishman jakelishman added the mod: opflow Related to the Opflow module label Mar 20, 2023
@woodsp-ibm
Copy link
Member

#9176 is about to deprecate opflow for this upcoming next release, ahead of its removal, in the future, following that. During this period, until removal, it will be continue to be supported (critical bug fixes) but no new features/enhancements would be included. #9484 will add a migration guide to using comparable function from quantum_info module where it exists.

@jakelishman jakelishman closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mod: opflow Related to the Opflow module
Projects
None yet
Development

No branches or pull requests

3 participants