矩阵变换序列

oracq.algorithms.common.transforms

Assembly of qubitization, explicit QSVT phase sequences and oblivious amplification.

oracq.algorithms.common.transforms.qubitization_walk(a)[源代码]

Assemble the qubitization walk operation of a block encoding a.

It first invokes a forward, 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 of a.

参数:

a -- The input BlockEncoding.

返回:

Walk operation that keeps the module call to a.

返回类型:

Operation

oracq.algorithms.common.transforms.qsvt_sequence(a, phases)[源代码]

Assemble a QSVT circuit for a block encoding a from an explicit phase sequence.

The phases are ordered in time, phases[0] acting first; len(phases) phases accompany len(phases) - 1 calls to a, 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 the qsvt module.

参数:
  • a -- The input BlockEncoding.

  • phases -- Phase sequence in radians; elements may be any value convertible to float.

返回:

QSVT operation whose calls to a are kept as module calls.

返回类型:

Operation

oracq.algorithms.common.transforms.oblivious_amplification(a, iterations=1)[源代码]

Assemble oblivious amplitude amplification for a block encoding a.

It first invokes a forward; each round then performs the zero reflection of signal, the inverse call to a, another zero reflection and the forward call, amplifying the zero-signal projected component.

参数:
  • a -- The input BlockEncoding.

  • iterations -- Number of amplification rounds, one by default.

返回:

Operation whose iterations are kept in an RIR Repeat.

返回类型:

Operation