2
$\begingroup$

I have been learning Quantum PCA recently but I came across a problem. How can I get the eigenvalues of a matrix by phase estimation? And what on what kind of matrix can we implement this algorithm?(Unitary matrix only?)

Sorry for my poor description:)

$\endgroup$
2
  • 1
    $\begingroup$ Matrix with eigenvalues $\lambda$ of the form $e^{i\theta}$, i.e., modulus one. Or if you know $|\lambda|$ already. $\endgroup$
    – narip
    Commented May 20, 2022 at 2:06
  • $\begingroup$ Have a look at HHL algorithm. The evaluation of eigenvalues is part of it. $\endgroup$ Commented May 20, 2022 at 6:17

3 Answers 3

3
$\begingroup$

The Quantum Phase Estimation algorithm allows you to estimate the phases $\theta_k$ in the eigenvalue equation:

$$ U|\psi_k\rangle = e^{2\pi i \theta_k} |\psi_k\rangle $$

where $|\psi_k\rangle$ and $e^{2\pi i \theta_k}$ correspond to the eigenvectors and eigenvalues of $U$. As you need to implement $U$ in a quantum circuit, this matrix must be unitary. However, you can get the eigenvalues of a Hermitian matrix H as well (which is not necessarily unitary) by doing the exponential of the matrix, i.e:

$$ U = e^{ibH}$$

$b$ is a scale factor that ensures that all the phases $\theta_k$ fall in the interval $[0,1]$ (since what you will measure in the ancillary register is the state $|2^n \theta_k \rangle $ where n is the number of qubits ancilla). You can find more information here:

https://qiskit.org/documentation/stubs/qiskit.algorithms.HamiltonianPhaseEstimation.html

and here:

https://quantum-computing.ibm.com/composer/docs/iqx/guide/quantum-phase-estimation

If interested, there is also the function 'exp_i()' in Qsikit that allows you to obtain the exponential form of a weighted sum of Pauli operators:

Section 'Evolutions, exp_i(), and the EvolvedOp' of https://qiskit.org/documentation/tutorials/operators/01_operator_flow.html

and:

https://qiskit.org/documentation/stubs/qiskit.opflow.primitive_ops.PauliSumOp.exp_i.html

$\endgroup$
2
$\begingroup$

Quantum Principal Component Analysis uses what the authors call a quantum phase algorithm. This refers to the HHL algorithm, not quantum phase estimation which requires a copy of an eigenvector to find its eigenvalue. HHL, which actually use QPE as a subroutine, instead gives the eigenvectors and eigenvalues of a unitary without additional information. In the case of QPCA, this unitary is the exponentiated density matrix containing the data we wish to extract the principal components from.

This video does a good job explaining the HHL algorithm. The wikipedia page also gives a good overview.

https://www.youtube.com/watch?v=O0efMku9NEs

https://en.wikipedia.org/wiki/HHL_algorithm

$\endgroup$
0
$\begingroup$

You may use Quantum Phase estimation to calculate the eigenvalues.here For this algorithm, you need to know the eigenvectors (or have an educated guess).

I hope it help you!

$\endgroup$
1
  • 1
    $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Commented May 22, 2022 at 2:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.