Code
qcr:2606.27339.1

Direct Fidelity Estimation

Direct Fidelity Estimation (DFE) is an efficient method for verifying how close the state actually produced by a quantum device is to the intended target state, without the exponential cost of full quantum state tomography. The fidelity between a desired pure state and the actual (possibly noisy) state is a unitless number between 0 and 1 that quantifies their overlap, and measuring it directly is essential for benchmarking and debugging quantum hardware. Rather than reconstructing the entire density matrix, DFE estimates the fidelity from a small number of randomly chosen Pauli measurements, sampled according to their importance, so the number of measurements scales far more favorably with system size. This Cirq example implements the DFE protocol for a given circuit: it computes the Pauli expectation values that characterize the target state, samples the most informative Pauli operators, measures them on the (optionally noisy) device or simulator, and combines the results into an unbiased fidelity estimate with quantified statistical error. It is a practical, resource-efficient characterization tool and a worked example of how randomized measurement schemes make device verification tractable at scale.
Benchmarking
Qubit
Circuit-based
Uploaded 2 days ago
11
Views
Citing this entry? Use this QCR ID
Uploaded by
QL
QCR Librarian

Overview

quantumlib/Cirq
49901228
README.md

Direct Fidelity Estimation

Direct Fidelity Estimation (DFE) is an efficient method for verifying how close the state actually produced by a quantum device is to the intended target state, without the exponential cost of full quantum state tomography. The fidelity between a desired pure state and the actual (possibly noisy) state is a unitless number between 0 and 1 that quantifies their overlap, and measuring it directly is essential for benchmarking and debugging quantum hardware. Rather than reconstructing the entire density matrix, DFE estimates the fidelity from a small number of randomly chosen Pauli measurements, sampled according to their importance, so the number of measurements scales far more favorably with system size. This Cirq example implements the DFE protocol for a given circuit: it computes the Pauli expectation values that characterize the target state, samples the most informative Pauli operators, measures them on the (optionally noisy) device or simulator, and combines the results into an unbiased fidelity estimate with quantified statistical error. It is a practical, resource-efficient characterization tool and a worked example of how randomized measurement schemes make device verification tractable at scale.

Run it

pip install -r requirements.txt
python direct_fidelity_estimation.py

Source and license

Imported from examples/direct_fidelity_estimation.py in quantumlib/Cirq at v1.6.1, under the Apache License 2.0. Original authors: The Cirq Developers. The upstream LICENSE is included alongside this example.

Join the Discussion

Comments (0)

No comments yet. Be the first to share your thoughts!

Indexed by QCR Librarian

This entry was created automatically from publicly available records. QCR links to public sources and only stores repository content where the license permits redistribution.

Versions

v1 Latest
Jun 17, 2026
qcr:2606.27339.1

Cite all versions? Use the base QCR ID to always reference the latest version of this entry.

Tools used

Cirq

Keywords

fidelity
characterization
pauli-measurements
verification
benchmarking

You may also like5