Skip to content

Commit

Permalink
Removes sections related to experimental features. (#4573)
Browse files Browse the repository at this point in the history
Based on recent work with qsim team.
  • Loading branch information
cognigami committed Oct 13, 2021
1 parent 5aca52d commit 686e6b1
Showing 1 changed file with 0 additions and 136 deletions.
136 changes: 0 additions & 136 deletions docs/noise.ipynb
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

0 comments on commit 686e6b1

Please sign in to comment.