"""Qurrent/Qurshady - Second Renyi Entropy Measurement/Classical Shadow (:mod:`qurry.qurrent`).. tip:: 1. The name "qurrent" was the second proposed name for this package. Itβs not simply "current" with a "q" replacing the "c", but rather a combination of "qurr" and "ent", where "ent" abbreviates "entropy", and "qurr" is a coined prefix beginning with "qu" to imply "quantum". 2. The initial proposed name for the package was "xproc", short for "experimental process". 3. Another module, "qurrech", combines "qurr" with "ech", where "ech" is short for "echo", the Loschmidt echo being a key concept in quantum information theory. This inspired us to adopt "qurry", derived from "qurr" and the suffix "ry", to resemble words like "query" or "curry". 4. Since a package named "qurry" already exists on PyPI, and many projects on GitHub also use this name, we changed the suffix from "y" to "ium", creating "qurrium". "Qurrium" is unique and easily searchable, with no prior use on PyPI or in general web searches. 5. So there is the evolution of the package name: xproc -> qurrent -> qurry -> qurrium 6. Emoji: Qurry π / Qurrium π"""fromtypingimportLiteral,Union,overloadfrom.randomized_measureimportEntropyMeasureRandomized,EntropyMeasureRandomizedMeasureArgsfrom.randomized_measure_v1importEntropyMeasureRandomizedV1,EntropyMeasureRandomizedV1MeasureArgsfrom.hadamard_testimportEntropyMeasureHadamard,EntropyMeasureHadamardMeasureArgsfrom.classical_shadowimportShadowUnveil,ShadowUnveilMeasureArgs# from .classical_shadow import ShadowUnveil# pylint: disable=invalid-name@overloaddefEntropyMeasure(*args,method:Literal["hadamard"],**kwargs)->EntropyMeasureHadamard:...@overloaddefEntropyMeasure(*args,method:Literal["randomized_v1"],**kwargs)->EntropyMeasureRandomizedV1:...@overloaddefEntropyMeasure(*args,method:Union[Literal["randomized","haar","base"],str]="randomized",**kwargs)->EntropyMeasureRandomized:...@overloaddefEntropyMeasure(*args,method:Literal["classical_shadow"],**kwargs)->ShadowUnveil:...
[docs]defEntropyMeasure(*args,method="randomized",**kwargs,):"""Call :func:`EntropyMeasure` methods. Args: method (Literal["randomized", "randomized_v1", "hadamard", "classical_shadow"], optional): The method to use for entropy measurement. - randomized: running by haar randomized measure. - hadamard: running by hadamard test. - base: the base of :class:`EntropyMeasure`. Defaults to 'randomized'. """ifmethodin("randomized","haar"):returnEntropyMeasureRandomized(*args,**kwargs)ifmethod=="randomized_v1":returnEntropyMeasureRandomizedV1(*args,**kwargs)ifmethod=="hadamard":returnEntropyMeasureHadamard(*args,**kwargs)ifmethod=="classical_shadow":returnShadowUnveil(*args,**kwargs)returnEntropyMeasureRandomized(*args,**kwargs)