Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion qiskit/circuit/library/basis_change/qft.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ def __init__(
"""
super().__init__(name="qft", num_qubits=num_qubits, params=[])

def __array__(self, dtype=complex):
def __array__(self, dtype=complex, copy=None):
"""Return a numpy array for the QFTGate."""
if copy is False:
raise ValueError("unable to avoid copy while creating an array as requested")
n = self.num_qubits
nums = np.arange(2**n)
outer = np.outer(nums, nums)
Expand Down