diff --git a/docs/start.ipynb b/docs/start.ipynb new file mode 100644 index 00000000000..3a71b18851f --- /dev/null +++ b/docs/start.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "gXXhctqjgXO7" + }, + "source": [ + "##### Copyright 2022 The Cirq Developers" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "cellView": "form", + "id": "z2RJVa8qgXou" + }, + "outputs": [], + "source": [ + "#@title Licensed under the Apache License, Version 2.0 (the \"License\");\n", + "# you may not use this file except in compliance with the License.\n", + "# You may obtain a copy of the License at\n", + "#\n", + "# https://www.apache.org/licenses/LICENSE-2.0\n", + "#\n", + "# Unless required by applicable law or agreed to in writing, software\n", + "# distributed under the License is distributed on an \"AS IS\" BASIS,\n", + "# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", + "# See the License for the specific language governing permissions and\n", + "# limitations under the License." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "EQvWLKKRgZR9" + }, + "source": [ + "# Hello Qubit" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "EvZ_JecKga2p" + }, + "source": [ + "\n", + " \n", + " \n", + " \n", + " \n", + "
\n", + " View on QuantumAI\n", + " \n", + " Run in Google Colab\n", + " \n", + " View source on GitHub\n", + " \n", + " Download notebook\n", + "
" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "bd9529db1c0b" + }, + "outputs": [], + "source": [ + "try:\n", + " import cirq\n", + "except ImportError:\n", + " print(\"installing cirq...\")\n", + " !pip install --quiet cirq\n", + " import cirq\n", + " print(\"installed cirq.\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "n4GQUN8MS7vt" + }, + "outputs": [], + "source": [ + "# Pick a qubit.\n", + "qubit = cirq.GridQubit(0, 0)\n", + "\n", + "# Create a circuit\n", + "circuit = cirq.Circuit(\n", + " cirq.X(qubit)**0.5, # Square root of NOT.\n", + " cirq.measure(qubit, key='m') # Measurement.\n", + ")\n", + "print(\"Circuit:\")\n", + "print(circuit)\n", + "\n", + "# Simulate the circuit several times.\n", + "simulator = cirq.Simulator()\n", + "result = simulator.run(circuit, repetitions=20)\n", + "print(\"Results:\")\n", + "print(result)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "shNBShuQTFuu" + }, + "source": [ + "# Congratulations\n", + "You've just run your first Cirq program. If you would like to learn more about Quantum Computing, check out our [education page](/education). You can find more in depth tutorials [here](tutorials). 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", + " [Google Quantum Computing Service](tutorials/google/start.ipynb)\n", + " \n", + " [Alpine Quantum Technologies](tutorials/aqt/getting_started.ipynb)\n", + " \n", + " [Pasqal](tutorials/pasqal/getting_started.ipynb)\n", + " \n", + " [IonQ](tutorials/ionq/getting_started.ipynb)\n", + " \n", + " [Azure](tutorials/azure-quantum/getting_started_honeywell.ipynb)\n", + " \n", + " [Rigetti](tutorials/rigetti/getting_started.ipynb)" + ] + } + ], + "metadata": { + "colab": { + "name": "start.ipynb", + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/docs/start.md b/docs/start.md deleted file mode 100644 index d3d7a63944d..00000000000 --- a/docs/start.md +++ /dev/null @@ -1,54 +0,0 @@ -# Hello Qubit - -A simple example to get you up and running: - -```python - import cirq - - # Pick a qubit. - qubit = cirq.GridQubit(0, 0) - - # Create a circuit - circuit = cirq.Circuit( - cirq.X(qubit)**0.5, # Square root of NOT. - cirq.measure(qubit, key='m') # Measurement. - ) - print("Circuit:") - print(circuit) - - # Simulate the circuit several times. - simulator = cirq.Simulator() - result = simulator.run(circuit, repetitions=20) - print("Results:") - print(result) -``` - -Example output: - -``` - Circuit: - (0, 0): ───X^0.5───M('m')─── - Results: - m=11000111111011001000 -``` - -# Learn more about quantum computing - -In case you would like to learn more about Quantum Computing, check out our [education page](/education). - -# Hardware vs simulation - -There are two main ways of running quantum algorithms using Cirq: - - [Simulation](simulation.ipynb) is available on any computer. - - Quantum processors are provided by different Quantum Service Providers: - - [Google Quantum Computing Service](tutorials/google/start.ipynb) - - [Alpine Quantum Technologies](tutorials/aqt/getting_started.ipynb) - - [Pasqal](tutorials/pasqal/getting_started.ipynb) - - [IonQ](tutorials/ionq/getting_started.ipynb) - -# Next steps - -- Learn about the [Basics](tutorials/basics.ipynb) of Cirq, like the Circuit, Qubit and Simulator classes and how to use them. -- Explore all the numerous [Tutorials and examples](tutorials). -- Check out the [API docs](/reference/python/cirq). -- Learn more about the Cirq concepts in-depth in our guides.