Matrix transform sequences¶
oracq.algorithms.common.transforms
Assembly of qubitization, explicit QSVT phase sequences and oblivious amplification.
- oracq.algorithms.common.transforms.qubitization_walk(a)[source]¶
Assemble the qubitization walk operation of a block encoding
a.It first invokes
aforward, then applies the positive reflection of the signal about the zero subspace, yielding a walk operator of the form(2 P_0 - I) U; the registers follow the target and signal signature ofa.- Parameters:
a – The input
BlockEncoding.- Returns:
Walk operation that keeps the module call to
a.- Return type:
- oracq.algorithms.common.transforms.qsvt_sequence(a, phases)[source]¶
Assemble a QSVT circuit for a block encoding
afrom an explicit phase sequence.The phases are ordered in time,
phases[0]acting first;len(phases)phases accompanylen(phases) - 1calls toa, alternating forward and inverse; each phase is composed from a global phase and a controlled phase on the zero subspace of signal. The phase convention matches the phase synthesis of theqsvtmodule.- Parameters:
a – The input
BlockEncoding.phases – Phase sequence in radians; elements may be any value convertible to
float.
- Returns:
QSVT operation whose calls to
aare kept as module calls.- Return type:
- oracq.algorithms.common.transforms.oblivious_amplification(a, iterations=1)[source]¶
Assemble oblivious amplitude amplification for a block encoding
a.It first invokes
aforward; each round then performs the zero reflection of signal, the inverse call toa, another zero reflection and the forward call, amplifying the zero-signal projected component.- Parameters:
a – The input
BlockEncoding.iterations – Number of amplification rounds, one by default.
- Returns:
Operation whose iterations are kept in an RIR
Repeat.- Return type: