DecomposeReadout

DecomposeReadout#

class pennylane_calculquebec.processing.steps.decompose_readout.DecomposeReadout#

Bases: PreProcStep

execute(tape)

implementation of the execution method from pre-processing steps.

execute(tape: QuantumTape)#

implementation of the execution method from pre-processing steps.

for each observable, if it is a product, decompose it.

if it is a single observable, add the right rotation before the readout, and change the observable to computational basis

Parameters:

tape (QuantumTape) – the tape with the readouts to decompose

Raises:

ValueError – risen if an observable is not supported

Returns:

a readout with only computational basis observables

Return type:

QuantumTape