Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions docs/guides/colibritd-pde.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,29 @@
"id": "2f87f5f0",
"metadata": {},
"source": [
"# QUICK-PDE: A Qiskit Function by ColibriTD\n",
"\n",
"<Admonition type=\"note\">\n",
" Qiskit Functions are an experimental feature available to IBM Quantum&reg; Premium Plan, Flex Plan, and On-Prem (via IBM Quantum Platform API) Plan users. They are in preview release status and subject to change.\n",
"</Admonition>"
"# QUICK-PDE: A Qiskit Function by ColibriTD"
]
},
{
"cell_type": "markdown",
"id": "3a01cc47",
"id": "b9852687",
"metadata": {
"tags": [
"tags": [
"version-info"
]
},
"source": []
},
{
"cell_type": "markdown",
"id": "01701579",
"metadata": {},
"source": [
"<Admonition type=\"note\">\n",
" Qiskit Functions are an experimental feature available to IBM Quantum&reg; Premium Plan, Flex Plan, and On-Prem (via IBM Quantum Platform API) Plan users. They are in preview release status and subject to change.\n",
"</Admonition>"
]
},
{
"cell_type": "markdown",
"id": "dde95705",
Expand Down Expand Up @@ -65,7 +71,7 @@
"\n",
"The arguments for CFD's differential equations are on a fixed grid, as follows:\n",
"\n",
"> $t$ is between 0 and 0.95 with 30 sample points. $x$ is between 0 and 0.95 with a step size of 0.2375.\n",
"- $t$ is between 0 and 0.95 with 30 sample points. $x$ is between 0 and 0.95 with a step size of 0.2375.\n",
"\n",
"### Material Deformation\n",
"\n",
Expand All @@ -81,7 +87,7 @@
"\n",
"The arguments for MD's differential equations are on a fixed grid, as follows:\n",
"\n",
"> $x$ is between 0 and 1 with a step size of 0.04."
"- $x$ is between 0 and 1 with a step size of 0.04."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/get-started-with-primitives.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"\n",
"\n",
"<Admonition type=\"note\">\n",
"* While this documentation uses the primitives from Qiskit Runtime, which allow you to use IBM&reg; backends, the primitives can be run on any provider by using the [backend primitives](#backend) instead. Additionally, you can use the *reference* primitives to run on a local statevector simulator. See [Exact simulation with Qiskit primitives](/docs/guides/simulate-with-qiskit-sdk-primitives) for details.\n",
"While this documentation uses the primitives from Qiskit Runtime, which allow you to use IBM&reg; backends, the primitives can be run on any provider by using the [backend primitives](#backend) instead. Additionally, you can use the *reference* primitives to run on a local statevector simulator. See [Exact simulation with Qiskit primitives](/docs/guides/simulate-with-qiskit-sdk-primitives) for details.\n",
"</Admonition>"
]
},
Expand Down
6 changes: 3 additions & 3 deletions docs/guides/qpu-information.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ To access the details page, select [Compute resources](https://quantum.cloud.ibm
<span id="native-gates-on-platform"></span>
* **Basis gates** - Each [processor family](/docs/guides/processor-types) has a native gate set. By default, the QPUs in each family only support running the gates and operations in the native gate set. Thus, every gate in the circuit must be translated (by the transpiler) to the elements of this set. To find the native gates (also called basis gates) for a QPU, select its name on the [Compute resources](https://quantum.cloud.ibm.com/computers) page. Note that the non-unitary operations are not listed here; use the [method in Qiskit](/docs/guides/get-qpu-information#native-gates-with-qiskit) to see all native gates and operations for a QPU. See a list of all native gates in [this table](#native-gates).

* **Version** - The version number of a QPU in the form `major.minor.revision`. See [QPU versioning](#qpu-versioning) for details on how this number is assigned.
* **Version** - The version number of a QPU in the form `major.minor.revision`. See [QPU versioning](#qpu-versioning) for details on how this number is assigned.

* **Calibration data** - Download the calibration data as a CSV file or click the arrow to display the Topology diagram, Individual qubit readout graph, or the Calibration data table. You can customize the data that is shown, depending on the view you have open. For example, on the Topology diagram, you can choose the data you want to see for connections and qubits. The colored bars associated with the diagram or graph indicate the range that is shown, with the average value marked. The color maximum and minimum change depending on the QPU.
* **Calibration data** - Download the calibration data as a CSV file or click the arrow to display the Topology diagram, Individual qubit readout graph, or the Calibration data table. You can customize the data that is shown, depending on the view you have open. For example, on the Topology diagram, you can choose the data you want to see for connections and qubits. The colored bars associated with the diagram or graph indicate the range that is shown, with the average value marked. The color maximum and minimum change depending on the QPU.

* <span id="coupling-map">**Topology diagram** or **coupling map** </span> - A diagram that indicates the pairs of qubits that support two-qubit gate operations between them. This is also called the coupling map or connectivity. Qubits are represented as circles and the supported two-qubit gate operations are displayed as lines connecting the qubits.
* <span id="coupling-map">**Topology diagram** or **coupling map** </span> - A diagram that indicates the pairs of qubits that support two-qubit gate operations between them. This is also called the coupling map or connectivity. Qubits are represented as circles and the supported two-qubit gate operations are displayed as lines connecting the qubits.
* **Individual qubit properties** - Shows the selected property for each qubit on the QPU. You can view properties such as:
- **T1 (Relaxation Time)**: The T1 time represents the average duration a qubit remains in its excited state $|1\rangle$ before decaying to its ground state $|0\rangle$ due to energy relaxation. This parameter is used to characterize the qubit's energy relaxation behavior, and is expressed in units of seconds (s).
- **T2 (Dephasing Time)**: The T2 time denotes the timescale over which a qubit maintains phase coherence of a superposition between the $|0\rangle$ and $|1\rangle$ states. It accounts for both energy relaxation and pure dephasing processes, providing insight into the qubit's coherence properties.
Expand Down
9 changes: 5 additions & 4 deletions docs/migration-guides/qiskit-1.0-installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,11 @@ When you're done with a virtual environment, you can simply delete its directory

When running `import qiskit`, you might see an error such as:

> ImportError: Qiskit is installed in an invalid environment that has both Qiskit 1.0+ and an earlier version.
> You should create a new virtual environment, and ensure that you do not mix dependencies between Qiskit pre-1.0 and post-1.0.
> Any packages that depend on 'qiskit-terra' are not compatible with Qiskit 1.0 and will need to be updated.
> Qiskit unfortunately cannot enforce this requirement during environment resolution.
ImportError: Qiskit is installed in an invalid environment that has both Qiskit 1.0+ and an earlier version.
You should create a new virtual environment, and ensure that you do not mix dependencies between Qiskit pre-1.0 and post-1.0.
Any packages that depend on 'qiskit-terra' are not compatible with Qiskit 1.0 and will need to be updated.
Qiskit unfortunately cannot enforce this requirement during environment resolution.


<Admonition type="tip">
You might have run a completely valid `pip install` command, following all the recommendations in this guide, and still see this error message.
Expand Down
77 changes: 40 additions & 37 deletions docs/tutorials/quantum-approximate-optimization-algorithm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -208,43 +208,46 @@
"H_C=\\sum_{ij}Q_{ij}Z_iZ_j + \\sum_i b_iZ_i.\n",
"$$\n",
"\n",
"> **Reformulation steps from the QAOA problem to the Hamiltonian**\n",
"\n",
"> To demonstrate how the QAOA problem can be rewritten in this way, first replace the binary variables $x_i$ to a new set of variables $z_i\\in\\{-1, 1\\}$ via\n",
">\n",
"> $$\n",
"> x_i = \\frac{1-z_i}{2}.\n",
"> $$\n",
">\n",
"> Here you can see that if $x_i$ is $0$, then $z_i$ must be $1$. When the $x_i$'s are substituted for the $z_i$'s in the optimization problem ($x^TQx$), an equivalent formulation can be obtained.\n",
">\n",
"> $$\n",
"> x^TQx=\\sum_{ij}Q_{ij}x_ix_j \\\\ =\\frac{1}{4}\\sum_{ij}Q_{ij}(1-z_i)(1-z_j) \\\\=\\frac{1}{4}\\sum_{ij}Q_{ij}z_iz_j-\\frac{1}{4}\\sum_{ij}(Q_{ij}+Q_{ji})z_i + \\frac{n^2}{4}.\n",
"> $$\n",
">\n",
"> Now if we define $b_i=-\\sum_{j}(Q_{ij}+Q_{ji})$, remove the prefactor, and the constant $n^2$ term, we arrive at the two equivalent formulations of the same optimization problem.\n",
">\n",
"> $$\n",
"> \\min_{x\\in\\{0,1\\}^n} x^TQx\\Longleftrightarrow \\min_{z\\in\\{-1,1\\}^n}z^TQz + b^Tz\n",
"> $$\n",
">\n",
"> Here, $b$ depends on $Q$. Note that to obtain $z^TQz + b^Tz$ we dropped the factor of 1/4 and a constant offset of $n^2$ which do not play a role in the optimization.\n",
">\n",
">\n",
"> Now, to obtain a quantum formulation of the problem, promote the $z_i$ variables to a Pauli $Z$ matrix, such as a $2\\times 2$ matrix of the form\n",
">\n",
"> $$\n",
"> Z_i = \\begin{pmatrix}1 & 0 \\\\ 0 & -1\\end{pmatrix}.\n",
"> $$\n",
">\n",
"> When you substitute these matrices in the optimization problem above, you obtain the following Hamiltonian\n",
">\n",
"> $$\n",
"> H_C=\\sum_{ij}Q_{ij}Z_iZ_j + \\sum_i b_iZ_i.\n",
"> $$\n",
">\n",
"> *Also recall that the $Z$ matrices are embedded in the quantum computer's computational space, that is, a Hilbert space of size $2^n\\times 2^n$. Therefore, you should understand terms such as $Z_iZ_j$ as the tensor product $Z_i\\otimes Z_j$ embedded in the $2^n\\times 2^n$ Hilbert space. For example, in a problem with five decision variables the term $Z_1Z_3$ is understood to mean $I\\otimes Z_3\\otimes I\\otimes Z_1\\otimes I$ where $I$ is the $2\\times 2$ identity matrix.*\n",
"<details>\n",
"<summary>\n",
"**Reformulation steps from the QAOA problem to the Hamiltonian**\n",
"</summary>\n",
"\n",
"To demonstrate how the QAOA problem can be rewritten in this way, first replace the binary variables $x_i$ to a new set of variables $z_i\\in\\{-1, 1\\}$ via\n",
"\n",
"$$\n",
"x_i = \\frac{1-z_i}{2}.\n",
"$$\n",
"\n",
"Here you can see that if $x_i$ is $0$, then $z_i$ must be $1$. When the $x_i$'s are substituted for the $z_i$'s in the optimization problem ($x^TQx$), an equivalent formulation can be obtained.\n",
"\n",
"$$\n",
"x^TQx=\\sum_{ij}Q_{ij}x_ix_j \\\\ =\\frac{1}{4}\\sum_{ij}Q_{ij}(1-z_i)(1-z_j) \\\\=\\frac{1}{4}\\sum_{ij}Q_{ij}z_iz_j-\\frac{1}{4}\\sum_{ij}(Q_{ij}+Q_{ji})z_i + \\frac{n^2}{4}.\n",
"$$\n",
"\n",
"Now if we define $b_i=-\\sum_{j}(Q_{ij}+Q_{ji})$, remove the prefactor, and the constant $n^2$ term, we arrive at the two equivalent formulations of the same optimization problem.\n",
"\n",
"$$\n",
"\\min_{x\\in\\{0,1\\}^n} x^TQx\\Longleftrightarrow \\min_{z\\in\\{-1,1\\}^n}z^TQz + b^Tz\n",
"$$\n",
"\n",
"Here, $b$ depends on $Q$. Note that to obtain $z^TQz + b^Tz$ we dropped the factor of 1/4 and a constant offset of $n^2$ which do not play a role in the optimization.\n",
"\n",
"\n",
"Now, to obtain a quantum formulation of the problem, promote the $z_i$ variables to a Pauli $Z$ matrix, such as a $2\\times 2$ matrix of the form\n",
"\n",
"$$\n",
"Z_i = \\begin{pmatrix}1 & 0 \\\\ 0 & -1\\end{pmatrix}.\n",
"$$\n",
"\n",
"When you substitute these matrices in the optimization problem above, you obtain the following Hamiltonian\n",
"\n",
"$$\n",
"H_C=\\sum_{ij}Q_{ij}Z_iZ_j + \\sum_i b_iZ_i.\n",
"$$\n",
"\n",
"*Also recall that the $Z$ matrices are embedded in the quantum computer's computational space, that is, a Hilbert space of size $2^n\\times 2^n$. Therefore, you should understand terms such as $Z_iZ_j$ as the tensor product $Z_i\\otimes Z_j$ embedded in the $2^n\\times 2^n$ Hilbert space. For example, in a problem with five decision variables the term $Z_1Z_3$ is understood to mean $I\\otimes Z_3\\otimes I\\otimes Z_1\\otimes I$ where $I$ is the $2\\times 2$ identity matrix.*\n",
"</details>\n",
"\n",
"This Hamiltonian is called the **cost function Hamiltonian**. It has the property that its ground state corresponds to the solution that **minimizes the cost function $f(x)$**.\n",
"Therefore, to solve your optimization problem you now need to prepare the ground state of $H_C$ (or a state with a high overlap with it) on the quantum computer. Then, sampling from this state will, with a high probability, yield the solution to $min~f(x)$."
Expand Down Expand Up @@ -827,7 +830,7 @@
"id": "2e2a89de-cef3-46ea-b201-cf931b65dfea",
"metadata": {},
"source": [
"## Part II. scale it up!\n",
"## Part II. Scale it up!\n",
"\n",
"You have access to many devices with over 100 qubits on IBM Quantum&reg; Platform. Select one on which to solve Max-Cut on a 100-node weighted graph. This is a \"utility-scale\" problem. The steps to build the workflow are followed the same as above, but with a much larger graph."
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,8 +590,10 @@
"\n",
"For example, suppose that $\\mathsf{X}$ and $\\mathsf{Y}$ are bits, and consider an operation with the following description.\n",
"\n",
"> If $\\mathsf{X} = 1,$ then perform a NOT operation on $\\mathsf{Y}.$\\\n",
"> Otherwise do nothing.\n",
"<Figure title=\"Operation\">\n",
"If $\\mathsf{X} = 1,$ then perform a NOT operation on $\\mathsf{Y}.$\\\n",
"Otherwise do nothing.\n",
"</Figure>\n",
"\n",
"This is a deterministic operation known as a *controlled-NOT* operation, where $\\mathsf{X}$ is the *control* bit that determines whether or not a NOT operation should be applied to the *target* bit $\\mathsf{Y}.$\n",
"Here is the matrix representation of this operation:\n",
Expand Down Expand Up @@ -640,10 +642,12 @@
"\n",
"Another example is the operation having this description:\n",
"\n",
"> Perform one of the following two operations, each with probability $1/2:$\n",
">\n",
"> 1. Set $\\mathsf{Y}$ to be equal to $\\mathsf{X}.$\n",
"> 2. Set $\\mathsf{X}$ to be equal to $\\mathsf{Y}.$\n",
"<Figure title=\"Operation\">\n",
"Perform one of the following two operations, each with probability $1/2:$\n",
"\n",
"1. Set $\\mathsf{Y}$ to be equal to $\\mathsf{X}.$\n",
"2. Set $\\mathsf{X}$ to be equal to $\\mathsf{Y}.$\n",
"</Figure>\n",
"\n",
"The matrix representation of this operation is as follows:\n",
"\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,13 @@
"\n",
"The *no-cloning theorem* shows it is impossible to create a perfect copy of an unknown quantum state.\n",
"\n",
"> **Theorem (No-cloning theorem).**\n",
"> Let $\\Sigma$ be a classical state set having at least two elements, and let $\\mathsf{X}$ and $\\mathsf{Y}$ be systems sharing the same classical state set $\\Sigma.$ There does not exist a quantum state $\\vert \\phi\\rangle$ of $\\mathsf{Y}$ and a unitary operation $U$ on the pair $(\\mathsf{X},\\mathsf{Y})$ such that\n",
"> $$\n",
"> U \\bigl( \\vert \\psi \\rangle \\otimes \\vert\\phi\\rangle\\bigr) = \\vert \\psi \\rangle \\otimes \\vert\\psi\\rangle\n",
"> $$\n",
"> for every state $\\vert \\psi \\rangle$ of $\\mathsf{X}.$\n",
"<Figure title=\"Theorem\">\n",
"No-cloning theorem: Let $\\Sigma$ be a classical state set having at least two elements, and let $\\mathsf{X}$ and $\\mathsf{Y}$ be systems sharing the same classical state set $\\Sigma.$ There does not exist a quantum state $\\vert \\phi\\rangle$ of $\\mathsf{Y}$ and a unitary operation $U$ on the pair $(\\mathsf{X},\\mathsf{Y})$ such that\n",
"$$\n",
"U \\bigl( \\vert \\psi \\rangle \\otimes \\vert\\phi\\rangle\\bigr) = \\vert \\psi \\rangle \\otimes \\vert\\psi\\rangle\n",
"$$\n",
"for every state $\\vert \\psi \\rangle$ of $\\mathsf{X}.$\n",
"</Figure>\n",
"\n",
"That is, there is no way to initialize the system $\\mathsf{Y}$ (to any state $\\vert\\phi\\rangle$ whatsoever) and perform a unitary operation $U$ on the joint system $(\\mathsf{X},\\mathsf{Y})$ so that the effect is for the state $\\vert\\psi\\rangle$ of $\\mathsf{X}$ to be *cloned* — resulting in $(\\mathsf{X},\\mathsf{Y})$ being in the state\n",
"$\\vert \\psi \\rangle \\otimes \\vert\\psi\\rangle.$\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,9 @@
"Unfortunately, it is never possible, for any non-trivial quantum error correcting code, to implement a *universal* set of gates transversally.\n",
"This fact is known as the *Eastin-Knill theorem*.\n",
"\n",
"> **Theorem** (Eastin-Knill).\n",
"> For any quantum error correcting code with distance at least 2, the set of logical gates that can be implemented transversally generates a set of operations that (up to a global phase) is discrete, and is therefore not universal.\n",
"<Figure title=\"Theorem\">\n",
"Eastin-Knill theorem: For any quantum error correcting code with distance at least 2, the set of logical gates that can be implemented transversally generates a set of operations that (up to a global phase) is discrete, and is therefore not universal.\n",
"</Figure>\n",
"\n",
"The proof of this theorem will not be explained here.\n",
"(It is not a complicated proof, but it does require a basic knowledge of Lie groups and Lie algebras, which are not among the series prerequisites.)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"The final topic of discussion for the lesson is a very important theorem known as the *threshold theorem*.\n",
"Here is a somewhat informal statement of this theorem.\n",
"\n",
"> **Theorem** (The threshold theorem). A quantum circuit having size $N$ can be implemented with high accuracy by a noisy quantum circuit, provided that the probability of error at each location in the noisy circuit is below a fixed, nonzero threshold value $p_{\\text{th}} > 0.$ The size of the noisy circuit scales as $O(N \\log^c(N))$ for a positive constant $c.$\n",
"<Figure title=\"Theorem\">\n",
"The threshold theorem: A quantum circuit having size $N$ can be implemented with high accuracy by a noisy quantum circuit, provided that the probability of error at each location in the noisy circuit is below a fixed, nonzero threshold value $p_{\\text{th}} > 0.$ The size of the noisy circuit scales as $O(N \\log^c(N))$ for a positive constant $c.$\n",
"</Figure>\n",
"\n",
"In simple terms, it says that if we have any quantum circuit having $N$ gates, where $N$ can be as large as we like, then it's possible to implement that circuit with high accuracy using a noisy quantum circuit, provided that the level of noise is below a certain threshold value that is independent of N.\n",
"Moreover, it isn't too expensive to do this, in the sense that the size of the noisy circuit required is on the order of $N$ times some constant power of the logarithm of $N.$\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@
"\n",
"We can now define CSS codes in very simple terms.\n",
"\n",
"> **Definition.** A CSS code is a stabilizer code that can be expressed using only $X$ and $Z$ stabilizer generators.\n",
"<Figure title=\"Definition\">\n",
"A CSS code is a stabilizer code that can be expressed using only $X$ and $Z$ stabilizer generators.\n",
"</Figure>\n",
"\n",
"That is, CSS codes are stabilizer codes for which we have stabilizer generators in which no Pauli $Y$ matrices appear, and for which $X$ and $Z$ never appear in the *same* stabilizer generator.\n",
"\n",
Expand Down
Loading
Loading