Skip to content

Commit 41fbd01

Browse files
authored
Replace use of deprecated numpy.bool8. (#45)
1 parent 78e63b7 commit 41fbd01

File tree

1 file changed

+3
-3
lines changed
  • pytket/extensions/qiskit/backends

1 file changed

+3
-3
lines changed

pytket/extensions/qiskit/backends/aer.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,8 @@ def _process_model(noise_model: NoiseModel, gate_set: Set[OpType]) -> dict:
685685
def _sparse_to_zx_tup(
686686
pauli: QubitPauliString, n_qubits: int
687687
) -> Tuple[np.ndarray, np.ndarray]:
688-
x = np.zeros(n_qubits, dtype=np.bool8)
689-
z = np.zeros(n_qubits, dtype=np.bool8)
688+
x = np.zeros(n_qubits, dtype=np.bool_)
689+
z = np.zeros(n_qubits, dtype=np.bool_)
690690
for q, p in pauli.map.items():
691691
i = _default_q_index(q)
692692
z[i] = p in (Pauli.Z, Pauli.Y)
@@ -698,7 +698,7 @@ def _qubitpauliop_to_sparsepauliop(
698698
operator: QubitPauliOperator, n_qubits: int
699699
) -> SparsePauliOp:
700700
n_ops = len(operator._dict)
701-
table_array = np.zeros((n_ops, 2 * n_qubits), dtype=np.bool8)
701+
table_array = np.zeros((n_ops, 2 * n_qubits), dtype=np.bool_)
702702
coeffs = np.zeros(n_ops, dtype=np.float64)
703703

704704
for i, (term, coeff) in enumerate(operator._dict.items()):

0 commit comments

Comments
 (0)