MatrixOperator(matrix, basis=None, z2_symmetries=None, atol=1e-12, name=None)¶
Operators relevant for quantum applications
For grouped paulis representation, all operations will always convert it to paulis and then convert it back. (It might be a performance issue.)
matrix (numpy.ndarray or scipy.sparse.csr_matrix) – a 2-D sparse matrix represents operator (using CSR format internally)
basis (list[tuple(object, [int])], optional) – the grouping basis, each element is a tuple composed of the basis and the indices to paulis which are belonged to that group. e.g., if tpb basis is used, the object will be a pauli. by default, the group is equal to non-grouping, each pauli is its own basis.
z2_symmetries (Z2Symmetries) – represent the Z2 symmetries
atol (float) – atol
name (str) – name
Eliminate the real and imagine part of coeff in each pauli by threshold.
Construct the circuits for evaluation.
Get a copy of self.
Use the executed result with operator to get the evaluated value.
- param quantum_state
Carry out the eoh evolution for the operator under supplied specifications.
Check Operator is empty or not.
a formatted operator.
to op flow
Getter of matrix in dense matrix form.
Getter of matrix.
number of qubits required for the operator.
number of qubits
- Type renvoyé
returns z2 symmetries