Module: cirq.experiments

Package containing characterization tools and experiments.

Modules

fidelity_estimation module: Estimation of fidelity associated with experimental circuit executions.

google_v2_supremacy_circuit module

grid_parallel_two_qubit_xeb module: Parallel two-qubit cross-entropy benchmarking on a grid.

n_qubit_tomography module: Tomography code for an arbitrary number of qubits allowing for

purity_estimation module

qubit_characterizations module

random_quantum_circuit_generation module: Code for generating random quantum circuits.

single_qubit_readout_calibration module

t1_decay_experiment module

t2_decay_experiment module

xeb_fitting module: Estimation of fidelity associated with experimental circuit executions.

xeb_sampling module: Estimation of fidelity associated with experimental circuit executions.

xeb_simulation module: Estimation of fidelity associated with experimental circuit executions.

Classes

class CrossEntropyResult: Results from a cross-entropy benchmarking (XEB) experiment.

class CrossEntropyResultDict: Per-qubit-tuple results from cross-entropy benchmarking.

class GridInteractionLayer: A layer of aligned or staggered two-qubit interactions on a grid.

class RabiResult: Results from a Rabi oscillation experiment.

class RandomizedBenchMarkResult: Results from a randomized benchmarking experiment.

class SingleQubitReadoutCalibrationResult: Result of estimating single qubit readout error.

class StateTomographyExperiment: Experiment to conduct state tomography.

class T1DecayResult: Results from a Rabi oscillation experiment.

class T2DecayResult: Results from a T2 decay experiment.

class TomographyResult: Results from a state tomography experiment.

class XEBPhasedFSimCharacterizationOptions: Options for calibrating a PhasedFSim-like gate using XEB.

Functions

build_entangling_layers(...): Builds a sequence of gates that entangle all pairs of qubits on a grid.

collect_grid_parallel_two_qubit_xeb_data(...): Collect data for a grid parallel two-qubit XEB experiment.

compute_grid_parallel_two_qubit_xeb_results(...): Compute grid parallel two-qubit XEB results from experimental data.

cross_entropy_benchmarking(...): Cross-entropy benchmarking (XEB) of multiple qubits.

estimate_single_qubit_readout_errors(...): Estimate single-qubit readout error.

generate_boixo_2018_supremacy_circuits_v2(...): Generates Google Random Circuits v2 as in github.com/sboixo/GRCS cz_v2.

generate_boixo_2018_supremacy_circuits_v2_bristlecone(...): Generates Google Random Circuits v2 in Bristlecone.

generate_boixo_2018_supremacy_circuits_v2_grid(...): Generates Google Random Circuits v2 as in github.com/sboixo/GRCS cz_v2.

get_state_tomography_data(...): Gets the data for each rotation string added to the circuit.

hog_score_xeb_fidelity_from_probabilities(...): XEB fidelity estimator based on normalized HOG score.

least_squares_xeb_fidelity_from_expectations(...): Least squares fidelity estimator.

least_squares_xeb_fidelity_from_probabilities(...): Least squares fidelity estimator with observable based on probabilities.

linear_xeb_fidelity(...): Estimates XEB fidelity from one circuit using linear estimator.

linear_xeb_fidelity_from_probabilities(...): Linear XEB fidelity estimator.

log_xeb_fidelity(...): Estimates XEB fidelity from one circuit using logarithmic estimator.

log_xeb_fidelity_from_probabilities(...): Logarithmic XEB fidelity estimator.

purity_from_probabilities(...): Purity estimator from speckle purity benchmarking.

rabi_oscillations(...): Runs a Rabi oscillation experiment.

random_rotations_between_grid_interaction_layers_circuit(...): Generate a random quantum circuit of a particular form.

single_qubit_randomized_benchmarking(...): Clifford-based randomized benchmarking (RB) of a single qubit.

single_qubit_state_tomography(...): Single-qubit state tomography.

state_tomography(...): This performs n qubit tomography on a cirq circuit

t1_decay(...): Runs a t1 decay experiment.

t2_decay(...): Runs a t2 transverse relaxation experiment.

two_qubit_randomized_benchmarking(...): Clifford-based randomized benchmarking (RB) of two qubits.

two_qubit_state_tomography(...): Two-qubit state tomography.

xeb_fidelity(...): Estimates XEB fidelity from one circuit using user-supplied estimator.

GRID_ALIGNED_PATTERN (cirq.experiments.GridInteractionLayer(col_offset=0, vertical=False, stagger=False), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=False, stagger=False), cirq.experiments.GridInteractionLayer(col_offset=0, vertical=True, stagger=False), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=True, stagger=False))

A pattern of two-qubit gates that is easy to simulate.

This pattern of gates was used in the paper
https://www.nature.com/articles/s41586-019-1666-5
to evaluate the performance of a quantum computer.

GRID_STAGGERED_PATTERN (cirq.experiments.GridInteractionLayer(col_offset=0, vertical=True, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=True, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=False, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=0, vertical=False, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=False, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=0, vertical=False, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=0, vertical=True, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=True, stagger=True))

A pattern of two-qubit gates that is hard to simulate.

This pattern of gates was used in the paper
https://www.nature.com/articles/s41586-019-1666-5
to demonstrate quantum supremacy.

HALF_GRID_STAGGERED_PATTERN (cirq.experiments.GridInteractionLayer(col_offset=0, vertical=True, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=True, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=1, vertical=False, stagger=True), cirq.experiments.GridInteractionLayer(col_offset=0, vertical=False, stagger=True))

A pattern that is half of GRID_STAGGERED_PATTERN.

It activates each link in a grid once in a staggered way permits
easier simulation.