qib.algorithms.qubitization.eigenvalue_transformation.EigenvalueTransformation¶
- class qib.algorithms.qubitization.eigenvalue_transformation.EigenvalueTransformation(block_encoding: Gate, processing: ProjectorControlledPhaseShift, theta_seq: Sequence[float] | None = None)[source]¶
Bases:
objectEigenvalue transformation for a given unitary (encoding). It requires the unitary gate that gets processed, the projector-controlled phase shift and the list of angles for the processing.
Methods
Generates the qubitization circuit.
Generate the matrix representation of the eigenvalue transformation. Format: |enc_extra> x |encoded_state> Auxiliary wire from 'auxiliary' method is not taken into account.
Set the auxiliary qubits.
Set the encoding extra qubits.
Set the method.
Set the projection state.
Set the angles theta for the eigenvalue transformation.
Attributes
The number of "wires" (or quantum particles) this gate acts on.
- as_circuit()[source]¶
Generates the qubitization circuit. * with ‘auxiliary’ method I have an extra wire. * In order to compare it to as_matrix() you need to compare only the half upper-left block.
- as_matrix()[source]¶
Generate the matrix representation of the eigenvalue transformation. Format: |enc_extra> x |encoded_state> Auxiliary wire from ‘auxiliary’ method is not taken into account.
- property num_wires¶
The number of “wires” (or quantum particles) this gate acts on.