qml.labs.estimator_beta.ops.ch_resource_decomp¶
- ch_resource_decomp()[source]¶
Returns a list of
GateCountobjects representing the resources of theCHoperator.- Resources:
The resources are derived from the following identities:
\[\begin{split}\begin{align} \hat{H} &= \hat{R}_{y}(\frac{\pi}{4}) \cdot \hat{Z} \cdot \hat{R}_{y}(\frac{-\pi}{4}), \\ \hat{Z} &= \hat{H} \cdot \hat{X} \cdot \hat{H}. \end{align}\end{split}\]Specifically, the resources are defined as two
RY, twoHadamardand oneCNOTgates.Decomposing the \(\hat{R}_y(\pm\frac{\pi}{4})\) rotations into the Clifford+T basis and substituting yields:
\[\begin{split}\begin{align} \hat{H} &= (S H T H S^\dagger) \cdot \hat{Z} \cdot (S H T^\dagger H S^\dagger) \\ &= S H T \cdot (\hat{H} \hat{Z} \hat{H}) \cdot T^\dagger H S^\dagger \\ &= S H T \cdot \hat{X} \cdot T^\dagger H S^\dagger \end{align}\end{split}\]The final resources are: 2
Hadamard, 1T, 1Adjoint(T), 1S, 1Adjoint(S), and 1CNOT.
- Returns:
A list of
GateCountobjects, where each object represents a specific quantum gate and the number of times it appears in the decomposition.- Return type:
list[
GateCount]
code/api/api/pennylane.labs.estimator_beta.ops.ch_resource_decomp
Download Python script
Download Notebook
View on GitHub