paddle_quantum.qsvt.qsvt

paddle_quantum.qsvt.qsvt.block_encoding_projector(num_qubits, num_projected_qubits=None)

Generate a projector that is used for simple block encoding

Parameters:
  • num_qubits (int) – number of total qubits

  • num_projected_qubits (int | None) – number of projected qubits, default to be num_qubits - 1

Returns:

\(\ket{0}\bra{0} \otimes I\)

Return type:

Tensor

paddle_quantum.qsvt.qsvt.qubitization(proj, phi)

generate quantum circuit that is equivalent to \(e^{i \phi (2P - I)}\)

Parameters:
  • proj (Tensor) – orthogonal projector

  • phi (Tensor) – angle parameter

Returns:

a quantum circuit that is equivalent to e^{i phi (2P - I)}.

Return type:

Circuit

class paddle_quantum.qsvt.qsvt.QSVT(poly_p, oracle, m=None)

Bases: object

block_encoding_matrix()

provide the matrix of a block encoding of \(P(X)\)

Returns:

block encoding of \(P(X)\) in matrix form

Return type:

Tensor

block_encoding_circuit()

generate a block encoding of \(P(X)\) by quantum circuit

Returns:

a quantum circuit of unitary that is the block encoding of \(P(X)\)

Return type:

Circuit

block_encoding_unitary()

generate the unitary of above circuit for verification

Returns:

a block encoding unitary of \(P(X)\)

Return type:

Tensor