Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes sections related to experimental features. #4573

Merged
merged 4 commits into from
Oct 13, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 0 additions & 136 deletions docs/noise.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -627,142 +627,6 @@
"Note that the order of Kraus operators is reversed from above, but this of course does not affect the action of the channel."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "c0b3d1faa7ca"
},
"source": [
"## Noise Properties"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "740b0efc2bbc"
},
"source": [
"The `NoiseProperties` object describes the behavior of the noise to be added to a circuit. These properties include p00, p11, Pauli error, depolarization decay constant, T1 constant, and XEB fidelity. For more information on these metrics, see [this paper](https://arxiv.org/pdf/1910.11333.pdf)."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "d451328e34ab"
},
"outputs": [],
"source": [
"from cirq.devices.noise_properties import NoiseProperties, NoiseModelFromNoiseProperties\n",
"noise_prop = NoiseProperties(p00 = 0.2, pauli_error = 0.1)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "289d782f599a"
},
"source": [
"We can then use the `noise_model_from_noise_properties` method to turn a NoiseProperties object into a NoiseModel, that can then be use with a simulator."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "91b211c9b61f"
},
"outputs": [],
"source": [
"noise_model = NoiseModelFromNoiseProperties(noise_prop)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "b9b8ddcbe207"
},
"source": [
"This `NoiseModel` object can be applied to a `Simulator` (described below)."
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "935e20561b7c"
},
"source": [
"## Converting calibration metrics to noise"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "cf14dc6703db"
},
"source": [
"[Calibration metrics](quantumai.google/cirq/google/calibration) measure the behavior of Google's quantum computers. The `cirq_google.experiments.noise_models.calibration_to_noise_properties` turns a `Calibration` object into a `NoiseProperties` object, that can then be turned into a `NoiseModel`."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "d8d51f3601d5"
},
"outputs": [],
"source": [
"import cirq_google\n",
"from google.protobuf.text_format import Merge\n",
"\n",
"t1 = 0.5 # microseconds\n",
"p00 = 0.1\n",
"\n",
"_CALIBRATION_DATA = Merge(\n",
"f\"\"\"\n",
"timestamp_ms: 1579214873,\n",
"metrics: [{{\n",
" name: 'single_qubit_idle_t1_micros',\n",
" targets: ['0_0'],\n",
" values: [{{\n",
" double_val: {t1}\n",
" }}]\n",
"}}, {{\n",
" name: 'single_qubit_p00_error',\n",
" targets: ['0_0'],\n",
" values: [{{\n",
" double_val: {p00}\n",
" }}]\n",
"}}]\n",
"\"\"\",\n",
" cirq_google.api.v2.metrics_pb2.MetricsSnapshot(),\n",
")\n",
"\n",
"calibration = cirq_google.Calibration(_CALIBRATION_DATA)"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "da9d5f3e2c72"
},
"source": [
"This Calibration object can then be passed to the `compare_generated_noise_to_metrics` method in `cirq_google` to compare actual metrics with those generated from the noise model created to match the calibration data. Sample output from this method is shown below:"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "3d203521ff55"
},
"source": [
"```\n",
" Metric Initial value Measured value\n",
"0 p00 0.1 0.104000\n",
"1 T1 500.0 575.445484\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down