def METHOD_NAME(framework, shots):
    """Tests that convert_to_numpy_parameters works with autograd arrays."""
    x = qml.math.asarray(np.array(1.234), like=framework)
    y = qml.math.asarray(np.array(0.652), like=framework)
    M = qml.math.asarray(np.eye(2), like=framework)
    state = qml.math.asarray(np.array([1, 0]), like=framework)
    numpy_data = np.array(0.62)
    ops = [
        qml.StatePrep(state, 0),
        qml.RX(x, 0),
        qml.RY(y, 1),
        qml.CNOT((0, 1)),
        qml.RZ(numpy_data, 0),
    ]
    m = [qml.state(), qml.expval(qml.Hermitian(M, 0))]
    qs = qml.tape.QuantumScript(ops, m, shots=shots)
    new_qs = convert_to_numpy_parameters(qs)
    # check ops that should be unaltered
    assert new_qs[3] is qs[3]
    assert new_qs[4] is qs[4]
    assert new_qs.measurements[0] is qs.measurements[0]
    for ind in (0, 1, 2, 6):
        assert qml.equal(new_qs[ind], qs[ind], check_interface=False, check_trainability=False)
        assert qml.math.get_interface(*new_qs[ind].data) == "numpy"
    # check shots attribute matches
    assert new_qs.shots == qs.shots