Noise Reconstruction (NR)¶
The effective noise under Randomized Compiling (RC) is a Pauli channel, that is, a channel that maps a state \(\rho\) to
for some probability distribution \(\mu\) over the \(N\)-qubit Pauli group.
Through noise reconstruction (NR), we can reconstruct the probability distribution \(\mu\) using carefully targeted Cycle Benchmarking (CB) diagnostic sequences with additional post-processing.
We have two noise reconstruction protocols:
- K-body Noise Reconstruction (KNR)
Performs noise reconstruction on various subsets of qudits which are most relevant to the cycle being benchmarked, returning error probabilities for every Pauli in each subset. See
make_knr()
for details.- Targeted Noise Reconstruction (TMR)
Performs noise reconstruction for a targeted set of Pauli errors, returning error probabilities for user-specified Pauli errors. See
make_tnr()
for details.
KNR Example¶
#
# K-body noise reconstruction (KNR) example.
# Copyright 2019 Quantum Benchmark Inc.
#
import trueq as tq
# Define the cycle we wish to do noise reconstruction on.
cycle = {(label,): tq.Gate.id for label in range(4)}
# Generate a circuit collection to measure noise.
circuits = tq.make_knr(cycle, [4, 32, 64], 30)
# Initialize a simulator with stochastic pauli noise.
sim = tq.Simulator().add_stochastic_pauli(px=0.005, py=0.005)
# Run the circuits on the simulator to populate the results.
sim.run(circuits)
# Plot the results.
circuits.plot().nr_bar()
TNR Example¶
#
# Targeted noise reconstruction (TNR) example.
# Copyright 2019 Quantum Benchmark Inc.
#
import trueq as tq
# Define the cycle we wish to do noise reconstruction on.
cycle = {(label,): tq.Gate.id for label in range(4)}
# Generate a circuit collection to measure noise.
circuits = tq.make_tnr(cycle, [4, 32, 64], 30, targeted_errors={"XXXX", "XYXY", "YYZZ"})
# Initialize a simulator with stochastic pauli noise.
sim = tq.Simulator().add_stochastic_pauli(px=0.005, py=0.005)
# Run the circuits on the simulator to populate the results.
sim.run(circuits)
# Print summary of the results.
circuits.fit().summarize()
Key(cycle=Cycle((0,): Gate.id, (1,): Gate.id, (2,): Gate.id, (3,): Gate.id, immutable=True), labels=(0,), order=10, protocol='TNR', twirl=(('P', 0), ('P', 1), ('P', 2), ('P', 3)))
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
p_Y 9.789 [9.213,10.4] e-03 Probability of Pauli error Y
p_X 9.779 [9.204,10.4] e-03 Probability of Pauli error X
Key(cycle=Cycle((0,): Gate.id, (1,): Gate.id, (2,): Gate.id, (3,): Gate.id, immutable=True), labels=(1,), order=10, protocol='TNR', twirl=(('P', 0), ('P', 1), ('P', 2), ('P', 3)))
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
p_Y 9.483 [8.927,10.0] e-03 Probability of Pauli error Y
p_X 9.583 [9.027,10.1] e-03 Probability of Pauli error X
Key(cycle=Cycle((0,): Gate.id, (1,): Gate.id, (2,): Gate.id, (3,): Gate.id, immutable=True), labels=(2,), order=10, protocol='TNR', twirl=(('P', 0), ('P', 1), ('P', 2), ('P', 3)))
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
p_Z -2.214 [-8.444,4.0.. e-04 Probability of Pauli error Z
p_X 1.020 [0.957,1.082] e-02 Probability of Pauli error X
Key(cycle=Cycle((0,): Gate.id, (1,): Gate.id, (2,): Gate.id, (3,): Gate.id, immutable=True), labels=(3,), order=10, protocol='TNR', twirl=(('P', 0), ('P', 1), ('P', 2), ('P', 3)))
--------------------------------------------------------------------------------
Name Estimate 95% CI Description
p_X 9.891 [9.233,10.5] e-03 Probability of Pauli error X
p_Y 1.035 [0.969,1.101] e-02 Probability of Pauli error Y
p_Z -3.606 [-69.4,62.2] e-05 Probability of Pauli error Z