Skip to content

Entanglement fidelity of a quantum channel #4158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 3, 2021

Conversation

viathor
Copy link
Collaborator

@viathor viathor commented Jun 2, 2021

This computes entanglement fidelity of a channel directly from its Kraus representation.

@viathor viathor requested review from cduck, vtomole and a team as code owners June 2, 2021 21:53
@google-cla google-cla bot added the cla: yes Makes googlebot stop complaining. label Jun 2, 2021
Copy link
Collaborator

@95-martin-orion 95-martin-orion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calculations and tests all look good - there's just one more case that I'd like to see tested.

for k in protocols.channel(operation):
f += np.abs(np.trace(k)) ** 2
n_qubits = protocols.num_qubits(operation)
return float(f / 4 ** n_qubits)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test for an operation with more than one qubit?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Added 2- and 3-qubit test cases for unitary and depolarizing channels.

@viathor viathor merged commit 074c4e4 into quantumlib:master Jun 3, 2021
@viathor viathor deleted the entanglement_fidelity branch June 3, 2021 19:23
rht pushed a commit to rht/Cirq that referenced this pull request May 1, 2023
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Makes googlebot stop complaining.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants