def METHOD_NAME(self, use_opflow):
    """Test using another evolution than the default (e.g. matrix evolution)."""
    if use_opflow:
        with self.assertWarns(DeprecationWarning):
            op = X ^ I ^ Z
            matrix = op.to_matrix()
            evolution = MatrixEvolution()
            evo = EvolvedOperatorAnsatz(op, evolution=evolution)
            parameters = evo.parameters
    else:
        op = SparsePauliOp(["ZIX"])
        matrix = np.array(op)
        evolution = MatrixExponential()
        evo = EvolvedOperatorAnsatz(op, evolution=evolution)
        parameters = evo.parameters
    reference = QuantumCircuit(3)
    reference.hamiltonian(matrix, parameters[0], [0, 1, 2])
    decomposed = evo.decompose()
    if not use_opflow:
        decomposed = decomposed.decompose()
    self.assertEqual(decomposed, reference)