Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
5.03k stars 2.32k forks source link

Add `StabilizerState` support to `state_fidelity` #7242

Open chriseclectic opened 2 years ago

chriseclectic commented 2 years ago

What is the expected enhancement?

Currently the StabilizerState class is not supported by the state_fidelity function which can only handle Statevector and DensityMatrix states.

This function should be extended to have an efficient form of computing the state fidelity between two stabilizer states, and a (probably inefficient) version for computing the fidelity between a stabilizer state and a non-stabilizer state (statevector or density matrix).

Possible implementation

I'm not sure if there is a more efficient method but one way you could compute the fidelity between two stabilizer states |a> = A|0>, |b> = B|> for cliffords A, B would be to compute the the all-zero measurement outcome probability for the stabilizer state B^\dagger A|0>as p = |<0|B^\dagger A|0>|^2 = F(|a>, |b>) .

For the second case one way would be allowing conversion of a StabilizerState to Statevector. This could be implemented (inefficiently) by running the simulation for the Clifford circuit on the Statevector class. This would also generally useful functionality to add to the StabilzerState class.

ikkoham commented 2 years ago

The efficient method to calculate an inner product between two stabilizer states is described in the last of Sec. Ⅲ https://arxiv.org/abs/quant-ph/0406196.

ShellyGarion commented 2 years ago

Does this depend on #7245 and #7269 being merged?

patdenim commented 2 years ago

Can this function be extended to compute the state fidelity between twosuperposition of stabilizer states too? not only between 2 Stabilizer states..... This is a request from Keio university.

anonymousr007 commented 2 years ago

Hello, I am Rishabh, an undergraduate final year computer engineering student. This issue is still open or not? My Interests are:-