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=">>>">cal = cirq_google.engine.load_median_device_calibration("rainbow")</code>
<code class="devsite-terminal" data-terminal-prefix=">>>">noise_props = cirq_google.engine.noise_properties_from_calibration(cal)</code>
<code class="devsite-terminal" data-terminal-prefix=">>>">noise_model = cirq_google.NoiseModelFromGoogleNoiseProperties(noise_props)</code>
<code class="devsite-terminal" data-terminal-prefix=">>>">simulator = cirq.Simulator(noise=noise_model)</code>
<code class="devsite-terminal" data-terminal-prefix=">>>">circuit = cirq.Circuit(cirq.X(cirq.GridQubit(5, 2)))</code>
<code class="devsite-terminal" data-terminal-prefix=">>>">result = simulator.simulate(circuit)</code>
<code class="no-select nocode"> </code>
</pre>
Functions
noise_properties_from_calibration(...)
: Translates between cirq_google.Calibration
and NoiseProperties.
Other Members |
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'
}
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-27 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-27 UTC."],[],[]]