qiskit/providers/basicaer/unitary_simulator.py
def _get_unitary(self):
        """Return the current unitary in JSON Result spec format"""
        unitary = np.reshape(self._unitary, 2 * [2 ** self._number_of_qubits])
        # Expand complex numbers
        unitary = np.stack((unitary.real, unitary.imag), axis=-1)
        # Truncate small values
        unitary[abs(unitary) < self._chop_threshold] = 0.0
        return unitary
def _get_unitary(self):
        unitary = np.reshape(self._unitary, 2 * [2 ** self._number_of_qubits])
        # Expand complex numbers
        unitary = np.stack((unitary.real, unitary.imag), axis=-1)
        # Truncate small values
        unitary[abs(unitary) < self._chop_threshold] = 0.0
        return unitary
def _get_unitary ( self ) : unitary = np . reshape ( self . _unitary , 2 * [ 2 ** self . _number_of_qubits ] ) # Expand complex numbers unitary = np . stack ( ( unitary . real , unitary . imag ) , axis = - 1 ) # Truncate small values unitary [ abs ( unitary ) < self . _chop_threshold ] = 0.0 return unitary
Return the current unitary in JSON Result spec format
Return the current unitary in JSON Result spec format