23075e292fe6466c556df416f5182bbe81a7c60d,qiskit/aqua/operators/primitive_ops/pauli_op.py,PauliOp,to_matrix,#PauliOp#Any#,150

Before Change


        return super(PauliOp, new_self).compose(other)

    def to_matrix(self, massive: bool = False) -> np.ndarray:
        if self.num_qubits > 16 and not massive:
            raise ValueError(
                "to_matrix will return an exponentially large matrix, "
                "in this case {0}x{0} elements."
                " Set massive=True if you want to proceed.".format(2 ** self.num_qubits))

        return self.primitive.to_matrix() * self.coeff  // type: ignore

    def to_spmatrix(self) -> spmatrix:
         Returns SciPy sparse matrix representation of the Operator.

After Change


        return super(PauliOp, new_self).compose(other)

    def to_matrix(self, massive: bool = False) -> np.ndarray:
        OperatorBase._check_massive("to_matrix", True, self.num_qubits, massive)
        return self.primitive.to_matrix() * self.coeff  // type: ignore

    def to_spmatrix(self) -> spmatrix:
         Returns SciPy sparse matrix representation of the Operator.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 10

Non-data size: 13

Instances


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/primitive_ops/pauli_op.py
Class Name: PauliOp
Method Name: to_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/circuit_state_fn.py
Class Name: CircuitStateFn
Method Name: to_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/circuit_state_fn.py
Class Name: CircuitStateFn
Method Name: to_density_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/operator_state_fn.py
Class Name: OperatorStateFn
Method Name: to_density_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/list_ops/list_op.py
Class Name: ListOp
Method Name: to_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/operator_state_fn.py
Class Name: OperatorStateFn
Method Name: to_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/dict_state_fn.py
Class Name: DictStateFn
Method Name: to_density_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/primitive_ops/circuit_op.py
Class Name: CircuitOp
Method Name: to_matrix


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/circuit_state_fn.py
Class Name: CircuitStateFn
Method Name: sample


Project Name: Qiskit/qiskit-aqua
Commit Name: 23075e292fe6466c556df416f5182bbe81a7c60d
Time: 2020-10-14
Author: Manoel.Marques@ibm.com
File Name: qiskit/aqua/operators/state_fns/dict_state_fn.py
Class Name: DictStateFn
Method Name: to_matrix