-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Information
- Qiskit Terra version: 0.17.0
- Python version: 3.8.8
- Operating system: linux
What is the current behavior?
qiskit.circuit.classicalfunction.BooleanExpression
fails with message that the tweedledum
library is required. However, tweedledum
is not listed a requirement for the qiskit-terra
package.
Steps to reproduce the problem
Use API's that instantiate the BooleanExpression
class. E.g.
from qiskit.circuit.library import PhaseOracle
oracle = PhaseOracle('x & ~y')
Leads to error:
Traceback (most recent call last):
File "<ipython-input-97-28069418327a>", line 3, in <module>
oracle = PhaseOracle('x & ~y') # previous API: qiskit.aqua.components.oracles.LogicalExpressionOracle
File "/opt/conda/lib/python3.8/site-packages/qiskit/circuit/library/phase_oracle.py", line 55, in __init__
expression = BooleanExpression(expression)
File "/opt/conda/lib/python3.8/site-packages/qiskit/circuit/classicalfunction/boolean_expression.py", line 39, in __init__
raise MissingOptionalLibraryError(
MissingOptionalLibraryError: "The 'tweedledum' library is required to use 'BooleanExpression compiler'. You can install it with 'pip install tweedledum'."
What is the expected behavior?
No error about missing library should happen.
Suggested solutions
Add tweedledum
to ./requirements.txt
.
Related to #5853 and #5830 where tweedledum
is present in ./requirements-dev.txt
, but not added to ./requirements.txt
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working