diff --git a/dev_tools/cirq-infra/README.md b/dev_tools/cirq-infra/README.md index 600f6d18b5a..2be1cf7c8ff 100644 --- a/dev_tools/cirq-infra/README.md +++ b/dev_tools/cirq-infra/README.md @@ -3,7 +3,7 @@ This doc describes cirq-infra, the GCP project supporting our open source project. The following things are planned to be running on GCP: -- [X] Cirq bot / Automerge - see [../auto_merge](../auto_merge/README.md) +- [X] Cirq bot / PR monitor - see [../pr_monitor](../pr_monitor/README.md) - [X] Triage party for triaging - [ ] Performance tests and reports diff --git a/docs/build/circuits.ipynb b/docs/build/circuits.ipynb index 591e9be95b7..efd29797fea 100644 --- a/docs/build/circuits.ipynb +++ b/docs/build/circuits.ipynb @@ -764,9 +764,9 @@ "- [Operators](operators.ipynb) - more complicated structures to put in circuits\n", "\n", "Once you've built your circuit, read these to learn what you can do with it: \n", - "- [Simulation](/cirq/simulate/simulation.ipynb) - run your circuit on the Cirq simulator to see what it does\n", - "- [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) - run your circuit on a specialized simulator that mimics actual quantum hardware, including noise.\n", - "- [Transform circuits](/cirq/transform/transformers.ipynb) - run transformer functions to change your circuit in different ways\n", + "- [Simulation](../simulate/simulation.ipynb) - run your circuit on the Cirq simulator to see what it does\n", + "- [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb) - run your circuit on a specialized simulator that mimics actual quantum hardware, including noise.\n", + "- [Transform circuits](../transform/transformers.ipynb) - run transformer functions to change your circuit in different ways\n", "\n", "If you need to import or export circuits into or out of Cirq, see: \n", "- [Import/export circuits](interop.ipynb) - features to serialize/deserialize circuits into/from different formats" diff --git a/docs/build/classical_control.ipynb b/docs/build/classical_control.ipynb index e18dbb1f6ae..f953c2cf26d 100644 --- a/docs/build/classical_control.ipynb +++ b/docs/build/classical_control.ipynb @@ -77,7 +77,7 @@ "id": "8ccb64c25e3a" }, "source": [ - "While some quantum algorithms can be defined entirely at the quantum level, there are many others (notably including [teleportation](/cirq/experiments/textbook_algorithms#quantum_teleportation) and [error correction](https://www.nature.com/articles/s41586-021-03588-y)) which rely on classical measurement results from one part of the algorithm to control operations in a later section.\n", + "While some quantum algorithms can be defined entirely at the quantum level, there are many others (notably including [teleportation](../experiments/textbook_algorithms.ipynb#quantum_teleportation) and [error correction](https://www.nature.com/articles/s41586-021-03588-y)) which rely on classical measurement results from one part of the algorithm to control operations in a later section.\n", "\n", "To represent this, Cirq provides the `ClassicallyControlledOperation`. Following the pattern of controlled operations, a classically-controlled version of any `Operation` can be constructed by calling its `with_classical_controls` method with the control condition(s)." ] @@ -120,7 +120,7 @@ "source": [ "The results from running the circuit on the simulator match expectation. `H` applied to qubit `q0` means that qubit will be $|1\\rangle$ half of the time on average. When `H` is then applied to qubit `q1`, (half of the time), `q1` will measure $|1\\rangle$ a quarter of the time and $|0\\rangle$ three-quarters of the time.\n", "\n", - "Using just these conditions, we can construct the [quantum teleportation](/cirq/experiments/textbook_algorithms#quantum_teleportation) circuit:" + "Using just these conditions, we can construct the [quantum teleportation](../experiments/textbook_algorithms.ipynb#quantum_teleportation) circuit:" ] }, { @@ -320,7 +320,7 @@ "source": [ "## Using with transformers\n", "\n", - "Cirq [transformers](/cirq/transform/transformers.ipynb) are aware of classical control and will avoid changes which move a control before its corresponding measurement. Additionally, for some simple cases the [`defer_measurements` transformer](https://github.com/quantumlib/Cirq/blob/6e0e164e8ac1c2f28a1f3389370fffb50a4d2a4f/cirq-core/cirq/transformers/measurement_transformers.py#L58) can convert a classically-controlled circuit into a purely-quantum circuit:" + "Cirq [transformers](../transform/transformers.ipynb) are aware of classical control and will avoid changes which move a control before its corresponding measurement. Additionally, for some simple cases the [`defer_measurements` transformer](https://github.com/quantumlib/Cirq/blob/6e0e164e8ac1c2f28a1f3389370fffb50a4d2a4f/cirq-core/cirq/transformers/measurement_transformers.py#L58) can convert a classically-controlled circuit into a purely-quantum circuit:" ] }, { diff --git a/docs/build/custom_gates.ipynb b/docs/build/custom_gates.ipynb index 332023349e6..371b8ed3c2e 100644 --- a/docs/build/custom_gates.ipynb +++ b/docs/build/custom_gates.ipynb @@ -543,7 +543,7 @@ "These gates can be understood by the simulator, optimizers, and other code.\n", "3. All that matters is functional equivalence.\n", "Don't worry about staying within or reaching a particular gate set; it's too hard to predict what the caller will want. Gate-set-aware decomposition is useful, but *this is not the protocol that does that*.\n", - "Instead, use features available in the [transformer API](/cirq/transform/transformers.ipynb#compiling_to_nisq_targets_cirqcompilationtargetgateset).\n", + "Instead, use features available in the [transformer API](../transform/transformers.ipynb#compiling_to_nisq_targets_cirqcompilationtargetgateset).\n", "\n", "For example, `cirq.CCZ` decomposes into a series of `cirq.CNOT` and `cirq.T` operations.\n", "This allows code that doesn't understand three-qubit operation to work with `cirq.CCZ`; by decomposing it into operations they do understand.\n", diff --git a/docs/build/ecosystem.md b/docs/build/ecosystem.md index 6be8b54af9c..d86b497cd35 100644 --- a/docs/build/ecosystem.md +++ b/docs/build/ecosystem.md @@ -45,7 +45,7 @@ The following document provides an ecosystem overview of how the various tools c |[Rigetti](https://quantumai.google/cirq/hardware/rigetti/getting_started)|Superconducting qubits| For more information for vendors about integrating with cirq, -see our [RFC page](/cirq/dev/rfc_process#new_hardware_integrations). +see our [RFC page](../dev/rfc_process.md#new_hardware_integrations). ## High performance quantum circuit simulators diff --git a/docs/build/gates.ipynb b/docs/build/gates.ipynb index 85ccd975bb7..f8e31b4e2fc 100644 --- a/docs/build/gates.ipynb +++ b/docs/build/gates.ipynb @@ -190,7 +190,7 @@ "unitaries and associated probabilities of a mixture can be accessed by\n", "`cirq.mixture(gate)`. The Kraus operator representation of a channel can be\n", "accessed by `cirq.kraus(gate)`. Non-unitary gates are often used in the\n", - "simulation of noise. See [noise documentation](/cirq/simulate/noisy_simulation.ipynb) for more details.\n", + "simulation of noise. See [noise documentation](../simulate/noisy_simulation.ipynb) for more details.\n", "\n", "Many arithmetic operators will work in the expected way when applied to\n", "gates. For instance, ``cirq.X**0.5`` represents a square root of X gate.\n", diff --git a/docs/build/operators.ipynb b/docs/build/operators.ipynb index a3285410940..1f019d5257c 100644 --- a/docs/build/operators.ipynb +++ b/docs/build/operators.ipynb @@ -318,7 +318,7 @@ "id": "00e6acd6ca82" }, "source": [ - "The `key` can be used to identify results of measurements when [simulating circuits](/cirq/simulate/simulation.ipynb). A measurement gate acting on a qubit forms an operation." + "The `key` can be used to identify results of measurements when [simulating circuits](../simulate/simulation.ipynb). A measurement gate acting on a qubit forms an operation." ] }, { @@ -529,7 +529,7 @@ "id": "aa5f8ad751d3" }, "source": [ - "Custom noisy channels can be defined as described in [this guide](/cirq/simulate/noisy_simulation.ipynb)." + "Custom noisy channels can be defined as described in [this guide](../simulate/noisy_simulation.ipynb)." ] }, { @@ -572,7 +572,7 @@ "id": "9eeae0d8a85e" }, "source": [ - "The general input to the circuit constructor is a `cirq.OP_TREE`, i.e., an operation or nested collection of operations. Circuits can be manipulated as described in the [circuits guide](circuits.ipynb) and simulated as described in the [simulation guide](/cirq/simulate/simulation.ipynb)." + "The general input to the circuit constructor is a `cirq.OP_TREE`, i.e., an operation or nested collection of operations. Circuits can be manipulated as described in the [circuits guide](circuits.ipynb) and simulated as described in the [simulation guide](../simulate/simulation.ipynb)." ] }, { diff --git a/docs/build/pauli_observables.ipynb b/docs/build/pauli_observables.ipynb index 17d92975d47..be7476471da 100644 --- a/docs/build/pauli_observables.ipynb +++ b/docs/build/pauli_observables.ipynb @@ -87,7 +87,7 @@ "\n", "[Observables](https://en.wikipedia.org/wiki/Observable){:.external} are, in general, some sort of measurable property of a circuit. At its very simplest, this could be whether a qubit measures to be $|0\\rangle$ or $|1\\rangle$ in the standard computational basis. In the Pauli basis, this corresponds to the `Z` observable. In general, this is roughly a way to measure qubit state in a basis other than the computational one, by applying basis-changing operations before measurement. \n", "\n", - "In Cirq, compositions, linear combinations, and tensor products of Pauli operators are represented with `cirq.PauliString` and `cirq.PauliSum`, which this tutorial will demonstrate next. Fundamentally, these objects are still [Operations](/cirq/build/operators), and can be added to circuits like any other operation. The second half of this tutorial will cover the second use of `PauliString`s, as observables in measurement. " + "In Cirq, compositions, linear combinations, and tensor products of Pauli operators are represented with `cirq.PauliString` and `cirq.PauliSum`, which this tutorial will demonstrate next. Fundamentally, these objects are still [Operations](./operators.ipynb), and can be added to circuits like any other operation. The second half of this tutorial will cover the second use of `PauliString`s, as observables in measurement. " ] }, { @@ -653,7 +653,7 @@ "If you need to measure many different `PauliString`s (not `PauliSum`s), for a circuit, `cirq.measure_observables` may fit your needs. It serves to estimate each observable in a provided iterable by computing the mean and variance over a number of repetitions defined by the `stopping_criteria` argument. In the example below, this stopping criteria is fixed at `50,000` repetitions. \n", "\n", "The function also supports the following optional arguments, which expand its functionality: \n", - "- circuit_sweep: A parameter sweep as in [Parameter Sweeps](/cirq/simulate/params)\n", + "- circuit_sweep: A parameter sweep as in [Parameter Sweeps](../simulate/params.ipynb)\n", "- readout_calibrations: An input to make use of previously-collected readout error data.\n", "- grouper: A strategy to group the observables so multiple observables can be measured in the same run (uses default greedy strategy).\n", "- readout_symmetrization: Applies a bit flip after half of the runs to make readout error seem symmetric" diff --git a/docs/build/qudits.ipynb b/docs/build/qudits.ipynb index 8a6b56ba76f..3e46ec3c16c 100644 --- a/docs/build/qudits.ipynb +++ b/docs/build/qudits.ipynb @@ -204,7 +204,7 @@ "source": [ "### Unitaries, mixtures, and channels on qudits\n", "\n", - "The magic methods `_unitary_`, `_apply_unitary_`, `_mixture_`, and `_kraus_` can be used to define unitary gates, mixtures, and channels can be used with qudits (see [protocols](protocols.md) for how these work.)\n", + "The magic methods `_unitary_`, `_apply_unitary_`, `_mixture_`, and `_kraus_` can be used to define unitary gates, mixtures, and channels can be used with qudits (see [protocols](protocols.ipynb) for how these work.)\n", "\n", "Because the state space for qudits for $d>2$ live on larger dimensional spaces, the corresponding objects returned by the magic methods will be of corresponding higher dimension. " ] diff --git a/docs/dev/modules.md b/docs/dev/modules.md index bda4f806596..c92ad1ce4b0 100644 --- a/docs/dev/modules.md +++ b/docs/dev/modules.md @@ -89,7 +89,7 @@ To setup a new module follow these steps: You can run `check/pytest-changed-files` and that should execute the json_serialization_test.py as well. -That's it! Now, you can follow the [Serialization guide](/cirq/dev/serialization.md) for adding and removing serializable objects. +That's it! Now, you can follow the [Serialization guide](./serialization.md) for adding and removing serializable objects. # Utilities diff --git a/docs/dev/notebooks.md b/docs/dev/notebooks.md index a8fdc97e1bb..137a2436b89 100644 --- a/docs/dev/notebooks.md +++ b/docs/dev/notebooks.md @@ -47,8 +47,8 @@ In order to speed up the execution of these tests an auxiliary file may be suppl to reduce the number of repetitions in sampling from a simulator). To do this, for a notebook file notebook.ipynb, one can supply a file notebook.tst which contains the substitutes. -The substitutions are provide in the form `pattern->replacement` where the pattern is what is matched and will be replaced. -While the pattern is compiled, it is considered best practice to not sure complicated regular expressions. +The substitutions are provided in the form `pattern->replacement` where the pattern is what is matched and will be replaced. +While the pattern is compiled, it is considered best practice to not use complicated regular expressions. Lines in this file that do not have `->` are ignored. Note that because the pattern is compiled, it may be necessary to escape the pattern, however it is best to try to avoid such complicated expressions. diff --git a/docs/dev/rfc_process.md b/docs/dev/rfc_process.md index 5b71ff90d9b..527f04a45e9 100644 --- a/docs/dev/rfc_process.md +++ b/docs/dev/rfc_process.md @@ -118,7 +118,7 @@ review process is to ensure all integrations end up with a well-maintained, user friendly interface with a high reliability. Examples of other integrations can be found on the -[Hardware page](/cirq/hardware). +[Hardware page](../hardware). There are a range of possibilities for integrating with cirq, including: diff --git a/docs/dev/serialization.md b/docs/dev/serialization.md index c1f149f8f8c..15d88bad6d1 100644 --- a/docs/dev/serialization.md +++ b/docs/dev/serialization.md @@ -80,7 +80,7 @@ If the returned object has a `_from_json_dict_` attribute, it is called instead. ## Adding a new serializable value All of Cirq's public classes should be serializable. Public classes are the ones that can be found in the Cirq module top level -namespaces, i.e. `cirq.*`, `cirq_google.*`, `cirq_aqt.*`, etc, (see [Cirq modules](/cirq/dev/modules.md) for setting up JSON serialization for a module). +namespaces, i.e. `cirq.*`, `cirq_google.*`, `cirq_aqt.*`, etc, (see [Cirq modules](./modules.md) for setting up JSON serialization for a module). This is enforced by the `test_json_test_data_coverage` test in `cirq-core/cirq/protocols/json_serialization_test.py`, which iterates over cirq's API looking for types with no associated json test data. @@ -162,4 +162,4 @@ given top level package's spec.py (`//json_test_data/ name to `should_not_serialize`. We allow for incremental introduction of new objects to serializability - if an object should be -serialized but is not yet serializable, it should be added to the `not_yet_serializable` list in the `spec.py` file. \ No newline at end of file +serialized but is not yet serializable, it should be added to the `not_yet_serializable` list in the `spec.py` file. diff --git a/docs/experiments/variational_algorithm.ipynb b/docs/experiments/variational_algorithm.ipynb index 9757bb4d90c..f2b3d36a2ab 100644 --- a/docs/experiments/variational_algorithm.ipynb +++ b/docs/experiments/variational_algorithm.ipynb @@ -140,7 +140,7 @@ "source": [ "## Create a circuit on a Grid\n", "\n", - "To build the above variational quantum algorithm using Cirq, one begins by building the appropriate circuit. Because the problem we have defined has a natural structure on a grid, we will use Cirq’s built-in `cirq.GridQubit`s as our qubits. We will demonstrate some of how this works in an interactive Python environment, the following code can be run in series in a Python environment where you have Cirq installed. For more about circuits and how to create them, see the [Tutorial](/cirq/start/basics.ipynb) or the [Circuits](/cirq/build/circuits.ipynb) page." + "To build the above variational quantum algorithm using Cirq, one begins by building the appropriate circuit. Because the problem we have defined has a natural structure on a grid, we will use Cirq’s built-in `cirq.GridQubit`s as our qubits. We will demonstrate some of how this works in an interactive Python environment, the following code can be run in series in a Python environment where you have Cirq installed. For more about circuits and how to create them, see the [Tutorial](../start/basics.ipynb) or the [Circuits](../build/circuits.ipynb) page." ] }, { diff --git a/docs/google/access.md b/docs/google/access.md index afa6694ed83..1054dbe4991 100644 --- a/docs/google/access.md +++ b/docs/google/access.md @@ -57,7 +57,7 @@ sponsor so that they can be added. ## Next Steps At this point, you should now have access to the Quantum Computing Service. -You can try out our [Getting Started Guide](/cirq/tutorials/google/start.ipynb). +You can try out our [Getting Started Guide](../tutorials/google/start.ipynb). You can also learn more about how to use the [Engine class](engine.md) to access Google hardware or about [Google devices](devices.md) in the diff --git a/docs/google/best_practices.ipynb b/docs/google/best_practices.ipynb index 0e28d99e41f..40e9e93ff5e 100644 --- a/docs/google/best_practices.ipynb +++ b/docs/google/best_practices.ipynb @@ -114,7 +114,7 @@ "`cg.Sycamore.validate_circuit(circuit)` will test a lot of these\n", "conditions. Calling the `validate_circuit` function will work with any\n", "device, including those retrieved directly from the API using the\n", - "[engine object](/cirq/google/specification.md#conversion-to-cirq.device), which can help\n", + "[engine object](./specification.md#conversion-to-cirq.device), which can help\n", "identify any qubits used in the circuit that have been disabled on the actual\n", "device." ] @@ -398,7 +398,7 @@ "good moment structure that avoids problematic missteps that can cause\n", "unwanted noise and error.\n", "\n", - "Note: See the [Circuit optimization, gate alignment, and spin echoes tutorial](/cirq/tutorials/google/spin_echoes.ipynb) for an example of the best practices discussed in this section.\n", + "Note: See the [Circuit optimization, gate alignment, and spin echoes tutorial](../tutorials/google/spin_echoes.ipynb) for an example of the best practices discussed in this section.\n", "\n", "### Short gate depth\n", "\n", @@ -478,7 +478,7 @@ "calibration procedure. These metrics can be used as a baseline to evaluate\n", "circuit performance or identify outliers to avoid. This data can be inspected\n", "programmatically by retrieving metrics from the [API](calibration.md) or\n", - "[visually by applying a cirq.Heatmap](/cirq/tutorials/google/visualizing_calibration_metrics.ipynb)\n", + "[visually by applying a cirq.Heatmap](../tutorials/google/visualizing_calibration_metrics.ipynb)\n", "to that data or by using the built-in\n", "heatmaps in the Cloud console page for the processor. Note that, since this\n", "data is only taken during calibration (e.g. at most daily), drifts and other\n", @@ -488,11 +488,11 @@ "* Loschmidt echo: Running a small circuit on a string of qubits and then\n", "applying the circuit's inverse can be used as a quick but effective way to\n", "judge qubit quality. See\n", - "[this tutorial](/cirq/tutorials/google/echoes.ipynb) for instructions.\n", + "[this tutorial](../tutorials/google/echoes.ipynb) for instructions.\n", "* XEB: Cross-entropy benchmarking is another way to gauge qubit performance\n", "on a set of random circuits. See tutorials on\n", - "[parallel XEB](/cirq/noise/qcvv/parallel_xeb.ipynb)\n", - "or [isolated XEB](/cirq/noise/qcvv/isolated_xeb.ipynb) for instructions.\n", + "[parallel XEB](../noise/qcvv/parallel_xeb.ipynb)\n", + "or [isolated XEB](../noise/qcvv/isolated_xeb.ipynb) for instructions.\n", "\n", "\n", "### Refitting gates\n", @@ -525,9 +525,9 @@ "\n", "For more on calibration and detailed instructions on how to perform these procedures, see the following tutorials:\n", "\n", - "* [Calibration API](/cirq/noise/calibration_api.ipynb)\n", - "* [Floquet calibration example](/cirq/noise/floquet_calibration_example.ipynb)\n", - "* [XEB calibration example](/cirq/noise/qcvv/xeb_calibration_example.ipynb)" + "* [Calibration API](../noise/calibration_api.ipynb)\n", + "* [Floquet calibration example](../noise/floquet_calibration_example.ipynb)\n", + "* [XEB calibration example](../noise/qcvv/xeb_calibration_example.ipynb)" ] } ], diff --git a/docs/google/concepts.ipynb b/docs/google/concepts.ipynb index 092d937f9e9..f67725f102c 100644 --- a/docs/google/concepts.ipynb +++ b/docs/google/concepts.ipynb @@ -111,7 +111,7 @@ "source": [ "### Circuits\n", "\n", - "The language of quantum computing is the quantum circuit model. Cirq is our open source framework which allows one to write a quantum circuit model in Python. To learn more about Cirq itself, we recommend starting with the [Tutorial](/cirq/start/basics.ipynb). Conceptually, Cirq can be thought of as a way to create a quantum circuit as an object in Python. For example, we create a single circuit made up of square root of NOT gates, controlled-Z gates, and a measurement:" + "The language of quantum computing is the quantum circuit model. Cirq is our open source framework which allows one to write a quantum circuit model in Python. To learn more about Cirq itself, we recommend starting with the [Tutorial](../start/basics.ipynb). Conceptually, Cirq can be thought of as a way to create a quantum circuit as an object in Python. For example, we create a single circuit made up of square root of NOT gates, controlled-Z gates, and a measurement:" ] }, { @@ -140,7 +140,7 @@ "source": [ "### Quantum Engine API\n", "\n", - "Quantum Engine is the name of the cloud API which one can call to run the circuits you create in Cirq on quantum computers. When access is enabled, users can call this API to run circuits on Google’s quantum hardware. Read more about how to do this using cirq's `Engine` class [here](/cirq/google/engine.ipynb).\n", + "Quantum Engine is the name of the cloud API which one can call to run the circuits you create in Cirq on quantum computers. When access is enabled, users can call this API to run circuits on Google’s quantum hardware. Read more about how to do this using cirq's `Engine` class [here](./engine.md).\n", "\n", "![Quantum Engine Conceptual Diagram](https://github.com/quantumlib/Cirq/blob/master/docs/images/engine_diagram.png?raw=1)" ] @@ -176,7 +176,7 @@ "\n", "![Quantum Cloud Conceptual Diagram](https://github.com/quantumlib/Cirq/blob/master/docs/images/engine_cloud.png?raw=1)\n", "\n", - "See the [Getting Started](/cirq/tutorials/google/start.ipynb) guide for step-by-step instructions on how to create a project and enable the API." + "See the [Getting Started](../tutorials/google/start.ipynb) guide for step-by-step instructions on how to create a project and enable the API." ] }, { @@ -257,7 +257,7 @@ "\n", "Processors that are quantum computers periodically undergo calibrations to maintain the quality of the programs that can be run on these processors. During this calibration metrics about the performance of the quantum computer is collected. This calibration data is stored by Quantum Engine and users can then query for the state of the calibration (one can ask for the latest calibration, or what the state of calibration was at a given point in time). Calibrations are also available for past jobs.\n", "\n", - "Calibration metrics and can be retrieved via the console or via cirq calls. See more details on the [Calibration Metrics](calibration.ipynb) page." + "Calibration metrics and can be retrieved via the console or via cirq calls. See more details on the [Calibration Metrics](./calibration.md) page." ] }, { diff --git a/docs/google/devices.md b/docs/google/devices.md index 52c758e0844..d1a237424e8 100644 --- a/docs/google/devices.md +++ b/docs/google/devices.md @@ -68,14 +68,14 @@ if a moment has gates of duration 12ns, 25ns, and 32ns, the entire moment will take 32ns. Qubits executing the shorter gtes will idle during the rest of the time. To minimize the duration of the circuit, it is best to align gates of the same duration together when possible. See the -[best practices](/cirq/google/best_practices.ipynb) for more details. +[best practices](./best_practices.ipynb) for more details. ## Gates supported The following lists the gates supported by Google devices. Please note that gate durations are subject to change as hardware is updated and modified, so please refer to the -[device specification](/cirq/google/specification.md) +[device specification](./specification.md) to get up-to-date information on supported gates and durations for specific processors. @@ -85,7 +85,7 @@ This can include both incoherent as well as coherent error. Note: Gate durations are subject to change based on device or configuration. To get gates durations for a specific device, see the -[Device specification](/cirq/google/specification.md#gate-durations) page. Also +[Device specification](./specification.md#gate-durations) page. Also note that some gates (such as Z gates or Fsim gates) have multiple variations that can have different durations. diff --git a/docs/google/engine.md b/docs/google/engine.md index 2f9edd18853..c78e3924400 100644 --- a/docs/google/engine.md +++ b/docs/google/engine.md @@ -6,7 +6,7 @@ to access or manage the jobs, programs, reservations and calibrations. As of Cir the only supported client for this API, using the `cirq_google.Engine` class. For other use cases (e.g. from a different language), contact [cirq-maintainers@googlegroups.com](mailto:cirq-maintainers@googlegroups.com) -with a short proposal or submit an [RFC](/cirq/dev/rfc_process.md). +with a short proposal or submit an [RFC](../dev/rfc_process.md). Note: the Quantum Engine API is not yet open for public access. diff --git a/docs/hardware/aqt/access.md b/docs/hardware/aqt/access.md index bdbf24d8006..74869b3b621 100644 --- a/docs/hardware/aqt/access.md +++ b/docs/hardware/aqt/access.md @@ -41,4 +41,4 @@ with the token on the At this point, you should now have access to the AQT service. You can now try out our -[Getting Started Guide](/cirq/hardware/aqt/getting_started.ipynb). +[Getting Started Guide](./getting_started.ipynb). diff --git a/docs/hardware/azure-quantum/access.md b/docs/hardware/azure-quantum/access.md index 5ffc9726a0b..00c266fadd6 100644 --- a/docs/hardware/azure-quantum/access.md +++ b/docs/hardware/azure-quantum/access.md @@ -2,7 +2,7 @@ [Azure Quantum](https://docs.microsoft.com/azure/quantum/overview-azure-quantum) is Microsoft's cloud service for running quantum computing programs or solving optimization problems and is currently in [Public Preview](https://cloudblogs.microsoft.com/quantum/2021/02/01/azure-quantum-preview/). You can try Azure Quantum for free today and submit quantum programs to Azure Quantum's partners and technologies. To send quantum programs with Cirq to IonQ or Honeywell via an Azure Quantum subscription, follow the simple steps below to set up access. -Note: There are two packages that can be used to access IonQ devices with `cirq`: `azure-quantum` or `cirq-ionq`. If you would like to access IonQ via a new or existing Azure subscription, use `azure-quantum` by following the steps in this tutorial. If you already have a preexisting IonQ API key through other means, follow the steps outlined in [Cirq with the IonQ API](/cirq/hardware/ionq/access.md) to use `cirq-ionq` instead. +Note: There are two packages that can be used to access IonQ devices with `cirq`: `azure-quantum` or `cirq-ionq`. If you would like to access IonQ via a new or existing Azure subscription, use `azure-quantum` by following the steps in this tutorial. If you already have a preexisting IonQ API key through other means, follow the steps outlined in [Cirq with the IonQ API](../ionq/access.md) to use `cirq-ionq` instead. ## 1. Create an Azure Subscription @@ -24,6 +24,6 @@ pip install azure-quantum[cirq] You're now all set up to get started submitting quantum circuits to Azure Quantum hardware providers with Cirq. To try it out, check out the tutorials below: -[Getting started with IonQ and Cirq on Azure Quantum](/cirq/hardware/azure-quantum/getting_started_ionq.ipynb) +[Getting started with IonQ and Cirq on Azure Quantum](./getting_started_ionq.ipynb) -[Getting started with Honeywell and Cirq on Azure Quantum](/cirq/hardware/azure-quantum/getting_started_honeywell.ipynb) +[Getting started with Honeywell and Cirq on Azure Quantum](./getting_started_honeywell.ipynb) diff --git a/docs/hardware/devices.ipynb b/docs/hardware/devices.ipynb index 12a6066ca01..87b50481a41 100644 --- a/docs/hardware/devices.ipynb +++ b/docs/hardware/devices.ipynb @@ -474,9 +474,9 @@ "source": [ "## Use in a virtual Engine\n", "\n", - "`Device`s can also be used to specify `cirq.SimulatedLocalEngine` instances, which let you validate and simulate circuits using the same interface that the quantum hardware does. Read more in the [Virtual Engine Interface](/cirq/simulate/virtual_engine_interface) page. \n", + "`Device`s can also be used to specify `cirq.SimulatedLocalEngine` instances, which let you validate and simulate circuits using the same interface that the quantum hardware does. Read more in the [Virtual Engine Interface](../simulate/virtual_engine_interface.ipynb) page. \n", "\n", - "Additionally, these virtual `Engine`s can be combined with noisy simulation that attempts to mimic existing hardware devices with the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine). " + "Additionally, these virtual `Engine`s can be combined with noisy simulation that attempts to mimic existing hardware devices with the [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb). " ] }, { diff --git a/docs/hardware/ionq/getting_started.ipynb b/docs/hardware/ionq/getting_started.ipynb index fc95c159185..b49f48013c5 100644 --- a/docs/hardware/ionq/getting_started.ipynb +++ b/docs/hardware/ionq/getting_started.ipynb @@ -127,7 +127,7 @@ "\n", "## Running a simple circuit\n", "\n", - "The IonQ API supports a limited set of gates natively. Circuit built with these gates do not need any modification and can be run directly against the API. For a list of the API supported gates see [circuit documentation](/cirq/hardware/ionq/circuits). One supported gate is the square root of not gate, which we use here in conjunction with a controlled-not gate. The following cell will run the circuit below, blocking until the program has run and results have been returned:" + "The IonQ API supports a limited set of gates natively. Circuit built with these gates do not need any modification and can be run directly against the API. For a list of the API supported gates see [circuit documentation](./circuits.md). One supported gate is the square root of not gate, which we use here in conjunction with a controlled-not gate. The following cell will run the circuit below, blocking until the program has run and results have been returned:" ] }, { @@ -342,11 +342,11 @@ "\n", "Check out the documentation on fully using the Cirq IonQ integration\n", "\n", - "[Learn how to build circuits for the API](/cirq/hardware/ionq/circuits.md)\n", + "[Learn how to build circuits for the API](./circuits.md)\n", "\n", - "[How to use the service API](/cirq/hardware/ionq/jobs.md)\n", + "[How to use the service API](./jobs.md)\n", "\n", - "[Learn how to query the performance of a processor by accessing IonQ calibrations](/cirq/hardware/ionq/calibrations.md)" + "[Learn how to query the performance of a processor by accessing IonQ calibrations](./calibrations.md)" ] } ], diff --git a/docs/hardware/pasqal/access.md b/docs/hardware/pasqal/access.md index 67b29431e31..d8ed8c02554 100644 --- a/docs/hardware/pasqal/access.md +++ b/docs/hardware/pasqal/access.md @@ -16,4 +16,4 @@ Access to Pasqal's API is not required for using Cirq to create quantum circuits specifically tailored for our devices. Regardless of whether you have access or not, you can start playing around with Pasqal's classes with the -tutorial [Quantum Circuits on Pasqal Devices](/cirq/hardware/pasqal/getting_started.ipynb). +tutorial [Quantum Circuits on Pasqal Devices](./getting_started.ipynb). diff --git a/docs/hardware/qubit_picking.ipynb b/docs/hardware/qubit_picking.ipynb index 60c48c55c2b..26584efc9c0 100644 --- a/docs/hardware/qubit_picking.ipynb +++ b/docs/hardware/qubit_picking.ipynb @@ -106,7 +106,7 @@ "\n", "## Error characterization data\n", "\n", - "Cirq provides characterization error data that is intended to represent median performance of actual Google quantum hardware as accurately as possible. The primary use of this data is for creating a `cirq.NoiseModel` for use in a [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine), but it also provides information on what qubits are the best to use for your circuit. \n", + "Cirq provides characterization error data that is intended to represent median performance of actual Google quantum hardware as accurately as possible. The primary use of this data is for creating a `cirq.NoiseModel` for use in a [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb), but it also provides information on what qubits are the best to use for your circuit. \n", "\n", "The following code demonstrates how to load that noise data as a `cirq_google.GoogleNoiseProperties` object, which specifies the available data." ] @@ -132,7 +132,7 @@ "source": [ "### One qubit gate Pauli error data\n", "\n", - "Pauli error defines decoherence of a single qubit in one of the Pauli [channels](/cirq/noise/representing_noise) X, Y, or Z. If the errors are distributed in the uniform distribution over all three axes, the probability of applying an erroneous Pauli gate X, Y, or Z will be the Pauli error divided by three. See page 11 of [this Supplementary Information document](https://arxiv.org/abs/1910.11333){:.external} for more on Pauli error. \n", + "Pauli error defines decoherence of a single qubit in one of the Pauli [channels](../noise/representing_noise.ipynb) X, Y, or Z. If the errors are distributed in the uniform distribution over all three axes, the probability of applying an erroneous Pauli gate X, Y, or Z will be the Pauli error divided by three. See page 11 of [this Supplementary Information document](https://arxiv.org/abs/1910.11333){:.external} for more on Pauli error. \n", "\n", "Below is the single qubit Pauli error for the `cirq.PhasedXZGate` supported by the Rainbow processor, pulled from the `gate_pauli_errors` attribute of the noise properties object. You can inspect the error for the other supported one-qubit gates by replacing the `gate` variable below. However, as of July 19th, 2022, the error estimation process results in identical Pauli error for all one-qubit gates." ] @@ -222,7 +222,7 @@ "source": [ "### Two qubit gate FSim error\n", "\n", - "FSim error represents [coherent](/cirq/noise/representing_noise#channels) two-qubit error that cannot be represented by Pauli channels (that is, it results from entanglement). Instead, it is represented as an additional `cirq.PhasedFSimGate` with small parameters that would be applied to a given qubit pair after any two-qubit gate's execution.\n", + "FSim error represents [coherent](../noise/representing_noise.ipynb#channels) two-qubit error that cannot be represented by Pauli channels (that is, it results from entanglement). Instead, it is represented as an additional `cirq.PhasedFSimGate` with small parameters that would be applied to a given qubit pair after any two-qubit gate's execution.\n", "\n", "The following example takes the norm of a couple of the parameters, as a rough approximate representation of the goodness of qubit pairs relative to one another. " ] @@ -264,9 +264,9 @@ "id": "0SKqbogVtSFs" }, "source": [ - "This fsim data would influence you to avoid the `(6,2)-(7,2)` qubit pair, and prefer the top left of the grid for high-priority qubit pairs (those that have two-qubit gates executed on them many times in your circuit). Additionally, the fact that the `cirq.SycamoreGate` error is so much lower than the `cirq.ISwapPowGate` error means the device was likely calibrated for the `SycamoreGate`, and you should [transform](/cirq/transform/transformers) your circuit with `cirq.optimize_for_target_gateset` to the `cirq_google.transformers.SycamoreTargetGateset` gate set, if possible.\n", + "This fsim data would influence you to avoid the `(6,2)-(7,2)` qubit pair, and prefer the top left of the grid for high-priority qubit pairs (those that have two-qubit gates executed on them many times in your circuit). Additionally, the fact that the `cirq.SycamoreGate` error is so much lower than the `cirq.ISwapPowGate` error means the device was likely calibrated for the `SycamoreGate`, and you should [transform](../transform/transformers.ipynb) your circuit with `cirq.optimize_for_target_gateset` to the `cirq_google.transformers.SycamoreTargetGateset` gate set, if possible.\n", "\n", - "This particular type of error can be compensated for somewhat, by using [Floquet calibration](/cirq/noise/floquet_calibration_example), but this is out of scope for this notebook, and may require adaptation to work with the provided processor error data." + "This particular type of error can be compensated for somewhat, by using [Floquet calibration](../noise/floquet_calibration_example.ipynb), but this is out of scope for this notebook, and may require adaptation to work with the provided processor error data." ] }, { @@ -334,9 +334,9 @@ "- Two-qubit Fsim error for each supported two-qubit gate that models non-Pauli error. \n", "- Readout error for each qubit that models error in measurements.\n", "\n", - "While often used to create [QVM](/cirq/simulate/quantum_virtual_machine)s, this data is also useful in the process of finding good qubits to use. By avoiding high error qubits whenever possible, you can maximize the reliability of your circuit. \n", + "While often used to create [QVM](../simulate/quantum_virtual_machine.ipynb)s, this data is also useful in the process of finding good qubits to use. By avoiding high error qubits whenever possible, you can maximize the reliability of your circuit. \n", "\n", - "If you're working with an actual device that may experience drift, or a change in behavior over time, you may need to use more advanced noise compensation strategies, which you can read about in the [Noise](/cirq/noise) category." + "If you're working with an actual device that may experience drift, or a change in behavior over time, you may need to use more advanced noise compensation strategies, which you can read about in the [Noise](../noise) category." ] } ], diff --git a/docs/hardware/rigetti/access.md b/docs/hardware/rigetti/access.md index ca317594121..7d4bdb93966 100644 --- a/docs/hardware/rigetti/access.md +++ b/docs/hardware/rigetti/access.md @@ -8,4 +8,4 @@ The Rigetti QCS API provides access to and descriptions of Rigetti quantum proce Note that you do not need Rigetti QCS credentials to execute on the Quil QVM, but you _will_ need them for execution on live Rigetti quantum processors. -With your environment setup, you will be able use the `cirq-rigetti` package as described in our [Getting Started Guide](/cirq/hardware/rigetti/getting_started.ipynb). \ No newline at end of file +With your environment setup, you will be able use the `cirq-rigetti` package as described in our [Getting Started Guide](./getting_started.ipynb). diff --git a/docs/noise/calibration_api.ipynb b/docs/noise/calibration_api.ipynb index f36cf7988cc..dedf35800d6 100644 --- a/docs/noise/calibration_api.ipynb +++ b/docs/noise/calibration_api.ipynb @@ -223,7 +223,7 @@ "id": "c9ZjppgcbVQz" }, "source": [ - "Note: Above we picked any qubits, but in an actual experiment you want to pick a good set of qubits to run on. To do so, use the latest maintanence report as in [this XEB calibration example](/cirq/noise/qcvv/xeb_calibration_example.ipynb) or use a Loschmidt echo as in [this Loschmidt echo tutorial](/cirq/tutorials/google/echoes.ipynb)." + "Note: Above we picked any qubits, but in an actual experiment you want to pick a good set of qubits to run on. To do so, use the latest maintanence report as in [this XEB calibration example](./qcvv/xeb_calibration_example.ipynb) or use a Loschmidt echo as in [this Loschmidt echo tutorial](../tutorials/google/echoes.ipynb)." ] }, { @@ -350,7 +350,7 @@ "id": "io2YyhxaN6xt" }, "source": [ - "XEB calibration works by executing a library of random circuits both on a noiseless simulator and on a noisy processor, then comparing results. In principle it can characterize any two-qubit gate, but compensation is currently only for $\\zeta$, $\\chi$, and $\\gamma$. For more details about how XEB calibration works, see the [Parallel XEB tutorial](/cirq/noise/qcvv/parallel_xeb).\n", + "XEB calibration works by executing a library of random circuits both on a noiseless simulator and on a noisy processor, then comparing results. In principle it can characterize any two-qubit gate, but compensation is currently only for $\\zeta$, $\\chi$, and $\\gamma$. For more details about how XEB calibration works, see the [Parallel XEB tutorial](./qcvv/parallel_xeb.ipynb).\n", "\n", "Like Floquet calibration, the first step to using XEB calibration is defining options. Unlike Floquet calibration, XEB calibration requires significant classical processing to characterize angles. In addition to the angles to characterize, we also need to define the `cycle_depths` of the random circuits. The number of processes `n_processes` is a parallelization option for the classical processing." ] @@ -551,10 +551,10 @@ "source": [ "Try running Floquet and/or XEB calibration on your circuit(s). See the following tutorials for detailed examples and benchmarks.\n", "\n", - "- [Floquet calibration: Example and benchmark](/cirq/noise/floquet_calibration_example.ipynb)\n", - "- [XEB calibration: Example and benchmark](/cirq/noise/qcvv/xeb_calibration_example.ipynb)\n", + "- [Floquet calibration: Example and benchmark](./floquet_calibration_example.ipynb)\n", + "- [XEB calibration: Example and benchmark](./qcvv/xeb_calibration_example.ipynb)\n", "\n", - "See also the [Calibration FAQ](/cirq/noise/calibration_faq.md) for additional information on calibration." + "See also the [Calibration FAQ](./calibration_faq.md) for additional information on calibration." ] } ], diff --git a/docs/noise/calibration_faq.md b/docs/noise/calibration_faq.md index 93fa5e28066..3bff45415db 100644 --- a/docs/noise/calibration_faq.md +++ b/docs/noise/calibration_faq.md @@ -14,8 +14,8 @@ closely resemble the actual effect, some errors can be compensated for by using each gate. This will improve the accuracy of the overall moment without adding additional duration to the circuit (the newly added Z gates will be merged with the already existing Z gates after sending circuits to the QCS.) -The [two supported techniques](/cirq/noise/calibration_api.ipynb) are [Floquet calibration](/cirq/noise/floquet_calibration_example.ipynb) -and [XEB calibration](/cirq/noise/qcvv/xeb_calibration_example.ipynb), both of which are advanced alpha features. +The [two supported techniques](./calibration_api.ipynb) are [Floquet calibration](./floquet_calibration_example.ipynb) +and [XEB calibration](./qcvv/xeb_calibration_example.ipynb), both of which are advanced alpha features. ## What is the Floquet calibration protocol? @@ -49,8 +49,8 @@ Floquet calibration does not yet support microwave gates, this functionality is ## How do I calibrate a circuit using Floquet or XEB calibrations? -Refer to the [Calibration API](/cirq/noise/calibration_api.ipynb) tutorial for an overview, and see the -[Floquet calibration example](/cirq/noise/floquet_calibration_example.ipynb) and [XEB calibration example](/cirq/noise/qcvv/xeb_calibration_example.ipynb) +Refer to the [Calibration API](./calibration_api.ipynb) tutorial for an overview, and see the +[Floquet calibration example](./floquet_calibration_example.ipynb) and [XEB calibration example](./qcvv/xeb_calibration_example.ipynb) for detailed steps on example circuits with benchmarks. This is in principle a three-step process which consists of the following three steps: @@ -100,7 +100,7 @@ holistically for the entire chip and is mostly focused on a good performance of benchmarks performance on isolated gates or fully-layered simultaneous gates that may or may not resemble the circuits specific in your execution. -The user-triggered calibrations issued through the [Calibration API](/cirq/noise/calibration_api.ipynb) are designed for circuit-specific +The user-triggered calibrations issued through the [Calibration API](./calibration_api.ipynb) are designed for circuit-specific execution to capture both drift and cross-talk errors. They can be triggered just before the user circuit execution, in order to reduce the effect of drift. They can also be triggered on very specific qubits that match the user’s executed circuits in order to reduce cross-talk errors. The user-triggered calibrations do not change the qubit frequency or pulse shapes at this moment; they @@ -161,7 +161,7 @@ This choice leads to a smaller number of necessary layers, but some of the issue For the highest accuracy, it might be desired to characterize each unique moment separately with the merge_subsets option set to false. -![Illustration of `merge_subsets` option.](/cirq/google/merge_subsets.png) +![Illustration of `merge_subsets` option.](../google/merge_subsets.png) Note that in this image the qubit lines run from top to bottom instead of left to right (the usual in Cirq). @@ -243,15 +243,15 @@ Alternatively, one can run a Loschmidt echo with random circuits using Floquet c probability is higher than before. Even though the Loschmidt Echo random circuit may look very different from the actual circuit you are running, the gate compensations should result in a decent improvement in the return probabilities. -See [this tutorial for an example of using Loschmidt echo](/cirq/tutorials/google/echoes.ipynb). Here is an example of applying Floquet and XEB +See [this tutorial for an example of using Loschmidt echo](../tutorials/google/echoes.ipynb). Here is an example of applying Floquet and XEB corrections to a 16-site Loschmidt echo circuit (higher is better): -![Calibration benchmark with Loscmidt echoes](/cirq/google/loschmidt_echo_with_calibration_example_results.png) +![Calibration benchmark with Loschmidt echoes](../google/loschmidt_echo_with_calibration_example_results.png) Here is another example of applying calibrations to a linear chain circuit that contains only Z gates and `cirq.SQRT_ISWAP` gates (lower is better): -![Calibration benchmark with linear chain circuit](/cirq/google/linear_chain_with_calibration_example_results.png) +![Calibration benchmark with linear chain circuit](../google/linear_chain_with_calibration_example_results.png) ## How should I test Floquet / XEB Calibration on my circuit? @@ -266,7 +266,7 @@ Here is another example of applying calibrations to a linear chain circuit that * Run the circuit against both a perfect simulator and a coherent noise simulator to get valid baselines for performance. -* Using [this tutorial for Floquet calibration](/cirq/noise/floquet_calibration_example.ipynb) as a guide, introduce Floquet characterization +* Using [this tutorial for Floquet calibration](./floquet_calibration_example.ipynb) as a guide, introduce Floquet characterization and resulting compensating Z phase gates into your circuit, and compare the results with Floquet calibration turned on and turned off. In order to ensure an apt comparison, it is important to keep the following points in mind: @@ -275,14 +275,14 @@ In order to ensure an apt comparison, it is important to keep the following poin - Use parallel readout heatmap to avoid any obviously broken qubits. - Use two-qubit error heatmaps to choose various patches of qubits with good two-qubit gate performance. - Use a mini-benchmark circuit to sanity check both qubit choice and basic circuit design. - - If in doubt, [use parallel XEB to check for issues like drift / TLS](/cirq/tutorials/google/identifying_hardware_changes.ipynb). + - If in doubt, [use parallel XEB to check for issues like drift / TLS](../tutorials/google/identifying_hardware_changes.ipynb). * Start small with a low number of qubits (e.g. 2 qubits, with 5-10 layers of 2 qubit gates), and increase the number of qubits and gate depth. * Do not increase the gate depth past the T1 time of the qubits. * Use out of the box re-compilation first. If that doesn’t work, then try custom recompilation. -For a complete set of best practices, check the following [guide](/cirq/google/best_practices.ipynb). +For a complete set of best practices, check the following [guide](../google/best_practices.ipynb). ## How to compensate for the parasitic c-phase φ angle? diff --git a/docs/noise/floquet_calibration_example.ipynb b/docs/noise/floquet_calibration_example.ipynb index 8afd8b1b3b7..ac2930468f7 100644 --- a/docs/noise/floquet_calibration_example.ipynb +++ b/docs/noise/floquet_calibration_example.ipynb @@ -70,7 +70,7 @@ "id": "MFbogziRQKFQ" }, "source": [ - "This tutorial shows a detailed example and benchmark of Floquet calibration, a calibration technique introduced in the [Calibration: Overview and API](/cirq/noise/calibration_api.ipynb) tutorial." + "This tutorial shows a detailed example and benchmark of Floquet calibration, a calibration technique introduced in the [Calibration: Overview and API](./calibration_api.ipynb) tutorial." ] }, { diff --git a/docs/noise/heatmaps.ipynb b/docs/noise/heatmaps.ipynb index 85dadfac4e2..d03d3009aef 100644 --- a/docs/noise/heatmaps.ipynb +++ b/docs/noise/heatmaps.ipynb @@ -59,7 +59,7 @@ "id": "7d4b5cf32fd2" }, "source": [ - "Qubit heatmaps are primarily used for [visualizing calibration metrics](/cirq/tutorials/google/visualizing_calibration_metrics.ipynb) but can be used for any custom data. This tutorial shows how you can create a `cirq.Heatmap` for single-qubit data and a `cirq.TwoQubitInteractionHeatmap` for two-qubit data." + "Qubit heatmaps are primarily used for [visualizing calibration metrics](../tutorials/google/visualizing_calibration_metrics.ipynb) but can be used for any custom data. This tutorial shows how you can create a `cirq.Heatmap` for single-qubit data and a `cirq.TwoQubitInteractionHeatmap` for two-qubit data." ] }, { @@ -175,7 +175,7 @@ "id": "87d966c05772" }, "source": [ - "These types of plots are used for [visualizing two-qubit calibration metrics](/cirq/tutorials/google/visualizing_calibration_metrics.ipynb)." + "These types of plots are used for [visualizing two-qubit calibration metrics](../tutorials/google/visualizing_calibration_metrics.ipynb)." ] }, { diff --git a/docs/noise/qcvv/coherent_vs_incoherent_xeb.ipynb b/docs/noise/qcvv/coherent_vs_incoherent_xeb.ipynb index 6527e220314..9e95d87c1d7 100644 --- a/docs/noise/qcvv/coherent_vs_incoherent_xeb.ipynb +++ b/docs/noise/qcvv/coherent_vs_incoherent_xeb.ipynb @@ -70,11 +70,11 @@ "source": [ "This notebook demonstrates how to use Cross Entropy Benchmarking (XEB) end-to-end to compare coherent gate parameter error and incoherent depolarization error. It will mimic a small device graph of `cirq.GridQubit` pairs and simulate two-qubit XEB benchmarking circuits on them with noise models that introduce coherent and incoherent error before visualizing and comparing the results.\n", "\n", - "For more information on types of error, see [Average, Pauli and Incoherent Error](/cirq/noise/calibration.md#average-pauli-and-incoherent_error). \n", + "For more information on types of error, see [Average, Pauli and Incoherent Error](../../google/calibration.md#average-pauli-and-incoherent_error). \n", "\n", - "For more information on noise and noise models, see [Noise](/cirq/noise).\n", + "For more information on noise and noise models, see [Noise](../).\n", "\n", - "For more information on how XEB works in detail, see [XEB Theory](/cirq/noise/qcvv/xeb_theory) notebook." + "For more information on how XEB works in detail, see [XEB Theory](./xeb_theory.ipynb) notebook." ] }, { @@ -144,7 +144,7 @@ "source": [ "## Prepare Noise Models\n", "\n", - "To compare coherent and incoherent error, use two different noise models, which introduce coherent and incoherent error respectively. Also included are a noiseless model and a \"fused\" model that combines both coherent and incoherent error, for comparison. See [Noise](/cirq/noise) for the difference between coherent and incoherent error. \n", + "To compare coherent and incoherent error, use two different noise models, which introduce coherent and incoherent error respectively. Also included are a noiseless model and a \"fused\" model that combines both coherent and incoherent error, for comparison. See [Noise](../) for the difference between coherent and incoherent error. \n", "\n", "The coherent noise model is represented by a perturbed `SQRT_ISWAP` gate, which implements a slightly different unitary than a true `SQRT_ISWAP`. Perturbed gates are caused by hardware losing its calibrated tuning, which typically occurres naturally over time between device calibrations. \n", "\n", @@ -822,7 +822,7 @@ "id": "E4xIRDi9gBnu" }, "source": [ - "In the coherent error case, the optimization was able to refit the fidelities very well. The new curves of the refit data almost perfectly match the horizontal line at `1.0` fidelity. The success of this refit means that the estimated parameters for this case are very likely to represent the actual parameters of the gate operation used, which was seen in the fact that the optimization re-discovered the `phi` value that was originally used to perturb `SQRT_ISWAP`. In the real hardware case, identifying these parameters means identifying what unitary the gate control hardware actually implemented. If this unitary is far from the intended one, hardware re-calibration or [compensation](/cirq/noise/calibration_api) must be performed in order to improve circuit fidelity. \n", + "In the coherent error case, the optimization was able to refit the fidelities very well. The new curves of the refit data almost perfectly match the horizontal line at `1.0` fidelity. The success of this refit means that the estimated parameters for this case are very likely to represent the actual parameters of the gate operation used, which was seen in the fact that the optimization re-discovered the `phi` value that was originally used to perturb `SQRT_ISWAP`. In the real hardware case, identifying these parameters means identifying what unitary the gate control hardware actually implemented. If this unitary is far from the intended one, hardware re-calibration or [compensation](../calibration_api.ipynb) must be performed in order to improve circuit fidelity. \n", "\n", "In constrast, the optimizer was completely unable to refit the circuit fidelities in the incoherent error case. The refit fidelities find no meaningful fidelity improvement, instead following the same, expected `5e-3` exponential decay as the original fidelities. Unsurprisingly, the optimizer was unable to find any coherent error in the incoherent-only fidelity data. \n", "\n", @@ -889,7 +889,7 @@ "## What's Next?\n", "\n", "Now that you've identified coherent error, what can you do about it? \n", - "- Depending on the parameter(s) identified to be out of tune, you may be able to change the circuits you want to run to compensate for that change. Read [Calibration API](/cirq/noise/calibration_api) for further information.\n", + "- Depending on the parameter(s) identified to be out of tune, you may be able to change the circuits you want to run to compensate for that change. Read [Calibration API](../calibration_api.ipynb) for further information.\n", "- In the real hardware case, the device may need to be re-calibrated in order to fix the tuning of particular gate operations on particular qubits. Reach out to your google contact to let us know!" ] } diff --git a/docs/noise/qcvv/xeb_calibration_example.ipynb b/docs/noise/qcvv/xeb_calibration_example.ipynb index 1bd899f5874..8ff0731ee73 100644 --- a/docs/noise/qcvv/xeb_calibration_example.ipynb +++ b/docs/noise/qcvv/xeb_calibration_example.ipynb @@ -70,7 +70,7 @@ "id": "yKWtbKQB8Rej" }, "source": [ - "This tutorial shows a detailed example and benchmark of XEB calibration, a calibration technique introduced in the [Calibration: Overview and API](/cirq/noise/calibration_api.ipynb) tutorial." + "This tutorial shows a detailed example and benchmark of XEB calibration, a calibration technique introduced in the [Calibration: Overview and API](../calibration_api.ipynb) tutorial." ] }, { diff --git a/docs/noise/representing_noise.ipynb b/docs/noise/representing_noise.ipynb index 7d89e2c05ba..829eeb2725f 100644 --- a/docs/noise/representing_noise.ipynb +++ b/docs/noise/representing_noise.ipynb @@ -76,7 +76,7 @@ "id": "755ba122d550" }, "source": [ - "This doc assumes you have already read the [noisy simulation](noisy_simulation.ipynb) tutorial.\n", + "This doc assumes you have already read the [noisy simulation](../simulate/noisy_simulation.ipynb) tutorial.\n", "\n", "Cirq provides several built-in tools for representing noise at multiple levels:\n", "- Channels, to insert as individual noisy operators\n", @@ -96,7 +96,7 @@ "\n", "Errors in hardware can be broadly separated into two categories: _coherent_ and _incoherent_.\n", "\n", - "**Coherent** errors apply a reversible (but unknown) transformation, such as making every $Z$ gate instead behave as $Z^{1.01}$. This can be represented by inserting [gates](gates.ipynb) into the intended circuit.\n", + "**Coherent** errors apply a reversible (but unknown) transformation, such as making every $Z$ gate instead behave as $Z^{1.01}$. This can be represented by inserting [gates](../build/gates.ipynb) into the intended circuit.\n", "\n", "**Incoherent** errors cause [decoherence](https://en.wikipedia.org/wiki/Quantum_decoherence#Non-unitary_modelling_examples) of the quantum state, and are irreversible as a result. This is equivalent to applying an operation with some probability $0 < P < 1$, and can be represented with Cirq \"channels\". [`ops/common_channels.py`](https://github.com/quantumlib/Cirq/blob/master/cirq-core/cirq/ops/common_channels.py) defines channels for some of the most common incoherent errors, which are described below." ] diff --git a/docs/simulate/noisy_simulation.ipynb b/docs/simulate/noisy_simulation.ipynb index 2c8601b442b..5ddbffd341c 100644 --- a/docs/simulate/noisy_simulation.ipynb +++ b/docs/simulate/noisy_simulation.ipynb @@ -145,7 +145,7 @@ "id": "f1f501177e53" }, "source": [ - "To see the Kraus operators of a channel, the `cirq.kraus` protocol can be used. (See the [protocols guide](/cirq/build/protocols.ipynb).)" + "To see the Kraus operators of a channel, the `cirq.kraus` protocol can be used. (See the [protocols guide](../build/protocols.ipynb).)" ] }, { @@ -440,7 +440,7 @@ "id": "360d5a316769" }, "source": [ - "Alternatively, users can define their own channel types. Defining custom channels is similar to defining [custom gates](/cirq/build/custom_gates.ipynb).\n", + "Alternatively, users can define their own channel types. Defining custom channels is similar to defining [custom gates](../build/custom_gates.ipynb).\n", "\n", "A minimal example for defining the channel\n", "\n", @@ -985,7 +985,7 @@ "id": "640b41a79b49" }, "source": [ - "While this `NoiseModel` can be used anywhere other noise models could be used, it is particularly useful in a [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine). A QVM combines a realistic noise model and a [Device](/cirq/hardware/devices) object together and places them behind a `cirq.Engine`-style interface so that you can run circuits almost identically to how you would with a hardware device, and get results that approximate those a hardware device would produce. " + "While this `NoiseModel` can be used anywhere other noise models could be used, it is particularly useful in a [Quantum Virtual Machine](./quantum_virtual_machine.ipynb). A QVM combines a realistic noise model and a [Device](../hardware/devices.ipynb) object together and places them behind a `cirq.Engine`-style interface so that you can run circuits almost identically to how you would with a hardware device, and get results that approximate those a hardware device would produce. " ] } ], diff --git a/docs/simulate/quantum_virtual_machine.ipynb b/docs/simulate/quantum_virtual_machine.ipynb index 7c409a9cefd..1e50d5ea68c 100644 --- a/docs/simulate/quantum_virtual_machine.ipynb +++ b/docs/simulate/quantum_virtual_machine.ipynb @@ -68,9 +68,9 @@ "id": "CycSD8LM2A5G" }, "source": [ - "The quantum virtual machine is a virtual Google quantum processor that you can run circuits on by using the [virtual engine interface](/cirq/simulate/virtual_engine_interface). Behind this interface, it uses simulation with noise data to mimic Google quantum hardware processors with high accuracy: In internal tests, the virtual and actual hardware are within experimental error of each other. Additionally, it supports internal use of the high-performance [qsim](/qsim) simulator, for fast execution of larger circuits. The QVM should be used as a preparation step before running on Google hardware, and as a substitute for Google hardware when it is not available.\n", + "The quantum virtual machine is a virtual Google quantum processor that you can run circuits on by using the [virtual engine interface](./virtual_engine_interface.ipynb). Behind this interface, it uses simulation with noise data to mimic Google quantum hardware processors with high accuracy: In internal tests, the virtual and actual hardware are within experimental error of each other. Additionally, it supports internal use of the high-performance [qsim](/qsim) simulator, for fast execution of larger circuits. The QVM should be used as a preparation step before running on Google hardware, and as a substitute for Google hardware when it is not available.\n", "\n", - "If you just want to use the QVM for realistic noisy simulation, you can copy and build upon the [QVM Creation Template](/cirq/simulate/qvm_builder_code), which provides a concise and portable way to instantiate an `Engine` class that you can realistically simulate circuit runs with. After doing so, skip forward to the [How to use a QVM](#how_to_use_a_qvm) section. If you're interested in how the QVM is prepared for use, continue on to the following section." + "If you just want to use the QVM for realistic noisy simulation, you can copy and build upon the [QVM Creation Template](./qvm_builder_code.ipynb), which provides a concise and portable way to instantiate an `Engine` class that you can realistically simulate circuit runs with. After doing so, skip forward to the [How to use a QVM](#how_to_use_a_qvm) section. If you're interested in how the QVM is prepared for use, continue on to the following section." ] }, { @@ -122,7 +122,7 @@ "\n", "### Choose a processor to virtualize\n", "\n", - "Currently, the necessary data is publicly accessible only for the Weber and Rainbow processors. Read more about Google's processors [here](/hardware)." + "Currently, the necessary data is publicly accessible only for the Weber and Rainbow processors. Read more about Google's processors [here](../hardware)." ] }, { @@ -145,7 +145,7 @@ "source": [ "### Build a noisy simulator with a hardware noise model\n", "\n", - "- Load median device noise data for the processor you have chosen. Learn more about device noise data [here](/cirq/noise/representing_noise)\n", + "- Load median device noise data for the processor you have chosen. Learn more about device noise data [here](../noise/representing_noise.ipynb)\n", "- Transform the median device noise data to a Cirq noise properties object\n", "- Create a noise model using your noise properties\n", "- Set up a qsim sampler which runs noisy simulations using your noise model. Learn more about noisy simulation with qsim here in the [Noisy simulation with qsim page](/qsim/tutorials/noisy_qsimcirq)." @@ -178,8 +178,8 @@ "The qsim documentation explains how simulation performance depends on choice of hardware. If you would like use a larger number of qubits on your virtual device (eg 25-32 qubits), parallelizing the simulation over multiple compute nodes is advised. You can do this using Google Cloud hardware as is described in the [qsim Multinode Tutorial](/qsim/tutorials/multinode).\n", "\n", "### Set up the virtual engine with a virtual processor, packaging in the noisy simulator\n", - "To ensure that the workflow for using a virtual quantum processor is the same as the workflow for using a real quantum processor, a quantum virtual engine implements the same interface as the `cirq.Engine` for used Google's quantum hardware. Learn more about Google’s quantum engine in the [Quantum Virtual Engine Interface page](/cirq/simulate/virtual_engine_interface).\n", - "- Create a device object. Learn more about the device object in Cirq here in the [Devices page](/cirq/hardware/devices)\n", + "To ensure that the workflow for using a virtual quantum processor is the same as the workflow for using a real quantum processor, a quantum virtual engine implements the same interface as the `cirq.Engine` for used Google's quantum hardware. Learn more about Google’s quantum engine in the [Quantum Virtual Engine Interface page](./virtual_engine_interface.ipynb).\n", + "- Create a device object. Learn more about the device object in Cirq here in the [Devices page](../hardware/devices.ipynb)\n", "- Create a simulated processor object for the engine to consume (`SimulatedLocalProcessor`)\n", "- Create a virtual engine (`SimulatedLocalEngine`)" ] @@ -249,11 +249,11 @@ "- The circuit needs to operate on qubits available on the virtual device. \n", "- The topology of your circuit must correspond to the topology of the device (i.e., 2-qubit gates must act on adjacent qubits).\n", "\n", - "For a hands-on example of the steps necessary to prepare a circuit to be run on the QVM, see the [QVM Basic Example](/cirq/simulate/qvm_basic_example) page.\n", + "For a hands-on example of the steps necessary to prepare a circuit to be run on the QVM, see the [QVM Basic Example](./qvm_basic_example.ipynb) page.\n", "\n", "The steps necessary to make a circuit device-ready are summarized here:\n", - "1. Transform your circuit to use the correct gate set with `cirq.optimize_for_target_gateset`. Read [Transformers](/cirq/transform/transformers) for more on how to modify circuits. \n", - "2. Choose qubits on the virtual device for your circuit to run on. The connectivity required by your circuit must be supported by the connectivity present in your chosen qubit set. See [Qubit Picking](/cirq/hardware/qubit_picking) for more advice.\n", + "1. Transform your circuit to use the correct gate set with `cirq.optimize_for_target_gateset`. Read [Transformers](../transform/transformers.ipynb) for more on how to modify circuits. \n", + "2. Choose qubits on the virtual device for your circuit to run on. The connectivity required by your circuit must be supported by the connectivity present in your chosen qubit set. See [Qubit Picking](../hardware/qubit_picking.ipynb) for more advice.\n", "3. Map your transformed circuit to those qubits with `cirq.Circuit`'s `transform_qubits` function. This may require some careful planning depending on your particular circuit. \n", "\n", "You also need to decide on the number of repetitions your circuit will be used in the trajectory simulation. This number determines how accurately the quantum virtual machine will simulate the true quantum state of your circuit. For more details on this see [this paper](https://arxiv.org/abs/2111.02396){:.external}. We recommend using 10,000+ repetitions for research simulations, and 3,000 repetitions for learning simulations. If you are just getting a feel for the tools you can set the number of repetitions lower temporarily (eg 1 to 10) to speed things up.\n" diff --git a/docs/simulate/qvm_basic_example.ipynb b/docs/simulate/qvm_basic_example.ipynb index 363eba06941..19c2a954fce 100644 --- a/docs/simulate/qvm_basic_example.ipynb +++ b/docs/simulate/qvm_basic_example.ipynb @@ -68,7 +68,7 @@ "id": "cd6e59ef3edd" }, "source": [ - "This notebook walks through running a simple circuit on the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine), including the necessary constraints on a device-runnable circuit and how to satisfy them. " + "This notebook walks through running a simple circuit on the [Quantum Virtual Machine](./quantum_virtual_machine.ipynb), including the necessary constraints on a device-runnable circuit and how to satisfy them. " ] }, { @@ -123,12 +123,12 @@ "## Create a **Quantum Virtual Machine**\n", "\n", "The following cell builds a Quantum Virtual Machine that mimics a particular Google quantum hardware device (currently Rainbow or Weber) using the following customizable steps: \n", - "- Constructing a `cirq.NoiseModel` object from device calibration data saved in Cirq. See [Representing Noise](/cirq/noise/representing_noise) for more on noise models. \n", - "- Building a `qsimcirq.QsimSimulator` that uses this noise model. See [Noisy Simulation](/cirq/simulate/noisy_simulation) and [Noise simulation with qsim](/qsim/tutorials/noisy_qsimcirq) for more. \n", - "- Creating a `cirq.Device` that imposes the same constraints on circuits that the original device would. See [Devices](/cirq/hardware/devices) for more on these constraint objects. \n", + "- Constructing a `cirq.NoiseModel` object from device calibration data saved in Cirq. See [Representing Noise](../noise/representing_noise.ipynb) for more on noise models. \n", + "- Building a `qsimcirq.QsimSimulator` that uses this noise model. See [Noisy Simulation](./noisy_simulation.ipynb) and [Noise simulation with qsim](/qsim/tutorials/noisy_qsimcirq) for more. \n", + "- Creating a `cirq.Device` that imposes the same constraints on circuits that the original device would. See [Devices](../hardware/devices.ipynb) for more on these constraint objects. \n", "- Packaging the simulator and device into an object that implements the `cirq.Engine` interface that the hardware device would use. \n", "\n", - "If you don't need this level of control, you can also instantiate a QVM with `cirq_google.engine.create_default_noisy_quantum_virtual_machine`, as in [QVM Creation Template](/cirq/simulate/qvm_builder_code). " + "If you don't need this level of control, you can also instantiate a QVM with `cirq_google.engine.create_default_noisy_quantum_virtual_machine`, as in [QVM Creation Template](./qvm_builder_code.ipynb). " ] }, { @@ -231,7 +231,7 @@ "source": [ "### Transform the circuit \n", "\n", - "Before executing a circuit on (virtual) quantum hardware, the operations in the circuit need to be translated to use the types of gates the device supports. The `cirq.optimize_for_target_gateset` function does this for you, transforming the operations to use the `cirq.SqrtIswapTargetGateset`, which is supported by the Weber processor that this QVM is based on. Learn more about the gate set constraints of Google hardware at the [Hardware](/hardware) page." + "Before executing a circuit on (virtual) quantum hardware, the operations in the circuit need to be translated to use the types of gates the device supports. The `cirq.optimize_for_target_gateset` function does this for you, transforming the operations to use the `cirq.SqrtIswapTargetGateset`, which is supported by the Weber processor that this QVM is based on. Learn more about the gate set constraints of Google hardware at the [Hardware](../hardware) page." ] }, { @@ -257,7 +257,7 @@ "source": [ "### Choose qubits on the virtual device\n", "\n", - "Choose qubits on the device to execute your device ready circuit on. Look at the device map (as above) and choose a set of qubits that fit your circuit (eg a line or a block). The Rainbow and Weber devices have different topologies, some qubit maps may be possible on only one of these devices. As noted, the GHZ example circuit as constructed will fit on a 17 qubit chain of adjacent qubits on the device, so you only need to find this consecutive line of qubits. See [Qubit Picking](/cirq/hardware/qubit_picking) for more advice and methods for selecting qubits. " + "Choose qubits on the device to execute your device ready circuit on. Look at the device map (as above) and choose a set of qubits that fit your circuit (eg a line or a block). The Rainbow and Weber devices have different topologies, some qubit maps may be possible on only one of these devices. As noted, the GHZ example circuit as constructed will fit on a 17 qubit chain of adjacent qubits on the device, so you only need to find this consecutive line of qubits. See [Qubit Picking](../hardware/qubit_picking.ipynb) for more advice and methods for selecting qubits. " ] }, { @@ -341,9 +341,9 @@ "source": [ "### **Running other circuits**\n", "\n", - "In principle, you can run any custom [Circuit](/cirq/build/circuits) with a quantum virtual machine, but realistically there are some constraints. As mentioned, the circuits need to be mappable to the device. Additionally, the number of qubits that are simulatable depends highly on the hardware available to you and how long you are able to run your simulation. As the QVM is instantiated as above, with a `qsimcirq.QSimSimulator`, it only uses the default, local [qsim](https://quantumai.google/qsim) simulator. However, qsim has plenty of support for being run in a [Google Cloud instance](/qsim/tutorials/gcp_before_you_begin){:.external}, with a variable amount of compute power. In order to get the most capacity possible for qsim, use [Multinode Simulation](/qsim/tutorials/multinode).\n", + "In principle, you can run any custom [Circuit](../build/circuits.ipynb) with a quantum virtual machine, but realistically there are some constraints. As mentioned, the circuits need to be mappable to the device. Additionally, the number of qubits that are simulatable depends highly on the hardware available to you and how long you are able to run your simulation. As the QVM is instantiated as above, with a `qsimcirq.QSimSimulator`, it only uses the default, local [qsim](https://quantumai.google/qsim) simulator. However, qsim has plenty of support for being run in a [Google Cloud instance](/qsim/tutorials/gcp_before_you_begin){:.external}, with a variable amount of compute power. In order to get the most capacity possible for qsim, use [Multinode Simulation](/qsim/tutorials/multinode).\n", "\n", - "For an example of building and running a much larger circuit, see the [QVM Stabilizer Example](/cirq/simulate/qvm_stabilizer_example) tutorial. " + "For an example of building and running a much larger circuit, see the [QVM Stabilizer Example](./qvm_stabilizer_example.ipynb) tutorial. " ] }, { @@ -387,7 +387,7 @@ "source": [ "## **Visualize** Output\n", "\n", - "Finally, you can use a [state histogram](/cirq/simulate/state_histograms) to plot the measured results." + "Finally, you can use a [state histogram](./state_histograms.ipynb) to plot the measured results." ] }, { diff --git a/docs/simulate/qvm_builder_code.ipynb b/docs/simulate/qvm_builder_code.ipynb index d175376c31a..53902f5d4d7 100644 --- a/docs/simulate/qvm_builder_code.ipynb +++ b/docs/simulate/qvm_builder_code.ipynb @@ -68,7 +68,7 @@ "id": "8e6bafdbda4d" }, "source": [ - "This notebook includes a couple of clean and succinct code blocks that you can build on or copy and paste elsewhere in order to make use of the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) without worrying about how it works inside. " + "This notebook includes a couple of clean and succinct code blocks that you can build on or copy and paste elsewhere in order to make use of the [Quantum Virtual Machine](./quantum_virtual_machine.ipynb) without worrying about how it works inside. " ] }, { @@ -120,7 +120,7 @@ "source": [ "## Create a **Quantum Virtual Machine**.\n", "\n", - "Instantiate a `cirq.SimulatedLocalEngine` that uses the [Virtual Engine Interface](/cirq/simulate/virtual_engine_interface)." + "Instantiate a `cirq.SimulatedLocalEngine` that uses the [Virtual Engine Interface](./virtual_engine_interface.ipynb)." ] }, { @@ -163,7 +163,7 @@ "id": "BYxi9xpXjJdI" }, "source": [ - "To learn how to create a device ready circuit, have a look at the [QVM Circuit Preparation](/cirq/simulate/qvm_basic_example) page." + "To learn how to create a device ready circuit, have a look at the [QVM Circuit Preparation](./qvm_basic_example.ipynb) page." ] }, { diff --git a/docs/simulate/qvm_stabilizer_example.ipynb b/docs/simulate/qvm_stabilizer_example.ipynb index 13b350c59a4..3827afaca21 100644 --- a/docs/simulate/qvm_stabilizer_example.ipynb +++ b/docs/simulate/qvm_stabilizer_example.ipynb @@ -68,7 +68,7 @@ "id": "5d5f1638ebdf" }, "source": [ - "This notebook demonstrates how to use a [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) with larger, more elaborate circuits to demonstrate [stabilizer](https://en.wikipedia.org/wiki/Stabilizer_code){:.external} circuits and how they can reveal hardware errors." + "This notebook demonstrates how to use a [Quantum Virtual Machine](./quantum_virtual_machine.ipynb) with larger, more elaborate circuits to demonstrate [stabilizer](https://en.wikipedia.org/wiki/Stabilizer_code){:.external} circuits and how they can reveal hardware errors." ] }, { @@ -388,7 +388,7 @@ "id": "6XgoJWPaH5Qi" }, "source": [ - "As a final exercise on this circuit, it's possible to display a 2D heatmap of measurement results. This will show which qubits measured a $|1\\rangle$ most often; on a hardware device, this could be used to highlight the performance of specific qubits. See [Heatmaps](/cirq/noise/heatmaps) for more on visualizing error." + "As a final exercise on this circuit, it's possible to display a 2D heatmap of measurement results. This will show which qubits measured a $|1\\rangle$ most often; on a hardware device, this could be used to highlight the performance of specific qubits. See [Heatmaps](../noise/heatmaps.ipynb) for more on visualizing error." ] }, { diff --git a/docs/simulate/simulation.ipynb b/docs/simulate/simulation.ipynb index f1f6ba6afa0..a2d1ab07aa5 100644 --- a/docs/simulate/simulation.ipynb +++ b/docs/simulate/simulation.ipynb @@ -97,7 +97,7 @@ "that keeps the evolution in a pure state (i.e. a single quantum state)\n", "or a mixed state (a mix of quantum states, each with a classical\n", "probability). Noisy evolutions are supported by the pure state\n", - "simulator, as long as they preserve the purity of the state. If you are interested in truly noisy simulation that may not preserve purity, see the [Noisy Simulation](/cirq/simulate/noisy_simulation) page. \n", + "simulator, as long as they preserve the purity of the state. If you are interested in truly noisy simulation that may not preserve purity, see the [Noisy Simulation](./noisy_simulation.ipynb) page. \n", "\n", "Some external high-performance simulators also provide an interface\n", "to Cirq. These can often provide results faster than Cirq's\n", @@ -496,7 +496,7 @@ "\n", "In addition to circuit gates with fixed values, Cirq also\n", "supports gates which can have `Symbol` values (see\n", - "[Gates](/cirq/build/gates.ipynb)). These are values that can be resolved\n", + "[Gates](../build/gates.ipynb)). These are values that can be resolved\n", "at runtime. \n", "\n", "For simulators, these values are resolved by\n", @@ -570,7 +570,7 @@ "source": [ "The previous example demonstrates that assigning different values to gate parameters yields\n", "different results for each trial in the sweep, and that each trial is repeated\n", - "`repetitions` times. See [Parameter Sweeps](/cirq/simulate/params.ipynb) for more information on sweeping and parameters." + "`repetitions` times. See [Parameter Sweeps](./params.ipynb) for more information on sweeping and parameters." ] }, { diff --git a/docs/simulate/state_histograms.ipynb b/docs/simulate/state_histograms.ipynb index e6df832406b..4103e1c359b 100644 --- a/docs/simulate/state_histograms.ipynb +++ b/docs/simulate/state_histograms.ipynb @@ -29,7 +29,7 @@ }, "source": [ "# State Histograms\n", - "State Histograms are useful to visualize the output of running a quantum circuit. For details on how to create and run your own quantum circuits, please see [Cirq basics](/cirq/start/basics.ipynb)" + "State Histograms are useful to visualize the output of running a quantum circuit. For details on how to create and run your own quantum circuits, please see [Cirq basics](../start/basics.ipynb)" ] }, { diff --git a/docs/simulate/virtual_engine_interface.ipynb b/docs/simulate/virtual_engine_interface.ipynb index 81b397bae6c..6da5cb1a722 100644 --- a/docs/simulate/virtual_engine_interface.ipynb +++ b/docs/simulate/virtual_engine_interface.ipynb @@ -68,7 +68,7 @@ "id": "BCeleGCgmY4y" }, "source": [ - "Cirq provides the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine), which consists of two components: \n", + "Cirq provides the [Quantum Virtual Machine](./quantum_virtual_machine.ipynb), which consists of two components: \n", "- The Quantum Virtual Engine: A class that implements the same interface as `cirq_google.Engine`, allowing you to simulate circuits with the same software interface that the real hardware uses. \n", "- Realistic noise models that mimic the behavior of real quantum hardware.\n", "\n", @@ -110,7 +110,7 @@ "id": "zKWtgtrYZIVy" }, "source": [ - "Communication with real quantum hardware in Cirq is done through the `cirq_google.Engine` class. Each `Engine` can contain multiple quantum processors, and the `Engine` class provides functions to run circuits and manage jobs sent to those processors. The Virtual Engine in Cirq is an instance of the class `cirq_google.SimulatedLocalEngine` that runs circuits on the built-in Cirq [Simulator](/cirq/simulation) instead of on hardware, but uses the same interface as `Engine`. This is useful for testing your circuit and code pipeline before running on actual hardware, and can be used as a substitute when the real hardware is not available.\n", + "Communication with real quantum hardware in Cirq is done through the `cirq_google.Engine` class. Each `Engine` can contain multiple quantum processors, and the `Engine` class provides functions to run circuits and manage jobs sent to those processors. The Virtual Engine in Cirq is an instance of the class `cirq_google.SimulatedLocalEngine` that runs circuits on the built-in Cirq [Simulator](./simulation.ipynb) instead of on hardware, but uses the same interface as `Engine`. This is useful for testing your circuit and code pipeline before running on actual hardware, and can be used as a substitute when the real hardware is not available.\n", "\n", "The interface implemented by both `cirq_google.Engine` and `cirq_google.SimulatedLocalEngine` is called `cirq_google.AbstractEngine`, and defines the various functions and types involved with using either option. When writing functions of your own, this interface enables you to seamlessly support simulated and real-hardware versions of the `Engine` interface. " ] @@ -234,7 +234,7 @@ "id": "FtCpP5evY2Ss" }, "source": [ - "You can also run [Parameter Sweeps](/cirq/simulate/params) with the `run_sweep` function, which returns a `cirq.Job`-type object instead of a `Result`. This way, jobs can be prepared and run asynchronously. When running a parameter sweep over many parameter options, or with particularly large circuits, it can be useful to set the job running and return for the results later, with the ability to check job execution status in between. " + "You can also run [Parameter Sweeps](./params.ipynb) with the `run_sweep` function, which returns a `cirq.Job`-type object instead of a `Result`. This way, jobs can be prepared and run asynchronously. When running a parameter sweep over many parameter options, or with particularly large circuits, it can be useful to set the job running and return for the results later, with the ability to check job execution status in between. " ] }, { @@ -461,7 +461,7 @@ "\n", "Cirq provides the `cirq.SimulatedLocalEngine`. which allows you to run circuits on the Cirq Simulator through the same interface as the `cirq.Engine` object, which is used for running on real quantum hardware. This is useful both as a preparation step before running on real quantum hardware, and as a substitute when real hardware is unavailable.\n", "\n", - "As presented in this page, the virtual Engine is completely noiseless. In order to learn about using the virtual Engine with noise models, including realistic noise models which closely mimic actual hardware, see the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) page. " + "As presented in this page, the virtual Engine is completely noiseless. In order to learn about using the virtual Engine with noise models, including realistic noise models which closely mimic actual hardware, see the [Quantum Virtual Machine](./quantum_virtual_machine.ipynb) page. " ] } ], diff --git a/docs/start/basics.ipynb b/docs/start/basics.ipynb index 46c96f4ecb0..234a938f697 100644 --- a/docs/start/basics.ipynb +++ b/docs/start/basics.ipynb @@ -72,7 +72,7 @@ "\n", "This tutorial isn’t a quantum computing 101 tutorial: it assumes familiarity of quantum computing at about the level of the textbook “Quantum Computation and Quantum Information” by Nielsen and Chuang.\n", "\n", - "For more in-depth examples of quantum algorithms and experiments, see [Experiments](/cirq/experiments)." + "For more in-depth examples of quantum algorithms and experiments, see [Experiments](../experiments)." ] }, { @@ -81,7 +81,7 @@ "id": "1dOjJlgrNUuz" }, "source": [ - "To begin, please follow the instructions for [installing Cirq](/cirq/start/install)." + "To begin, please follow the instructions for [installing Cirq](./install.md)." ] }, { @@ -156,7 +156,7 @@ "id": "4zE6AutyQhQ6" }, "source": [ - "There are also pre-packaged sets of qubits called [Devices](/cirq/hardware/devices). These are qubits along with a set of rules for how they can be used. A `cirq.Device` can be used to ensure that two-qubit gates are only applied to qubits that are adjacent in the hardware, and other constraints. The following example will use the `cirq_google.Sycamore` device that comes with cirq. It is a diamond-shaped grid with 54 qubits that mimics early hardware released by Google." + "There are also pre-packaged sets of qubits called [Devices](../hardware/devices.ipynb). These are qubits along with a set of rules for how they can be used. A `cirq.Device` can be used to ensure that two-qubit gates are only applied to qubits that are adjacent in the hardware, and other constraints. The following example will use the `cirq_google.Sycamore` device that comes with cirq. It is a diamond-shaped grid with 54 qubits that mimics early hardware released by Google." ] }, { @@ -185,7 +185,7 @@ "\n", "For instance, `cirq.H` is the quantum [Hadamard](https://en.wikipedia.org/wiki/Quantum_logic_gate#Hadamard_(H)_gate) and is a `Gate` object. `cirq.H(cirq.LineQubit(1))` is an `Operation` object and is the Hadamard gate applied to a specific qubit (line qubit number 1).\n", "\n", - "Many textbook gates are included within cirq. `cirq.X`, `cirq.Y`, and `cirq.Z` refer to the single-qubit Pauli gates. `cirq.CZ`, `cirq.CNOT`, `cirq.SWAP` are a few of the common two-qubit gates. `cirq.measure` is a macro to apply a `MeasurementGate` to a set of qubits. You can find more, as well as instructions on how to create your own custom gates, on the [Gates documentation](/cirq/build/gates) page.\n", + "Many textbook gates are included within cirq. `cirq.X`, `cirq.Y`, and `cirq.Z` refer to the single-qubit Pauli gates. `cirq.CZ`, `cirq.CNOT`, `cirq.SWAP` are a few of the common two-qubit gates. `cirq.measure` is a macro to apply a `MeasurementGate` to a set of qubits. You can find more, as well as instructions on how to create your own custom gates, on the [Gates documentation](../build/gates.ipynb) page.\n", "\n", "Here are some examples of operations that can be performed on gates and operations:" ] @@ -330,7 +330,7 @@ "id": "3FC9bdlXmShh" }, "source": [ - "Sometimes, you may not want Cirq to automatically shift operations all the way to the left. To construct a circuit without doing this, you can create the circuit moment-by-moment or use a different `InsertStrategy`, explained more in the [Circuit documentation](/cirq/build/circuits.ipynb)." + "Sometimes, you may not want Cirq to automatically shift operations all the way to the left. To construct a circuit without doing this, you can create the circuit moment-by-moment or use a different `InsertStrategy`, explained more in the [Circuit documentation](../build/circuits.ipynb)." ] }, { @@ -353,7 +353,7 @@ "source": [ "### Circuits and devices\n", "\n", - "One important consideration when using real quantum devices is that there are often constraints on circuits that are able to be run on the hardware. `Device` objects specify these constraints and can be used to validate your circuit to make sure that it contains no illegal operations. For more information on what constraints `Device` objects can specify and how to use them, see the [Devices](/cirq/hardware/devices) page.\n", + "One important consideration when using real quantum devices is that there are often constraints on circuits that are able to be run on the hardware. `Device` objects specify these constraints and can be used to validate your circuit to make sure that it contains no illegal operations. For more information on what constraints `Device` objects can specify and how to use them, see the [Devices](../hardware/devices.ipynb) page.\n", "\n", "The following example demonstrates this with the Sycamore Device:" ] @@ -445,15 +445,15 @@ "source": [ "### Virtual Machine Simulation\n", "\n", - "Cirq also provides the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine), which is a simulated virtual version of quantum hardware devices. It consists of two primary components: \n", - "1. A [virtual Engine interface](/cirq/simulate/virtual_engine_interface) that enables you to verify and run circuits with the same interface that quantum hardware would have.\n", - "2. A set of [noise models](/cirq/noise/representing_noise) that try to realistically replicate the noise present in actual Google quantum hardware devices.\n", + "Cirq also provides the [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb), which is a simulated virtual version of quantum hardware devices. It consists of two primary components: \n", + "1. A [virtual Engine interface](../simulate/virtual_engine_interface.ipynb) that enables you to verify and run circuits with the same interface that quantum hardware would have.\n", + "2. A set of [noise models](../noise/representing_noise.ipynb) that try to realistically replicate the noise present in actual Google quantum hardware devices.\n", "\n", "The QVM is intended to serve as a replacement for the Google quantum hardware, in two cases: \n", "1. Running your circuit on a QVM can give an approximation of how your circuit runs under the influence of hardware-like noise. This can be useful to help you reconfigure or change your circuit to be less impacted by noise when run on actual quantum hardware.\n", "2. During the preparation process before running your circuit(s) on hardware, you can seamlessly use a QVM to test that your workflow or pipeline works before eventually switching to the nearly-identical hardware interface.\n", "\n", - "Read more about the QVM and its uses in the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) page, or just start using it with the [QVM Creation Template](/cirq/simulate/qvm_builder_code) page." + "Read more about the QVM and its uses in the [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb) page, or just start using it with the [QVM Creation Template](../simulate/qvm_builder_code.ipynb) page." ] }, { @@ -513,7 +513,7 @@ "id": "ef90dabdd52e" }, "source": [ - "A histogram over the states that were actually observed can often be more useful when analyzing results. To learn more about the available options for creating result histograms, see the [State Histograms](/cirq/simulate/state_histograms) page. " + "A histogram over the states that were actually observed can often be more useful when analyzing results. To learn more about the available options for creating result histograms, see the [State Histograms](../simulate/state_histograms.ipynb) page. " ] }, { @@ -578,7 +578,7 @@ "source": [ "## Unitary matrices and decompositions\n", "\n", - "Many quantum operations have unitary matrix representations. This matrix can be accessed by applying `cirq.unitary(operation)` to that `operation`. This can be applied to gates, operations, and circuits that support this protocol and will return the unitary matrix that represents the object. See [Protocols](/cirq/build/protocols) for more about this and other protocols." + "Many quantum operations have unitary matrix representations. This matrix can be accessed by applying `cirq.unitary(operation)` to that `operation`. This can be applied to gates, operations, and circuits that support this protocol and will return the unitary matrix that represents the object. See [Protocols](../build/protocols.ipynb) for more about this and other protocols." ] }, { @@ -688,7 +688,7 @@ "id": "xRfQqzdx7lUI" }, "source": [ - "Other transformers can assist in transforming a circuit into operations that are native operations on specific hardware devices. You can find more about transformers and how to create your own in [Transformers](/cirq/transform/transformers)." + "Other transformers can assist in transforming a circuit into operations that are native operations on specific hardware devices. You can find more about transformers and how to create your own in [Transformers](../transform/transformers.ipynb)." ] }, { @@ -703,10 +703,10 @@ "\n", "There is much more to learn and try out for those who are interested:\n", "\n", - "* Learn about the variety of [Gates](/cirq/build/gates) available in cirq and more about the different ways to construct [Circuits](/cirq/build/circuits).\n", - "* Learn more about [Simulations](/cirq/simulate/simulation) and how it works.\n", - "* Learn about [Noise](/cirq/noise) and how to utilize multi-level systems using [Qudits](/cirq/build/qudits).\n", - "* Dive into some [Experiments](/cirq/experiments) and some in-depth tutorials of how to use cirq.\n", + "* Learn about the variety of [Gates](../build/gates.ipynb) available in cirq and more about the different ways to construct [Circuits](../build/circuits.ipynb).\n", + "* Learn more about [Simulations](../simulate/simulation.ipynb) and how it works.\n", + "* Learn about [Noise](../noise) and how to utilize multi-level systems using [Qudits](../build/qudits.ipynb).\n", + "* Dive into some [Experiments](../experiments) and some in-depth tutorials of how to use cirq.\n", "\n", "Also, join our [cirq-announce mailing list](https://groups.google.com/forum/#!forum/cirq-announce) to hear about changes and releases or go to the [Cirq GitHub repository](https://github.com/quantumlib/Cirq/) to file issues." ] diff --git a/docs/start/best_practices.md b/docs/start/best_practices.md index 134c5b23531..314ca18727e 100644 --- a/docs/start/best_practices.md +++ b/docs/start/best_practices.md @@ -74,7 +74,7 @@ the user's "permission". run variants of circuits. When not possible, try using `run_batch`. Using these methods gives the hardware service the most opportunity to optimize the execution of circuits and can result in much faster execution. - Read more details on the [Parameter Sweeps](/cirq/simulate/params) page. + Read more details on the [Parameter Sweeps](../simulate/params.ipynb) page. * Consider defining and allocating qubits at the beginning of your code or function, then applying gates and circuits to those qubits. While not required, this style can produce cleaner code. diff --git a/docs/start/install.md b/docs/start/install.md index 86790354969..9e7ad27135d 100644 --- a/docs/start/install.md +++ b/docs/start/install.md @@ -6,7 +6,7 @@ Choose your operating system: - [Installing on Mac OS X](#installing-on-mac-os-x) - [Installing on Windows](#installing-on-windows) -If you want to create a development environment, see the [development page](/cirq/dev/development). +If you want to create a development environment, see the [development page](../dev/development.md). --- diff --git a/docs/start/intro.ipynb b/docs/start/intro.ipynb index a21935d2296..6929b08fce3 100644 --- a/docs/start/intro.ipynb +++ b/docs/start/intro.ipynb @@ -2605,7 +2605,7 @@ "source": [ "# Quantum Virtual Machine\n", "\n", - "Cirq provides the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) as a way to run circuits using the same interface that quantum hardware uses and get results that approximate those the hardware would produce. It combines [Devices](/cirq/hardware/devices), [Noisy Simulation](/cirq/simulate/noisy_simulation), realistic [Noise Models](/cirq/noise/representing_noise) and a [Virtual Engine Interface](/cirq/simulate/virtual_engine_interface) to produce a `cirq.SimulatedLocalEngine` that you can treat almost interchangeably with hardware devices. See the [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine) page to learn more about how it works, or jump to the [QVM Creation Template](/cirq/simulate/qvm_builder_code) notebook to just start using it. " + "Cirq provides the [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb) as a way to run circuits using the same interface that quantum hardware uses and get results that approximate those the hardware would produce. It combines [Devices](../hardware/devices.ipynb), [Noisy Simulation](../simulate/noisy_simulation.ipynb), realistic [Noise Models](../noise/representing_noise.ipynb) and a [Virtual Engine Interface](../simulate/virtual_engine_interface.ipynb) to produce a `cirq.SimulatedLocalEngine` that you can treat almost interchangeably with hardware devices. See the [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb) page to learn more about how it works, or jump to the [QVM Creation Template](../simulate/qvm_builder_code.ipynb) notebook to just start using it. " ] }, { diff --git a/docs/start/start.ipynb b/docs/start/start.ipynb index f42f124ffb4..fb53f6b8689 100644 --- a/docs/start/start.ipynb +++ b/docs/start/start.ipynb @@ -112,20 +112,20 @@ "# Congratulations\n", "You've just run your first Cirq program. \n", "\n", - "To learn about running a circuit on a virtual machine that mimics existing quantum hardware, see [Quantum Virtual Machine](/cirq/simulate/quantum_virtual_machine).\n", + "To learn about running a circuit on a virtual machine that mimics existing quantum hardware, see [Quantum Virtual Machine](../simulate/quantum_virtual_machine.ipynb).\n", "\n", "If you would like to learn more about quantum computing, check out our [education page](/education). The Full API reference for Cirq can be found [here](/reference/python/cirq). If you are looking for vendor specific information that can be found on our vendor sub-pages:\n", "\n", "\n", - " [Alpine Quantum Technologies](/cirq/hardware/aqt/getting_started.ipynb)\n", + " [Alpine Quantum Technologies](../hardware/aqt/getting_started.ipynb)\n", " \n", - " [Pasqal](/cirq/hardware/pasqal/getting_started.ipynb)\n", + " [Pasqal](../hardware/pasqal/getting_started.ipynb)\n", " \n", - " [IonQ](/cirq/hardware/ionq/getting_started.ipynb)\n", + " [IonQ](../hardware/ionq/getting_started.ipynb)\n", " \n", - " [Azure](/cirq/hardware/azure-quantum/getting_started_honeywell.ipynb)\n", + " [Azure](../hardware/azure-quantum/getting_started_honeywell.ipynb)\n", " \n", - " [Rigetti](/cirq/hardware/rigetti/getting_started.ipynb)" + " [Rigetti](../hardware/rigetti/getting_started.ipynb)" ] } ], diff --git a/docs/transform/custom_transformers.ipynb b/docs/transform/custom_transformers.ipynb index bfc7cf1067c..b69e87ba259 100644 --- a/docs/transform/custom_transformers.ipynb +++ b/docs/transform/custom_transformers.ipynb @@ -60,7 +60,7 @@ "id": "6d36e471ec63" }, "source": [ - "The [Transformers](/cirq/transform/transformers) page introduced what a transformer is, what transformers are available in Cirq, and how to create a simple one as a composite of others. This page covers the details necessary for creating more nuanced custom transformers, including `cirq.TransformerContext`, primitives and decompositions." + "The [Transformers](./transformers.ipynb) page introduced what a transformer is, what transformers are available in Cirq, and how to create a simple one as a composite of others. This page covers the details necessary for creating more nuanced custom transformers, including `cirq.TransformerContext`, primitives and decompositions." ] }, { diff --git a/docs/transform/transformers.ipynb b/docs/transform/transformers.ipynb index 6449bc89b63..d61f243e412 100644 --- a/docs/transform/transformers.ipynb +++ b/docs/transform/transformers.ipynb @@ -96,7 +96,7 @@ "- Circuit Optimizations: Perform hardware specific optimizations, like merging and replacing connected components of 1 and 2 operations with more efficient rewrite operations, commuting Z gates through the circuit, aligning gates in moments and more.\n", "\n", "\n", - "Cirq provides many out-of-the-box transformers which can be used as individual compilation passes. It also supplies a general framework for users to create their own transformers, by using powerful primitives and by bundling existing transformers together, to enable the compilation of circuits for specific targets. This page covers the available transformers in Cirq, how to use them, and how to write a simple transformer. The [Custom Transformers](/cirq/transform/transformers) page presents the details on creating more complex custom transformers through primitives and composition." + "Cirq provides many out-of-the-box transformers which can be used as individual compilation passes. It also supplies a general framework for users to create their own transformers, by using powerful primitives and by bundling existing transformers together, to enable the compilation of circuits for specific targets. This page covers the available transformers in Cirq, how to use them, and how to write a simple transformer. The [Custom Transformers](./transformers.ipynb) page presents the details on creating more complex custom transformers through primitives and composition." ] }, { diff --git a/docs/tutorials/google/colab.ipynb b/docs/tutorials/google/colab.ipynb index 4a8a63aa18f..770f180c698 100644 --- a/docs/tutorials/google/colab.ipynb +++ b/docs/tutorials/google/colab.ipynb @@ -142,8 +142,8 @@ "\n", "### More Documentation Links\n", "\n", - "* [Quantum Engine concepts](/cirq/google/concepts.md)\n", - "* [Quantum Engine documentation](/cirq/google/engine.md)\n", + "* [Quantum Engine concepts](../../google/concepts.ipynb)\n", + "* [Quantum Engine documentation](../../google/engine.md)\n", "* [Cirq documentation](https://quantumai.google/cirq)\n", "* [Colab documentation](https://colab.research.google.com/notebooks/welcome.ipynb)\n" ] diff --git a/docs/tutorials/google/identifying_hardware_changes.ipynb b/docs/tutorials/google/identifying_hardware_changes.ipynb index ef7df5258df..54c14845934 100644 --- a/docs/tutorials/google/identifying_hardware_changes.ipynb +++ b/docs/tutorials/google/identifying_hardware_changes.ipynb @@ -70,12 +70,12 @@ "id": "2KEoj85SkMQ0" }, "source": [ - "You've run your circuit with Google's [Quantum Computing Service](/cirq/tutorials/google/start) and you're getting results that unexpectedly differ from those you saw when you ran your experiment last week. What's the cause of this and what can you do about it? \n", + "You've run your circuit with Google's [Quantum Computing Service](./start.ipynb) and you're getting results that unexpectedly differ from those you saw when you ran your experiment last week. What's the cause of this and what can you do about it? \n", "\n", - "Your experience may be due to changes in the device that have occurred since the most recent maintenance [Calibration](/cirq/noise/calibration_faq#what_is_the_difference_between_the_user-triggered_calibrations_floquet_or_xeb_and_the_maintenance_calibration). Every few days, the QCS devices are calibrated for the highest performance across all of their available qubits and operations. However, in the hours or days since the most recent maintenance calibration, the performance of the device hardware may have changed significantly, affecting your circuit's results. \n", + "Your experience may be due to changes in the device that have occurred since the most recent maintenance [Calibration](../../noise/calibration_faq.md#what_is_the_difference_between_the_user-triggered_calibrations_floquet_or_xeb_and_the_maintenance_calibration). Every few days, the QCS devices are calibrated for the highest performance across all of their available qubits and operations. However, in the hours or days since the most recent maintenance calibration, the performance of the device hardware may have changed significantly, affecting your circuit's results. \n", "\n", "The rest of this tutorial will describe these hardware changes, demonstrate how to collect error metrics for identifying if changes have occurred, and provide some examples of how you can compare your metric results to select the most performant qubits for your circuit. \n", - "For more further reading on qubit picking methodology, see the [Best Practices](/cirq/google/best_practices.ipynb) guide and [Qubit Picking with Loschmidt Echoes](/cirq/tutorials/google/echoes.ipynb) tutorial. The method presented in the Loschmidt Echoes tutorial is an alternative way to identify hardware changes." + "For more further reading on qubit picking methodology, see the [Best Practices](../../google/best_practices.ipynb) guide and [Qubit Picking with Loschmidt Echoes](./echoes.ipynb) tutorial. The method presented in the Loschmidt Echoes tutorial is an alternative way to identify hardware changes." ] }, { @@ -103,12 +103,12 @@ "source": [ "## Qubit Error Metrics\n", "\n", - "There are many [Calibration Metrics](/cirq/google/calibration.md#individual-metrics) available to measure gate and readout error rates and see if they have changed. The [Visualizing Calibration Metrics](/cirq/tutorials/google/visualizing_calibration_metrics.ipynb) tutorial demonstrates how to collect and visualize each of these available metrics. You can apply the comparison methods presented in this tutorial to any such metric, but the examples below focus on the two following metrics:\n", + "There are many [Calibration Metrics](../../google/calibration.md#individual-metrics) available to measure gate and readout error rates and see if they have changed. The [Visualizing Calibration Metrics](./visualizing_calibration_metrics.ipynb) tutorial demonstrates how to collect and visualize each of these available metrics. You can apply the comparison methods presented in this tutorial to any such metric, but the examples below focus on the two following metrics:\n", "\n", - "* [`two_qubit_parallel_sqrt_iswap_gate_xeb_pauli_error_per_cycle`](/cirq/google/calibration.md#): This metric captures the estimated probability for the quantum state on two neighboring qubits to depolarize (as if a Pauli gate was applied to either or both qubits) after applying an $\\sqrt{i\\mathrm{SWAP}}$ gate. This metric includes some coherent error like the error introduced by control hardware. This metric is computed using [Cross Entropy Benchmarking (XEB)](/cirq/noise/qcvv/xeb_theory.ipynb) during maintenance calibration and in this tutorial.\n", - "* [`parallel_p11_error`](/cirq/google/calibration.md#): This metric estimates the probability for a readout register to correctly measure a $|1\\rangle$ state on a qubit that was prepared to be in the $|1\\rangle$ state. The Simultaneous Readout experiment used to collect this metric evaluates all of the qubits in parallel/simultaneously.\n", + "* [`two_qubit_parallel_sqrt_iswap_gate_xeb_pauli_error_per_cycle`](../../google/calibration.md): This metric captures the estimated probability for the quantum state on two neighboring qubits to depolarize (as if a Pauli gate was applied to either or both qubits) after applying an $\\sqrt{i\\mathrm{SWAP}}$ gate. This metric includes some coherent error like the error introduced by control hardware. This metric is computed using [Cross Entropy Benchmarking (XEB)](../../noise/qcvv/xeb_theory.ipynb) during maintenance calibration and in this tutorial.\n", + "* [`parallel_p11_error`](../../google/calibration.md): This metric estimates the probability for a readout register to correctly measure a $|1\\rangle$ state on a qubit that was prepared to be in the $|1\\rangle$ state. The Simultaneous Readout experiment used to collect this metric evaluates all of the qubits in parallel/simultaneously.\n", "\n", - "Note: The two-qubit metric uses Pauli error, which has two other multiplicatively-related variants: [Average error and Incoherent error](/cirq/google/calibration.md#average-pauli-and-incoherent-error).\n" + "Note: The two-qubit metric uses Pauli error, which has two other multiplicatively-related variants: [Average error and Incoherent error](../../google/calibration.md#average-pauli-and-incoherent-error).\n" ] }, { @@ -380,7 +380,7 @@ "source": [ "### Current Two-Qubit Metric Data with XEB\n", "\n", - "This section is a shortened version of the [Parallel XEB](/cirq/noise/qcvv/parallel_xeb.ipynb) tutorial, which runs characterization experiments to collect data for the `two_qubit_parallel_sqrt_iswap_gate_xeb_pauli_error_per_cycle` metric. First, generate a library of two qubit circuits using the $\\sqrt{i\\mathrm{SWAP}}$ gate . These circuits will be run in parallel in larger circuits according to `combinations_by_layer`. " + "This section is a shortened version of the [Parallel XEB](../../noise/qcvv/parallel_xeb.ipynb) tutorial, which runs characterization experiments to collect data for the `two_qubit_parallel_sqrt_iswap_gate_xeb_pauli_error_per_cycle` metric. First, generate a library of two qubit circuits using the $\\sqrt{i\\mathrm{SWAP}}$ gate . These circuits will be run in parallel in larger circuits according to `combinations_by_layer`. " ] }, { @@ -479,7 +479,7 @@ "id": "9sY5bMW9f-Oo" }, "source": [ - "Note: The parallel XEB errors are scaled in pxeb_results. This is because the collected fidelities are the estimated depolarization fidelities, not the Pauli error metrics available from the calibration data. See the [XEB Theory](/cirq/noise/qcvv/xeb_theory.ipynb#fidelities) tutorial for an explanation why, and [Calibration Metrics](/cirq/google/calibration.md) for more information on the difference between these values. " + "Note: The parallel XEB errors are scaled in pxeb_results. This is because the collected fidelities are the estimated depolarization fidelities, not the Pauli error metrics available from the calibration data. See the [XEB Theory](../../noise/qcvv/xeb_theory.ipynb#fidelities) tutorial for an explanation why, and [Calibration Metrics](../../google/calibration.md) for more information on the difference between these values. " ] }, { @@ -720,10 +720,10 @@ "\n", "You've selected better candidate qubits for your circuit, based on updated information about the device. What else can you do for further improvements? \n", "\n", - "* You need to map your actual circuit's logical qubits to your selected hardware qubits. This is in general a difficult problem, and the best solution can depend on the specific structure of the circuit to be run. Take a look at the [Qubit Picking with Loschmidt Echoes](/cirq/tutorials/google/echoes.ipynb) tutorial, which estimates the error rates of gates for your specific circuit. Also, consider [Best Practices#qubit picking](/cirq/google/best_practices#qubit_picking) for additional advice on this.\n", - "* The [Optimization, Alignment, and Spin Echoes](/cirq/tutorials/google/spin_echoes.ipynb) tutorial provides resources on how you can improve the reliability of your circuit by: optimizing away redundant or low-impact gates, aligning gates into moments with others of the same type, and preventing decay on idle qubits with by adding spin echoes. \n", - "* Other than for qubit picking, you should also use calibration for error compensation. The [Coherent vs incoherent noise with XEB](/cirq/noise/qcvv/coherent_vs_incoherent_xeb.ipynb), [XEB Calibration Example](/cirq/noise/qcvv/xeb_calibration_example.ipynb), [Parallel XEB](/cirq/noise/qcvv/parallel_xeb.ipynb) and [Isolated XEB](/cirq/noise/qcvv/isolated_xeb.ipynb) tutorials demonstrate how to run a classical optimizer on collected two-qubit gate characterization data, identity the true unitary matrix implemented by each gate, and add [Virtual Pauli Z gates](/cirq/hardware/devices) to compensate for the identified error, improving the reliability of your circuit.\n", - "* You are also free to use the characterization data to improve the performance of large batches of experiment circuits. In this case you'd want to prepare your characterization ahead of running all your circuits, and use the data to compensate each circuit, right before running them. See [Calibration FAQ](/cirq/noise/calibration_faq.md#i-have-many-circuits-to-calibrate-how-do-i-speed-it-up) for more information. " + "* You need to map your actual circuit's logical qubits to your selected hardware qubits. This is in general a difficult problem, and the best solution can depend on the specific structure of the circuit to be run. Take a look at the [Qubit Picking with Loschmidt Echoes](./echoes.ipynb) tutorial, which estimates the error rates of gates for your specific circuit. Also, consider [Best Practices#qubit picking](../../google/best_practices.ipynb#qubit_picking) for additional advice on this.\n", + "* The [Optimization, Alignment, and Spin Echoes](./spin_echoes.ipynb) tutorial provides resources on how you can improve the reliability of your circuit by: optimizing away redundant or low-impact gates, aligning gates into moments with others of the same type, and preventing decay on idle qubits with by adding spin echoes. \n", + "* Other than for qubit picking, you should also use calibration for error compensation. The [Coherent vs incoherent noise with XEB](../../noise/qcvv/coherent_vs_incoherent_xeb.ipynb), [XEB Calibration Example](../../noise/qcvv/xeb_calibration_example.ipynb), [Parallel XEB](../../noise/qcvv/parallel_xeb.ipynb) and [Isolated XEB](../../noise/qcvv/isolated_xeb.ipynb) tutorials demonstrate how to run a classical optimizer on collected two-qubit gate characterization data, identity the true unitary matrix implemented by each gate, and add [Virtual Pauli Z gates](../../hardware/devices.ipynb) to compensate for the identified error, improving the reliability of your circuit.\n", + "* You are also free to use the characterization data to improve the performance of large batches of experiment circuits. In this case you'd want to prepare your characterization ahead of running all your circuits, and use the data to compensate each circuit, right before running them. See [Calibration FAQ](../../noise/calibration_faq.md#i-have-many-circuits-to-calibrate-how-do-i-speed-it-up) for more information. " ] } ], diff --git a/docs/tutorials/google/start.ipynb b/docs/tutorials/google/start.ipynb index f363e729f99..ef5277d4edb 100644 --- a/docs/tutorials/google/start.ipynb +++ b/docs/tutorials/google/start.ipynb @@ -171,7 +171,7 @@ }, "source": [ "## Create a circuit\n", - "Now that you've enabled Quantum Computing Service and configured the notebook, let's create a basic program with Cirq. After reviewing the code, **run this block** to run a circuit, and print a circuit diagram and results. To learn more, refer to the [Cirq overview](https://quantumai.google/cirq) and [Cirq basics](/cirq/start/basics.ipynb) pages." + "Now that you've enabled Quantum Computing Service and configured the notebook, let's create a basic program with Cirq. After reviewing the code, **run this block** to run a circuit, and print a circuit diagram and results. To learn more, refer to the [Cirq overview](https://quantumai.google/cirq) and [Cirq basics](../../start/basics.ipynb) pages." ] }, { @@ -229,7 +229,7 @@ }, "source": [ "## Run on quantum hardware\n", - "Approved users can access quantum hardware in two modes. First, all approved users have access to a processor in \"open-swim\" which is a first-in-first-out queue with fairness algorithm that balances jobs across users in the queue. Secondly, processors can be reserved in hourly blocks if the user is approved. You can learn more about the reservation system on the [concepts page](/cirq/google/concepts.ipynb). We'll use the processor `pacific` in this demo." + "Approved users can access quantum hardware in two modes. First, all approved users have access to a processor in \"open-swim\" which is a first-in-first-out queue with fairness algorithm that balances jobs across users in the queue. Secondly, processors can be reserved in hourly blocks if the user is approved. You can learn more about the reservation system on the [concepts page](../../google/concepts.ipynb). We'll use the processor `pacific` in this demo." ] }, { @@ -285,7 +285,7 @@ "source": [ "Note that the qubit that we used for the simulation above, `(0, 0)`, does not exist on the hardware. Since the grid of available qubits may change over time, we'll programatically select a valid qubit by inspecting `device.qubits`. We then use the `transform_qubits()` method to remap the circuit onto that qubit.\n", "\n", - "In order to run on hardware, we must also ensure that the circuit only contains gates that the hardware supports. The basic gates used here are always available, so this circuit can be run without any further changes, but in general you may need to apply additional transformations before running arbitrary circuits. See the [best practices](/cirq/google/best_practices.ipynb) guide for more information about running circuits on hardware." + "In order to run on hardware, we must also ensure that the circuit only contains gates that the hardware supports. The basic gates used here are always available, so this circuit can be run without any further changes, but in general you may need to apply additional transformations before running arbitrary circuits. See the [best practices](../../google/best_practices.ipynb) guide for more information about running circuits on hardware." ] }, { @@ -354,7 +354,7 @@ "\n", "### Setup Cirq\n", "\n", - "Follow the [Cirq Install](/cirq/start/install.md) page to install Cirq locally. We highly recommend that you setup a virtual environment for this installation to isolate your development stack from your overall system installations. Make sure to setup the virtual environment for Python 3 and not Python 2.\n", + "Follow the [Cirq Install](../../start/install.md) page to install Cirq locally. We highly recommend that you setup a virtual environment for this installation to isolate your development stack from your overall system installations. Make sure to setup the virtual environment for Python 3 and not Python 2.\n", "\n", "### Setup Google Cloud authentication\n", "\n", @@ -458,7 +458,7 @@ "source": [ "## Next steps\n", "* Use [this template colab](colab.ipynb) as a base for your own explorations.\n", - "* Explore [best practices](/cirq/google/best_practices.ipynb) for getting circuits to run on hardware.\n" + "* Explore [best practices](../../google/best_practices.ipynb) for getting circuits to run on hardware.\n" ] } ], diff --git a/docs/tutorials/google/visualizing_calibration_metrics.ipynb b/docs/tutorials/google/visualizing_calibration_metrics.ipynb index e5d488f2a6d..337d160c205 100644 --- a/docs/tutorials/google/visualizing_calibration_metrics.ipynb +++ b/docs/tutorials/google/visualizing_calibration_metrics.ipynb @@ -37,7 +37,7 @@ }, "source": [ "# Calibrations\n", - "The [guide on calibration](/cirq/google/calibration) gives an introduction to calibration metrics and how to retrieve them from the Google Quantum Computing Service (QCS). In this tutorial, we show how to visualize these calibration metrics via single qubit heatmaps, two qubit interaction heatmaps and integrated histograms.\n", + "The [guide on calibration](../../google/calibration.md) gives an introduction to calibration metrics and how to retrieve them from the Google Quantum Computing Service (QCS). In this tutorial, we show how to visualize these calibration metrics via single qubit heatmaps, two qubit interaction heatmaps and integrated histograms.\n", "\n", "**Disclaimer:** The calibration metrics of the quantum processor shown in the tutorial do not correspond to actual production metrics." ] @@ -211,7 +211,7 @@ "source": [ "# Metrics\n", "\n", - "For a complete description of all the available calibration metrics, please see [Calibration metrics](/cirq/google/calibration)" + "For a complete description of all the available calibration metrics, please see [Calibration metrics](../../google/calibration.md)" ] }, { diff --git a/release.md b/release.md index bc58b373a77..27a59402d22 100644 --- a/release.md +++ b/release.md @@ -62,7 +62,7 @@ Master will always use the next unreleased minor version with the suffix of ".dev". When a release is performed, the ".dev" will be removed and tagged in a release branch with a version tag (vX.X.X). Then, master will be updated to the next minor version. This can always be found in the -[version file](cirq/_version.py). +[version file](./cirq-core/cirq/_version.py). ### Release Schedule Releases are made on an as-needed basis determined by Cirq maintainers. All Cirq