Module: cirq_google.engine.calibration_to_noise_properties

Tools for converting Calibrations to NoiseProperties.

Given a Calibration "cal", a user can simulate noise approximating that calibration using the following pipeline:

<pre class="devsite-click-to-copy prettyprint lang-py">
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">cal = cirq_google.engine.load_median_device_calibration(&quot;rainbow&quot;)</code>
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">noise_props = cirq_google.engine.noise_properties_from_calibration(cal)</code>
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">noise_model = cirq_google.NoiseModelFromGoogleNoiseProperties(noise_props)</code>
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">simulator = cirq.Simulator(noise=noise_model)</code>
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">circuit = cirq.Circuit(cirq.X(cirq.GridQubit(5, 2)))</code>
<code class="devsite-terminal" data-terminal-prefix="&gt;&gt;&gt;">result = simulator.simulate(circuit)</code>
<code class="no-select nocode">    </code>
</pre>

Functions

noise_properties_from_calibration(...): Translates between cirq_google.Calibration and NoiseProperties.

DEFAULT_GATE_NS

{
 <class 'cirq.ops.common_channels.ResetChannel'>: 250.0,
 <class 'cirq.ops.common_gates.CZPowGate'>: 32.0,
 <class 'cirq.ops.common_gates.ZPowGate'>: 25.0,
 <class 'cirq.ops.fsim_gate.FSimGate'>: 32.0,
 <class 'cirq.ops.measurement_gate.MeasurementGate'>: 4000.0,
 <class 'cirq.ops.phased_x_z_gate.PhasedXZGate'>: 25.0,
 <class 'cirq.ops.swap_gates.ISwapPowGate'>: 32.0,
 <class 'cirq_google.ops.sycamore_gate.SycamoreGate'>: 12.0
}

GATE_PREFIX_PAIRS

{
 <class 'cirq.ops.swap_gates.ISwapPowGate'>: 'two_qubit_parallel_sqrt_iswap_gate',
 <class 'cirq_google.ops.sycamore_gate.SycamoreGate'>: 'two_qubit_parallel_sycamore_gate'
}

GATE_ZPHASE_CODE_PAIRS

{
 <class 'cirq.ops.swap_gates.ISwapPowGate'>: 'sqrt_iswap',
 <class 'cirq_google.ops.sycamore_gate.SycamoreGate'>: 'syc'
}