-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Environment
- Qiskit version: 1.2.4
- Python version: 3.12.7
- Operating system: macOS 15.0.1
What is happening?
YGate.power(1/2)
behaves differently with scipy 1.14 on macOS compared with outcomes with other version and OS.
How can we reproduce the issue?
import scipy
from qiskit.circuit.library import YGate
print('scipy', scipy.__version__)
print('Y^0.5', YGate().power(1 / 2))
print('Y^0.5 †', YGate().power(1 / 2).adjoint())
macOS + qiskit 1.2.4 + scipy 1.14.1
scipy 1.14.1
Y^0.5 Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5-0.5j, 0.5-0.5j],
[-0.5+0.5j, 0.5-0.5j]])])
Y^0.5 † Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5+0.5j, -0.5-0.5j],
[ 0.5+0.5j, 0.5+0.5j]])])
macOS + qiskit 1.2.4 + scipy 1.14.0
scipy 1.14.0
Y^0.5 Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5-0.5j, 0.5-0.5j],
[-0.5+0.5j, 0.5-0.5j]])])
Y^0.5 † Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5+0.5j, -0.5-0.5j],
[ 0.5+0.5j, 0.5+0.5j]])])
macOS + qiskit 1.2.4 + scipy 1.13.1
scipy 1.13.1
Y^0.5 Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5+0.5j, -0.5-0.5j],
[ 0.5+0.5j, 0.5+0.5j]])])
Y^0.5 † Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5-0.5j, 0.5-0.5j],
[-0.5+0.5j, 0.5-0.5j]])])
RedHat 9.4 + qiskit 1.2.4 + scipy 1.14.1
scipy 1.14.1
Y^0.5 Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5+0.5j, -0.5-0.5j],
[ 0.5+0.5j, 0.5+0.5j]])])
Y^0.5 † Instruction(name='unitary', num_qubits=1, num_clbits=0, params=[array([[ 0.5-0.5j, 0.5-0.5j],
[-0.5+0.5j, 0.5-0.5j]])])
What should happen?
Consistent outcomes regardless of scipy version
Any suggestions?
pin scipy version, e.g., scipy<1.14
for macOS?
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working