"""Qurrech - Wave Function Overlap(:mod:`qurry.qurrech`)"""fromtypingimportLiteral,Union,overloadfrom.hadamard_testimportEchoListenHadamard,EchoListenHadamardMeasureArgsfrom.randomized_measureimportEchoListenRandomized,EchoListenRandomizedMeasureArgsfrom.randomized_measure_v1importEchoListenRandomizedV1,EchoListenRandomizedV1MeasureArgs# pylint: disable=invalid-name@overloaddefEchoListen(*args,method:Literal["hadamard"],**kwargs)->EchoListenHadamard:...@overloaddefEchoListen(*args,method:Literal["randomized_v1"],**kwargs)->EchoListenRandomizedV1:...@overloaddefEchoListen(*args,method:Union[Literal["randomized","base"],str]="randomized",**kwargs)->EchoListenRandomized:...
[docs]defEchoListen(*args,method="randomized",**kwargs,):"""Call :func:`EchoListen` methods. Args: method (Literal["randomized", "hadamard"], optional): The method to use for wave function overlap measurement. - randomized: running by haar randomized measure. - hadamard: running by hadamard test. Defaults to 'randomized'. Returns: EchoListenBase: method. """ifmethod=="hadamard":returnEchoListenHadamard(*args,**kwargs)ifmethod=="randomized_v1":returnEchoListenRandomizedV1(*args,**kwargs)returnEchoListenRandomized(*args,**kwargs)
[docs]defWaveFunctionOverlap(*args,method="randomized",**kwargs,):"""Call :func:`WaveFunctionOverlap` methods, another name of :func:`EchoListen`. Args: method (Literal["randomized", "hadamard"], optional): The method to use for wave function overlap measurement. - randomized: running by haar randomized measure. - hadamard: running by hadamard test. Defaults to 'randomized'. Returns: WaveFunctionOverlapBase: method. """ifmethod=="hadamard":returnEchoListenHadamard(*args,**kwargs)ifmethod=="randomized_v1":returnEchoListenRandomizedV1(*args,**kwargs)returnEchoListenRandomized(*args,**kwargs)