Skip to content

Commit

Permalink
Revert vertical line Latex conversion (Qiskit#767)
Browse files Browse the repository at this point in the history
Reverts Qiskit#718. Turns out that
breaks certain pages, as explained at
Qiskit#718 (comment).

Instead, we fix the problematic pages by changing the original Sphinx
HTML in Box directly in this PR's last commit.

We have to manually revert the 0.45 docs due to
Qiskit#755.
  • Loading branch information
Eric-Arellano authored Feb 6, 2024
1 parent c44ca5e commit 6e68526
Show file tree
Hide file tree
Showing 2,383 changed files with 6,704 additions and 6,751 deletions.
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/circuit.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The fundamental element of quantum computing is the **quantum circuit**. A quant
In Qiskit, this core element is represented by the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") class. Below is an example of a quantum circuit that makes a three-qubit GHZ state defined as:

$$
\vert \psi\rangle = \left(\vert 000\rangle+\vert 111\rangle\right)/\sqrt{2}
|\psi\rangle = \left(|000\rangle+|111\rangle\right)/\sqrt{2}
$$

```python
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/qiskit.aqua.algorithms.HHL.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python_api_name: qiskit.aqua.algorithms.HHL

The HHL algorithm.

The HHL algorithm (after the author’s surnames Harrow-Hassidim-Lloyd) is a quantum algorithm to solve systems of linear equations $A\overrightarrow{x}=\overrightarrow{b}$. Using Quantum Phase Estimation, the linear system is transformed into diagonal form in which the matrix $A$ is easily invertible. The inversion is achieved by rotating an ancillary qubit by an angle $\arcsin{ \frac{C}{\lambda_\mathrm{i}}}$ around the y-axis where $\lambda_\mathrm{i}$ are the eigenvalues of $A$. After uncomputing the register storing the eigenvalues using the inverse QPE, one measures the ancillary qubit. A measurement of 1 indicates that the matrix inversion succeeded. This leaves the system in a state proportional to the solution vector $\vert x\rangle$. In many cases one is not interested in the single vector elements of $\vert x\rangle$ but only on certain properties. These are accessible by using problem-specific operators. Another use-case is the implementation in a larger quantum program.
The HHL algorithm (after the author’s surnames Harrow-Hassidim-Lloyd) is a quantum algorithm to solve systems of linear equations $A\overrightarrow{x}=\overrightarrow{b}$. Using Quantum Phase Estimation, the linear system is transformed into diagonal form in which the matrix $A$ is easily invertible. The inversion is achieved by rotating an ancillary qubit by an angle $\arcsin{ \frac{C}{\lambda_\mathrm{i}}}$ around the y-axis where $\lambda_\mathrm{i}$ are the eigenvalues of $A$. After uncomputing the register storing the eigenvalues using the inverse QPE, one measures the ancillary qubit. A measurement of 1 indicates that the matrix inversion succeeded. This leaves the system in a state proportional to the solution vector $|x\rangle$. In many cases one is not interested in the single vector elements of $|x\rangle$ but only on certain properties. These are accessible by using problem-specific operators. Another use-case is the implementation in a larger quantum program.

When using non-hermitian matrices and matrices with dimensions other than $2^{n}$ the must be converted to an hermitian matrix and next higher dimension $2^{n}$, respectively. The *truncate\_hermitian*, *truncate\_powerdim* flags and *orig\_size* are used to indicate conversion and the returned result of the HHL algorithm for expanded matrices will be truncated. The [`matrix_resize()`](qiskit.aqua.algorithms.HHL#matrix_resize "qiskit.aqua.algorithms.HHL.matrix_resize") method is provided for convenience to do this but any method of your choice can be used.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Univariate Piecewise Linear Objective Function.
This objective function applies controlled Y-rotation to the target qubit, where the control qubits represent integer value, and rotation approximates a piecewise linear function of the amplitude f:

$$
\vert x\rangle \vert 0\rangle \mapsto \vert x\rangle (\sqrt(1 - f(x))\vert 0\rangle + sqrt(f(x))\vert 1\rangle )
|x\rangle |0\rangle \mapsto |x\rangle (\sqrt(1 - f(x))|0\rangle + sqrt(f(x))|1\rangle )
$$

**Parameters**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This trial wave function is layers of swap plus $z$ rotations with entanglements
In chemistry, to define the particles for SwapRZ, use a [`HartreeFock`](qiskit.chemistry.components.initial_states.HartreeFock "qiskit.chemistry.components.initial_states.HartreeFock") initial state with the Jordan-Wigner qubit mapping
</Admonition>

For the case of none of qubits are unentangled to other qubits, the number of optimizer parameters SwapRz creates and uses is given by $q + d \times \left(q + \sum_{k=0}^{q-1}\vert D(k)\vert \right)$, where $\vert D(k)\vert $ denotes the *cardinality* of $D(k)$ or, more precisely, the *length* of $D(k)$ (since $D(k)$ is not just a set, but a list). Nonetheless, in some cases, if an entangler\_map does not include all qubits, that is, some qubits are not entangled by other qubits. The number of parameters is reduced by $d \times q'$, where $q'$ is the number of unentangled qubits. This is because adding more Rz gates to the unentangled qubits only introduce overhead without bringing any benefit; furthermore, theoretically, applying multiple Rz gates in a row can be reduced to a single Rz gate with the summed rotation angles.
For the case of none of qubits are unentangled to other qubits, the number of optimizer parameters SwapRz creates and uses is given by $q + d \times \left(q + \sum_{k=0}^{q-1}|D(k)|\right)$, where $|D(k)|$ denotes the *cardinality* of $D(k)$ or, more precisely, the *length* of $D(k)$ (since $D(k)$ is not just a set, but a list). Nonetheless, in some cases, if an entangler\_map does not include all qubits, that is, some qubits are not entangled by other qubits. The number of parameters is reduced by $d \times q'$, where $q'$ is the number of unentangled qubits. This is because adding more Rz gates to the unentangled qubits only introduce overhead without bringing any benefit; furthermore, theoretically, applying multiple Rz gates in a row can be reduced to a single Rz gate with the summed rotation angles.

See [`RY`](qiskit.aqua.components.variational_forms.RY "qiskit.aqua.components.variational_forms.RY") for more detail on entangler\_map and entanglement which apply here too but note SwapRZ only supports ‘full’ and ‘linear’ values.

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/qiskit.circuit.library.AND.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python_api_name: qiskit.circuit.library.AND

A circuit implementing the logical AND operation on a number of qubits.

For the AND operation the state $\vert 1\rangle$ is interpreted as `True`. The result qubit is flipped, if the state of all variable qubits is `True`. In this format, the AND operation equals a multi-controlled X gate, which is controlled on all variable qubits. Using a list of flags however, qubits can be skipped or negated. Practically, the flags allow to skip controls or to apply pre- and post-X gates to the negated qubits.
For the AND operation the state $|1\rangle$ is interpreted as `True`. The result qubit is flipped, if the state of all variable qubits is `True`. In this format, the AND operation equals a multi-controlled X gate, which is controlled on all variable qubits. Using a list of flags however, qubits can be skipped or negated. Practically, the flags allow to skip controls or to apply pre- and post-X gates to the negated qubits.

The AND gate without special flags equals the multi-controlled-X gate:

Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CCXGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ q_2: ┤ X ├

$$
\begin{split}CCX q_0, q_1, q_2 =
\vert 0 \rangle \langle 0\vert \otimes I \otimes I + \vert 1 \rangle \langle 1\vert \otimes CX =
|0 \rangle \langle 0| \otimes I \otimes I + |1 \rangle \langle 1| \otimes CX =
\begin{pmatrix}
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
Expand All @@ -56,7 +56,7 @@ $$

$$
\begin{split}CCX\ q_2, q_1, q_0 =
I \otimes I \otimes \vert 0 \rangle \langle 0\vert + CX \otimes \vert 1 \rangle \langle 1\vert =
I \otimes I \otimes |0 \rangle \langle 0| + CX \otimes |1 \rangle \langle 1| =
\begin{pmatrix}
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\
Expand Down
6 changes: 3 additions & 3 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CHGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python_api_name: qiskit.circuit.library.CHGate

Controlled-Hadamard gate.

Applies a Hadamard on the target qubit if the control is in the $\vert 1\rangle$ state.
Applies a Hadamard on the target qubit if the control is in the $|1\rangle$ state.

**Circuit symbol:**

Expand All @@ -30,7 +30,7 @@ Applies a Hadamard on the target qubit if the control is in the $\vert 1\rangle$

$$
\begin{split}CH\ q_0, q_1 =
I \otimes \vert 0\rangle\langle 0\vert + H \otimes \vert 1\rangle\langle 1\vert =
I \otimes |0\rangle\langle 0| + H \otimes |1\rangle\langle 1| =
\frac{1}{\sqrt{2}}
\begin{pmatrix}
1 & 0 & 0 & 0 \\
Expand All @@ -52,7 +52,7 @@ $$

$$
\begin{split}CH\ q_1, q_0 =
\vert 0\rangle\langle 0\vert \otimes I + \vert 1\rangle\langle 1\vert \otimes H =
|0\rangle\langle 0| \otimes I + |1\rangle\langle 1| \otimes H =
\frac{1}{\sqrt{2}}
\begin{pmatrix}
1 & 0 & 0 & 0 \\
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CRXGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ q_1: ┤ Rx(ϴ) ├

$$
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}CRX(\lambda)\ q_0, q_1 =
I \otimes \vert 0\rangle\langle 0\vert + RX(\theta) \otimes \vert 1\rangle\langle 1\vert =
I \otimes |0\rangle\langle 0| + RX(\theta) \otimes |1\rangle\langle 1| =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & \cos{\th} & 0 & -i\sin{\th} \\
Expand All @@ -48,7 +48,7 @@ $$

$$
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}CRX(\theta)\ q_1, q_0 =
\vert 0\rangle\langle0\vert \otimes I + \vert 1\rangle\langle1\vert \otimes RX(\theta) =
|0\rangle\langle0| \otimes I + |1\rangle\langle1| \otimes RX(\theta) =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CRYGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Controlled-RY gate.

$$
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}CRY(\theta)\ q_0, q_1 =
I \otimes \vert 0\rangle\langle 0\vert + RY(\theta) \otimes \vert 1\rangle\langle 1\vert =
I \otimes |0\rangle\langle 0| + RY(\theta) \otimes |1\rangle\langle 1| =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & \cos{\th} & 0 & -\sin{\th} \\
Expand All @@ -49,7 +49,7 @@ $$

$$
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}CRY(\theta)\ q_1, q_0 =
\vert 0\rangle\langle 0\vert \otimes I + \vert 1\rangle\langle 1\vert \otimes RY(\theta) =
|0\rangle\langle 0| \otimes I + |1\rangle\langle 1| \otimes RY(\theta) =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CRZGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ q_1: ┤ Rz(λ) ├

$$
\begin{split}CRZ(\lambda)\ q_0, q_1 =
I \otimes \vert 0\rangle\langle 0\vert + RZ(\lambda) \otimes \vert 1\rangle\langle 1\vert =
I \otimes |0\rangle\langle 0| + RZ(\lambda) \otimes |1\rangle\langle 1| =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & e^{-i\frac{\lambda}{2}} & 0 & 0 \\
Expand All @@ -50,7 +50,7 @@ $$

$$
\begin{split}CRZ(\lambda)\ q_1, q_0 =
\vert 0\rangle\langle 0\vert \otimes I + \vert 1\rangle\langle 1\vert \otimes RZ(\lambda) =
|0\rangle\langle 0| \otimes I + |1\rangle\langle 1| \otimes RZ(\lambda) =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand Down
14 changes: 7 additions & 7 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CSwapGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ q_2: ─■─

$$
\begin{split}CSWAP\ q_0, q_1, q_2 =
\vert 0 \rangle \langle 0\vert \otimes I \otimes I +
\vert 1 \rangle \langle 1\vert \otimes SWAP =
|0 \rangle \langle 0| \otimes I \otimes I +
|1 \rangle \langle 1| \otimes SWAP =
\begin{pmatrix}
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\
Expand All @@ -55,8 +55,8 @@ $$

$$
\begin{split}CSWAP\ q_2, q_1, q_0 =
\vert 0 \rangle \langle 0\vert \otimes I \otimes I +
\vert 1 \rangle \langle 1\vert \otimes SWAP =
|0 \rangle \langle 0| \otimes I \otimes I +
|1 \rangle \langle 1| \otimes SWAP =
\begin{pmatrix}
1 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\
Expand All @@ -70,11 +70,11 @@ $$
$$
</Admonition>

In the computational basis, this gate swaps the states of the two target qubits if the control qubit is in the $\vert 1\rangle$ state.
In the computational basis, this gate swaps the states of the two target qubits if the control qubit is in the $|1\rangle$ state.

$$
\vert 0, b, c\rangle \rightarrow \vert 0, b, c\rangle
\vert 1, b, c\rangle \rightarrow \vert 1, c, b\rangle
|0, b, c\rangle \rightarrow |0, b, c\rangle
|1, b, c\rangle \rightarrow |1, c, b\rangle
$$

Create new CSWAP gate.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/qiskit.circuit.library.CU1Gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ q_1: ─■──

$$
\begin{split}CU1 =
\vert 0\rangle\langle 0\vert \otimes I + \vert 1\rangle\langle 1\vert \otimes U1 =
|0\rangle\langle 0| \otimes I + |1\rangle\langle 1| \otimes U1 =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand Down
8 changes: 4 additions & 4 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CU3Gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ q_1: ┤ U3(ϴ,φ,λ) ├

$$
\begin{align}\begin{aligned}\newcommand{\th}{\frac{\theta}{2}}\\\begin{split}CU3(\theta, \phi, \lambda)\ q_0, q_1 =
I \otimes \vert 0\rangle\langle 0\vert +
U3(\theta,\phi,\lambda) \otimes \vert 1\rangle\langle 1\vert =
I \otimes |0\rangle\langle 0| +
U3(\theta,\phi,\lambda) \otimes |1\rangle\langle 1| =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & \cos(\th) & 0 & e^{-i\lambda}\sin(\th) \\
Expand All @@ -51,8 +51,8 @@ $$

$$
\begin{split}CU3(\theta, \phi, \lambda)\ q_1, q_0 =
\vert 0\rangle\langle 0\vert \otimes I +
\vert 1\rangle\langle 1\vert \otimes U3(\theta,\phi,\lambda) =
|0\rangle\langle 0| \otimes I +
|1\rangle\langle 1| \otimes U3(\theta,\phi,\lambda) =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand Down
8 changes: 4 additions & 4 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CXGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ q_1: ┤ X ├

$$
\begin{split}CX\ q_0, q_1 =
I \otimes \vert 0\rangle\langle0\vert + X \otimes \vert 1\rangle\langle1\vert =
I \otimes |0\rangle\langle0| + X \otimes |1\rangle\langle1| =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 \\
Expand All @@ -48,7 +48,7 @@ $$

$$
\begin{split}CX\ q_1, q_0 =
\vert 0 \rangle\langle 0\vert \otimes I + \vert 1 \rangle\langle 1\vert \otimes X =
|0 \rangle\langle 0| \otimes I + |1 \rangle\langle 1| \otimes X =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand All @@ -58,10 +58,10 @@ $$
$$
</Admonition>

In the computational basis, this gate flips the target qubit if the control qubit is in the $\vert 1\rangle$ state. In this sense it is similar to a classical XOR gate.
In the computational basis, this gate flips the target qubit if the control qubit is in the $|1\rangle$ state. In this sense it is similar to a classical XOR gate.

$$
`\vert a, b\rangle \rightarrow \vert a, a \oplus b\rangle`
`|a, b\rangle \rightarrow |a, a \oplus b\rangle`
$$

Create new CX gate.
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CYGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ q_1: ┤ Y ├

$$
\begin{split}CY\ q_0, q_1 =
I \otimes \vert 0 \rangle\langle 0\vert + Y \otimes \vert 1 \rangle\langle 1\vert =
I \otimes |0 \rangle\langle 0| + Y \otimes |1 \rangle\langle 1| =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 0 & 0 & -i \\
Expand All @@ -48,7 +48,7 @@ $$

$$
\begin{split}CY\ q_1, q_0 =
\vert 0 \rangle\langle 0\vert \otimes I + \vert 1 \rangle\langle 1\vert \otimes Y =
|0 \rangle\langle 0| \otimes I + |1 \rangle\langle 1| \otimes Y =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand Down
4 changes: 2 additions & 2 deletions docs/api/qiskit/0.19/qiskit.circuit.library.CZGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ q_1: ─■─

$$
\begin{split}CZ\ q_1, q_0 =
\vert 0\rangle\langle 0\vert \otimes I + \vert 1\rangle\langle 1\vert \otimes Z =
|0\rangle\langle 0| \otimes I + |1\rangle\langle 1| \otimes Z =
\begin{pmatrix}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
Expand All @@ -37,7 +37,7 @@ $$
\end{pmatrix}\end{split}
$$

In the computational basis, this gate flips the phase of the target qubit if the control qubit is in the $\vert 1\rangle$ state.
In the computational basis, this gate flips the phase of the target qubit if the control qubit is in the $|1\rangle$ state.

Create new CZ gate.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python_api_name: qiskit.circuit.library.ExcitationPreserving

The heurisitic excitation-preserving wave function ansatz.

The `ExcitationPreserving` circuit preserves the ratio of $\vert 00\rangle$, $\vert 01\rangle + \vert 10\rangle$ and $\vert 11\rangle$ states. The matrix representing the operation is
The `ExcitationPreserving` circuit preserves the ratio of $|00\rangle$, $|01\rangle + |10\rangle$ and $|11\rangle$ states. The matrix representing the operation is

$$
\begin{align}\begin{aligned}\newcommand{\th}{\theta/2}\\\begin{split}\begin{pmatrix}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Create a new functional Pauli rotation circuit.

**Parameters**

* **num\_state\_qubits** (`Optional`\[`int`]) – The number of qubits representing the state $\vert x\rangle$.
* **num\_state\_qubits** (`Optional`\[`int`]) – The number of qubits representing the state $|x\rangle$.
* **basis** (`str`) – The kind of Pauli rotation to use. Must be ‘X’, ‘Y’ or ‘Z’.
* **name** (`str`) – The name of the circuit object.

Expand Down Expand Up @@ -116,7 +116,7 @@ Return number of qubits.

`int`

The number of state qubits representing the state $\vert x\rangle$.
The number of state qubits representing the state $|x\rangle$.

**Return type**

Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/qiskit.circuit.library.GraphState.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Circuit to prepare a graph state.
Given a graph G = (V, E), with the set of vertices V and the set of edges E, the corresponding graph state is defined as

$$
\vert G\rangle = \prod_{(a,b) \in E} CZ_{(a,b)} {\vert +\rangle}^{\otimes V}
|G\rangle = \prod_{(a,b) \in E} CZ_{(a,b)} {|+\rangle}^{\otimes V}
$$

Such a state can be prepared by first preparing all qubits in the $+$ state, then applying a $CZ$ gate for each corresponding graph edge.
Expand Down
2 changes: 1 addition & 1 deletion docs/api/qiskit/0.19/qiskit.circuit.library.HGate.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ python_api_name: qiskit.circuit.library.HGate

Single-qubit Hadamard gate.

This gate is a pi rotation about the X+Z axis, and has the effect of changing computation basis from $\vert 0\rangle,\vert 1\rangle$ to $\vert +\rangle,\vert -\rangle$ and vice-versa.
This gate is a pi rotation about the X+Z axis, and has the effect of changing computation basis from $|0\rangle,|1\rangle$ to $|+\rangle,|-\rangle$ and vice-versa.

**Circuit symbol:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ python_api_name: qiskit.circuit.library.IntegerComparator

Integer Comparator.

Operator compares basis states $\vert i\rangle_n$ against a classically given integer $L$ of fixed value and flips a target qubit if $i \geq L$ (or $<$ depending on parameters):
Operator compares basis states $|i\rangle_n$ against a classically given integer $L$ of fixed value and flips a target qubit if $i \geq L$ (or $<$ depending on parameters):

$$
\vert i\rangle_n \vert 0\rangle \mapsto \vert i\rangle_n \vert i \geq L\rangle
|i\rangle_n |0\rangle \mapsto |i\rangle_n |i \geq L\rangle
$$

This operation is based on two’s complement implementation of binary subtraction but only uses carry bits and no actual result bits. If the most significant carry bit (the results bit) is 1, the $\geq$ condition is `True` otherwise it is `False`.
Expand Down
Loading

0 comments on commit 6e68526

Please sign in to comment.