Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8c3da1e
first pass at quick start page
abbycross Oct 7, 2025
f0126ce
change to code in markdown
abbycross Oct 8, 2025
42cf423
redundant
abbycross Oct 8, 2025
ecd74f4
Merge branch 'main' of https://github.com/Qiskit/documentation into a…
abbycross Oct 8, 2025
a284eff
put overview first
abbycross Oct 8, 2025
582cfd2
link to quickstart from intro page
abbycross Oct 8, 2025
baf1b78
add venv and python twisties
abbycross Oct 8, 2025
9c625f3
update to use preset_pass_manager
abbycross Oct 8, 2025
391c75c
tox -e fix
abbycross Oct 8, 2025
9580b2d
it's actually nine lines
abbycross Oct 8, 2025
28fb093
clarify python and venv info
abbycross Oct 9, 2025
1bf7191
reword
abbycross Oct 9, 2025
16a1733
simplify
abbycross Oct 9, 2025
83b75d2
tox -e fix
abbycross Oct 9, 2025
3e3048d
wording tweak
abbycross Oct 9, 2025
3ba2a49
more tweak
abbycross Oct 9, 2025
25e7de8
bullets to add spacing
abbycross Oct 9, 2025
c98a458
don't need aer or viz
abbycross Oct 15, 2025
0776f8d
actually yes we need viz
abbycross Oct 15, 2025
edee7e0
update code
abbycross Oct 15, 2025
bbddec3
extra parens
abbycross Oct 15, 2025
a027cfa
Add numbers
abbycross Oct 15, 2025
b0bd173
tweaks
abbycross Oct 15, 2025
4edbbf1
Apply suggestions from code review
abbycross Oct 16, 2025
029bc71
It's a word!
abbycross Oct 16, 2025
33f3902
Merge branch 'main' into ajc/quick-start
abbycross Oct 16, 2025
c310ab6
start to add auth instructions
abbycross Oct 16, 2025
9a83be9
first draft of install/auth for hello world
abbycross Oct 16, 2025
99d72c0
Bring in Kaelyn's examples
abbycross Oct 17, 2025
3ec54a9
cap Matplotlib
abbycross Oct 17, 2025
571e298
protect your API key
abbycross Oct 17, 2025
5fd92f9
Leron feedback
abbycross Oct 17, 2025
d60fd6a
leron feedback
abbycross Oct 17, 2025
0d24ad9
Merge branch 'main' into ajc/quick-start
abbycross Oct 20, 2025
c231f7f
Need to point to "find access cred"
abbycross Oct 20, 2025
7605f3c
tweak
abbycross Oct 20, 2025
19e9541
Merge branch 'main' into ajc/quick-start
abbycross Oct 22, 2025
510e8ab
Next iteration of edits to Hello world
abbycross Oct 22, 2025
0617a70
./fix
abbycross Oct 22, 2025
0fb0d34
Merge branch 'main' into ajc/quick-start
abbycross Oct 22, 2025
5b6f98a
Merge branch 'main' into ajc/quick-start
abbycross Oct 24, 2025
e16c344
Add to the Next steps
abbycross Oct 24, 2025
c002cbf
Move intro pph below install instructions
abbycross Oct 24, 2025
20b4a72
tox -e fix
abbycross Oct 24, 2025
f0a11fc
meh I didn't like it
abbycross Oct 24, 2025
9a44e44
feedback from the team
abbycross Oct 24, 2025
7b8d4e8
point to beginning of the course
abbycross Oct 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/guides/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
"title": "Introduction to Qiskit",
"url": "/docs/guides"
},
{
"title": "Quickstart",
"url": "/docs/guides/quick-start"
},
{
"title": "Install",
"children": [
Expand Down
1 change: 1 addition & 0 deletions docs/guides/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,5 +139,6 @@ You can find a catalog of projects in the [Qiskit ecosystem page](https://qiskit
## Next steps

<Admonition type="tip" title="Recommendations">
- Build your first circuit with the [Quickstart](/docs/guides/quick-start) guide.
- [Install the Qiskit SDK and Qiskit Runtime](/docs/guides/install-qiskit).
</Admonition>
263 changes: 263 additions & 0 deletions docs/guides/quick-start.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "2e2023d1",
"metadata": {},
"source": [
"# Quickstart"
]
},
{
"cell_type": "markdown",
"id": "a82fbaaa",
"metadata": {
"tags": [
"version-info"
]
},
"source": []
},
{
"cell_type": "markdown",
"id": "7bbbdb4b",
"metadata": {
"jp-MarkdownHeadingCollapsed": true
},
"source": [
"Build your first quantum circuit in under two minutes, on your local environment - no sign-in or API key necessary.\n",
"\n",
"<Admonition type=\"note\" title=\"New to Python and virtual environments?\">\n",
"\n",
"* Download Python and use a virtual environment with Qiskit (recommended).\n",
"\n",
"<details>\n",
"<summary>Click to expand for more information about **Python**.</summary>\n",
"\n",
"- To install Python, first check the \"Programming Language\" section on the [Qiskit PyPI project page](https://pypi.org/project/qiskit/) to determine which Python versions are supported by the most recent release. For download instructions, see the [Python Beginners Guide.](https://wiki.python.org/moin/BeginnersGuide/Download)\n",
"\n",
"<Admonition type = \"note\">\n",
"These instructions use the standard Python distribution from [pypi.org](https://pypi.org/). However, you can use other Python distributions, such as [Anaconda](https://docs.anaconda.com/anaconda/) or [miniconda](https://docs.anaconda.com/miniconda/), along with other dependency management workflows like [Poetry](https://python-poetry.org/docs/).\n",
"</Admonition>\n",
"</details>\n",
"\n",
" <details>\n",
" <summary>\n",
" Click to expand for more information on **virtual environments**.\n",
" </summary>\n",
" - Use [Python virtual environments](https://docs.python.org/3.10/tutorial/venv.html) to separate Qiskit from other applications.\n",
" A Python virtual environment is an isolated space to work with Python for a specific purpose — so you can install whatever packages you wish, and set up libraries, dependencies, and so on, without affecting the \"base\" Python environment on your machine.\n",
"\n",
" One important advantage of a virtual environment is that if your Python environment becomes corrupted somewhere along the way, you can easily delete the virtual environment and start over!\n",
"\n",
" Choose a preferred location in which to store information about your virtual environments. Typically they're stored in a directory named `.venv` within each project directory you're working in.\n",
"\n",
" To work in your virtual environment, navigate to your project directory and create a minimal environment with only Python installed in it.\n",
"\n",
" <OperatingSystemTabs>\n",
" <TabItem value=\"mac\" label=\"macOS\">\n",
" ```shell\n",
" python3 -m venv .venv\n",
" ```\n",
" </TabItem>\n",
"\n",
" <TabItem value=\"linux\" label=\"Linux\">\n",
" ```shell\n",
" python3 -m venv .venv\n",
" ```\n",
" </TabItem>\n",
"\n",
" <TabItem value=\"win\" label=\"Windows\">\n",
" ```text\n",
" python -m venv .venv\n",
" ```\n",
" </TabItem>\n",
" </OperatingSystemTabs>\n",
"\n",
" Next, activate your new environment.\n",
"\n",
" <OperatingSystemTabs>\n",
" <TabItem value=\"mac\" label=\"macOS\">\n",
" ```shell\n",
" source .venv/bin/activate\n",
" ```\n",
" </TabItem>\n",
"\n",
" <TabItem value=\"linux\" label=\"Linux\">\n",
" ```shell\n",
" source .venv/bin/activate\n",
" ```\n",
" </TabItem>\n",
"\n",
" <TabItem value=\"win\" label=\"Windows\">\n",
" If using PowerShell:\n",
"\n",
" ```text\n",
" .venv\\Scripts\\Activate.ps1\n",
" ```\n",
" If using Git Bash:\n",
"\n",
" ```text\n",
" source .venv/scripts/activate\n",
" ```\n",
" If using command prompt:\n",
"\n",
" ```text\n",
" .venv\\Scripts\\activate\n",
" ```\n",
" </TabItem>\n",
" </OperatingSystemTabs>\n",
" </details>\n",
"\n",
"</Admonition>\n",
"\n",
"\n",
"## 1. Install Qiskit\n",
"\n",
"Run the following command in your terminal to install the Qiskit and Matplotlib packages, as well as the Qiskit visualization module.\n",
"\n",
"```shell\n",
"pip install qiskit matplotlib qiskit[visualization]\n",
"\n",
"# On a zsh terminal, use this line instead:\n",
"# pip install qiskit matplotlib 'qiskit[visualization]'\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "c8da788c",
"metadata": {},
"source": [
"## 2. Build your circuit\n",
"\n",
"Open a Python environment, then run this code, which builds a Bell state (two entangled qubits)."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "86784142",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'00': 505, '11': 519}\n"
]
}
],
"source": [
"from qiskit import QuantumCircuit\n",
"from qiskit.primitives import StatevectorSampler\n",
"\n",
"qc = QuantumCircuit(2)\n",
"qc.h(0)\n",
"qc.cx(0, 1)\n",
"qc.measure_all()\n",
"\n",
"sampler = StatevectorSampler()\n",
"result = sampler.run([qc], shots=1024).result()\n",
"print(result[0].data.meas.get_counts())"
]
},
{
"cell_type": "markdown",
"id": "9a3180c2-56d7-4224-91fa-13d8cb87d93d",
"metadata": {},
"source": [
"The expected output is a near-even split between '00' and '11'."
]
},
{
"cell_type": "markdown",
"id": "a110ac90",
"metadata": {},
"source": [
"## 3. Visualize your results\n",
"\n",
"To get a histogram of your results, add the following code to your program."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dc4ff012",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<Image src=\"/docs/images/guides/quick-start/extracted-outputs/dc4ff012-0.avif\" alt=\"Output of the previous code cell\" />"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from qiskit.visualization import plot_histogram\n",
"\n",
"counts = result[0].data.meas.get_counts()\n",
"plot_histogram(counts)\n",
"\n",
"# Include the next line if you are not using Python in a Jupyter notebook\n",
"# plt.show()"
]
},
{
"cell_type": "markdown",
"id": "738d4fc4-29c9-46ab-9879-3365e2149d04",
"metadata": {},
"source": [
"This result is a signature of quantum entanglement.\n",
"\n",
"## 4. See what happens\n",
"\n",
"Try changing the code to see how it affects the results. For example:\n",
"\n",
"- Add a third qubit by changing to `QuantumCircuit(3)`, and add a second CX gate with `qc.cx(1,2)`. The measurements should then change to 000 and 111, which means all three of these qubits have been entangled.\n",
"\n",
"- See your results shift by adding `qc.x(1)` to the end of the circuit."
]
},
{
"cell_type": "markdown",
"id": "b6062a16",
"metadata": {},
"source": [
"## Next steps\n",
"\n",
"<Admonition type=\"tip\" title=\"Recommendations\">\n",
"- Run a circuit on real quantum hardware in the [Hello world](/docs/tutorials/hello-world) tutorial.\n",
"- Not ready to run on hardware? Start your quantum journey with the [Basics of quantum information](/learning/courses/basics-of-quantum-information) course.\n",
"</Admonition>"
]
}
],
"metadata": {
"description": "Build and visualize a quantum circuit in under two minutes, no sign-in or API key necessary.",
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3"
},
"title": "Quickstart"
},
"nbformat": 4,
"nbformat_minor": 5
}
13 changes: 8 additions & 5 deletions docs/guides/save-credentials.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@ If you are working in a trusted Python environment (such as on a personal laptop
1. Ensure that you have an [IBM Cloud account.](https://quantum.cloud.ibm.com/registration)
1. Ensure you are working in an active Python environment with the [Qiskit SDK and Qiskit Runtime installed](/docs/guides/install-qiskit#local).
1. Activate the Python virtual environment and run Python in your virtual environment.
1. Find your access credentials.
1. Log in to [IBM Quantum Platform](https://quantum.cloud.ibm.com) with an IBMid or Google account.
1. Make sure that the correct account and region are selected in the account switcher in the header.
1. Find your API key. From the [dashboard](https://quantum.cloud.ibm.com/), create your API key, then copy it to a secure location so you can use it for authentication. Note that you can use the same API key to connect to any region.
1. Optional: Find the instance you want to use from the [Instances](https://quantum.cloud.ibm.com/instances) page. Hover over its CRN, click the icon to copy it, then save it in a secure location so you can use it to identify the instance.
1. Log in to [IBM Quantum Platform](https://quantum.cloud.ibm.com) with an IBMid or Google account.

<span id="find-credentials"></span>
## Find your access credentials

1. Make sure that the correct account and region are selected in the account switcher in the header.
1. Find your API key. From the [dashboard](https://quantum.cloud.ibm.com/), create your API key, then copy it to a secure location so you can use it for authentication. Note that you can use the same API key to connect to any region.
1. Optional: Find the instance you want to use from the [Instances](https://quantum.cloud.ibm.com/instances) page. Hover over its CRN, click the icon to copy it, then save it in a secure location so you can use it to identify the instance.

<span id="cloud-save"></span>
## Save your access credentials
Expand Down
55 changes: 48 additions & 7 deletions docs/tutorials/hello-world.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,51 @@
"id": "7b65f7e0",
"metadata": {},
"source": [
"## Before you begin\n",
"## Install and authenticate\n",
"\n",
"Follow the [Install and set up](/docs/guides/install-qiskit) instructions if you haven't already, including the steps to [Set up to use IBM Cloud&reg;.](/docs/guides/cloud-setup)\n",
"1. If you have not already installed Qiskit, find instructions in the [Quickstart](/docs/guides/quick-start) guide.\n",
"\n",
"The code examples found in the IBM Quantum&reg; Platform documentation were developed by using [Jupyter](https://jupyter.org/install) notebooks. To follow along with the examples, it is recommended that you set up an environment to run Jupyter notebooks [locally](/docs/guides/install-qiskit#local-jupyter) or [online.](/docs/guides/online-lab-environments) Be sure to install the recommended extra visualization support (`'qiskit[visualization]'`). You'll also need the `matplotlib` package for the second part of this example.\n",
" - Install Qiskit Runtime to run jobs on quantum hardware:\n",
"\n",
"To learn about quantum computing in general, visit the [Basics of quantum information course](/learning/courses/basics-of-quantum-information) in IBM Quantum Learning.\n",
" ```bash\n",
" pip install qiskit-ibm-runtime\n",
" ```\n",
"\n",
"IBM&reg; is committed to the responsible development of quantum computing. Learn more about responsible quantum at IBM and review our responsible quantum principles in the [Responsible quantum computing and inclusive tech](/docs/responsible-quantum-computing) topic."
" - Set up an environment to run Jupyter notebooks locally:\n",
"\n",
" ```bash\n",
" pip install jupyter\n",
" ```\n",
"\n",
"2. Set up your authentication for access to quantum hardware through the free [Open Plan](/docs/guides/plans-overview#open-plan).\n",
"\n",
" (If you were emailed an invitation to join an account, follow the [steps for invited users](/docs/guides/cloud-setup-invited) instead.)\n",
"\n",
" - Go to [IBM Quantum Platform](https://quantum.cloud.ibm.com/) to log in or create an account.\n",
" - Generate your API key (also called an *API token*) on the [dashboard](https://quantum.cloud.ibm.com/), then copy it to a secure location.\n",
" - Go to the [Instances](https://quantum.cloud.ibm.com/instances) page and find the instance you want to use. Hover over its CRN and click to copy it.\n",
"\n",
" - Save your credentials locally with this code:\n",
"\n",
" ```python\n",
" from qiskit_ibm_runtime import QiskitRuntimeService\n",
"\n",
" QiskitRuntimeService.save_account(\n",
" token=\"<your-api-key>\", # Use the 44-character API_KEY you created and saved from the IBM Quantum Platform Home dashboard\n",
" instance=\"<CRN>\", # Optional\n",
" )\n",
" ```\n",
"\n",
"3. Now you can use this Python code any time you want to authenticate to the Qiskit Runtime Service:\n",
" ```python\n",
" from qiskit_ibm_runtime import QiskitRuntimeService\n",
"\n",
" # Run every time you need the service\n",
" service = QiskitRuntimeService()\n",
" ```\n",
"<Admonition type=\"info\" title=\"Not using a trusted Python environment?\">\n",
"If you are using a public computer or other unsecured environment, follow the [manual authentication instructions](/docs/guides/cloud-setup-untrusted) instead to keep your authentication credentials safe.\n",
"</Admonition>"
]
},
{
Expand Down Expand Up @@ -659,8 +695,13 @@
"## Next steps\n",
"\n",
"<Admonition type=\"tip\" title=\"Recommendations\">\n",
" - Learn how to [build circuits](/docs/guides/map-problem-to-circuits) in more detail.\n",
" - Try the [Ground-state energy estimation of the Heisenberg chain with VQE](/docs/tutorials/spin-chain-vqe) tutorial.\n",
" - Try one of these tutorials:\n",
" - [Ground-state energy estimation of the Heisenberg chain with VQE](/docs/tutorials/spin-chain-vqe)\n",
" - Solve optimization problems using [QAOA](/docs/tutorials/quantum-approximate-optimization-algorithm)\n",
" - Train [quantum kernel](/docs/tutorials/quantum-kernel-training) models for machine learning tasks\n",
" - Find detailed installation instructions in the [Install Qiskit](/docs/guides/install-qiskit) guide.\n",
" - If you prefer not to install Qiskit locally, read about options to use Qiskit in an [online development environment.](/docs/guides/online-lab-environments)\n",
" - To save multiple account credentials or to specify other account options, see detailed instructions in the [Save your login credentials](/docs/guides/save-credentials#save-your-access-credentials) guide.\n",
"</Admonition>"
]
}
Expand Down
Binary file not shown.
3 changes: 3 additions & 0 deletions qiskit_bot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,9 @@ notifications:
- "@pandasa123"
- "@johannesgreiner"
- "@Henri-ColibrITD"
"docs/guides/quick-start":
- "@abbycross"
- "@beckykd"
"docs/guides/qiskit-addons-sqd":
- "@kaelynj"
"docs/guides/qiskit-addons-sqd-get-started":
Expand Down
1 change: 1 addition & 0 deletions scripts/config/notebook-testing.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ test-strategies.ci = {}
test-strategies.extended = {}
test-strategies.hardware = { patch="qiskit-ibm-runtime-open" }
notebooks = [
"docs/guides/quick-start.ipynb",
"docs/guides/build-noise-models.ipynb",
"docs/guides/circuit-library.ipynb",
"docs/guides/classical-feedforward-and-control-flow.ipynb",
Expand Down