We could call it @enable_full_fidelity_warning and @disable_full_fidelity_warning.
Maybe the keyword argument should have a more verbose name, like enable_full_fidelity_warning? Otherwise it makes it sounds like it turns off all warnings, which may not be the case.
Also, is the point of this warning that someone may accidentally call this function when using something like fidelity(::MPO, ::MPO)? If that is the case, it seems better to turn this off by default in fidelity(::ITensor, ::ITensor), but then have it on by default in fidelity(::MPO, ::MPO) and related functions. If someone is calling it directly with fidelity(::ITensor, ::ITensor) I think it is clear that it is not an efficient operation.
Another way to design the warning would be to control it with a global setting and macros, like the
@disable_warn_order
ITensors.jl macro: https://github.com/ITensor/ITensors.jl/blob/db7a2961415f96b42d1ec57a4dae02bb56ab4bcf/src/global_variables.jl#L2-L130We could call it
@enable_full_fidelity_warning
and@disable_full_fidelity_warning
.Maybe the keyword argument should have a more verbose name, like
enable_full_fidelity_warning
? Otherwise it makes it sounds like it turns off all warnings, which may not be the case.Also, is the point of this warning that someone may accidentally call this function when using something like
fidelity(::MPO, ::MPO)
? If that is the case, it seems better to turn this off by default infidelity(::ITensor, ::ITensor)
, but then have it on by default infidelity(::MPO, ::MPO)
and related functions. If someone is calling it directly withfidelity(::ITensor, ::ITensor)
I think it is clear that it is not an efficient operation._Originally posted by @mtfishman in https://github.com/GTorlai/PastaQ.jl/pull/172#discussion_r570315702_