- class SparsePauliOp(data, coeffs=None, *, ignore_pauli_phase=False, copy=True)¶
Sparse N-qubit operator in a Pauli basis representation.
It can be used for performing operator arithmetic for hundred of qubits if the number of non-zero Pauli basis terms is sufficiently small.
The Pauli basis components are stored as a
PauliListobject and can be accessed using the
paulisattribute. The coefficients are stored as a complex Numpy array vector and can be accessed using the
Initialize an operator object.
coeffs (np.ndarray) –
complex coefficients for Pauli terms.
None, the value of the
SparsePauliOp.coeffswill be ignored, and only the passed keyword argument
coeffswill be used.
ignore_pauli_phase (bool) – if true, any
phasecomponent of a given
PauliListwill be assumed to be zero. This is more efficient in cases where a
PauliListhas been constructed purely for this object, and it is already known that the phases in the ZX-convention are zero. It only makes sense to pass this option when giving
PauliListdata. (Default: False)
copy (bool) – copy the input data if True, otherwise assign it directly, if possible. (Default: True)
- 예외 발생
QiskitError – If the input data or coeffs are invalid.
Return the adjoint of the Operator.
Set real and imaginary parts of the coefficients to 0 if
< tolin magnitude.
Return the operator composition with another SparsePauliOp.
Return the conjugate of the SparsePauliOp.
Make a deep copy of current operator.
Return the right multiplied operator self * other.
Check if two SparsePauliOp operators are equivalent.
Return the reverse-order tensor product with another SparsePauliOp.
Construct from a list of Pauli strings and coefficients.
Construct from an Operator objector.
Construct from a list of local Pauli strings and coefficients.
Return tuple of input dimension for specified subsystems.
Return True if operator is a unitary matrix.
Return a label representation iterator.
Return a matrix representation iterator.
Return tuple of output dimension for specified subsystems.
Return the compose of a operator with itself n times.
Return a shallow copy with reshaped input and output subsystem dimensions.
Simplify PauliList by combining duplicates and removing zeros.
Sum of SparsePauliOps.
Return the tensor product with another SparsePauliOp.
Convert to a list Pauli string labels and coefficients.
Convert to a dense or sparse matrix.
Convert to a matrix Operator object
Return the transpose of the SparsePauliOp.
- atol = 1e-08¶
Return the Pauli coefficients.
Return tuple (input_shape, output_shape).
Return the number of qubits if a N-qubit operator or None otherwise.
Return the the PauliList.
Return the qargs for the operator.
- rtol = 1e-05¶
- 반환 형식
The number of Pauli of Pauli terms in the operator.
DEPRECATED - Return the the PauliTable.