Skip to content

Commit

Permalink
Sync latest dev docs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 1, 2024
1 parent 4144d60 commit 04bd249
Show file tree
Hide file tree
Showing 286 changed files with 3,989 additions and 986 deletions.
24 changes: 24 additions & 0 deletions docs/api/qiskit/dev/_toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@
"title": "AND",
"url": "/api/qiskit/dev/qiskit.circuit.library.AND"
},
{
"title": "AndGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.AndGate"
},
{
"title": "BitwiseXorGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.BitwiseXorGate"
},
{
"title": "C3SXGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.C3SXGate"
Expand Down Expand Up @@ -325,6 +333,10 @@
"title": "InnerProduct",
"url": "/api/qiskit/dev/qiskit.circuit.library.InnerProduct"
},
{
"title": "InnerProductGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.InnerProductGate"
},
{
"title": "IntegerComparator",
"url": "/api/qiskit/dev/qiskit.circuit.library.IntegerComparator"
Expand Down Expand Up @@ -397,6 +409,10 @@
"title": "OR",
"url": "/api/qiskit/dev/qiskit.circuit.library.OR"
},
{
"title": "OrGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.OrGate"
},
{
"title": "PauliEvolutionGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.PauliEvolutionGate"
Expand Down Expand Up @@ -712,6 +728,10 @@
"title": "ScalarOp",
"url": "/api/qiskit/dev/qiskit.quantum_info.ScalarOp"
},
{
"title": "SparseObservable",
"url": "/api/qiskit/dev/qiskit.quantum_info.SparseObservable"
},
{
"title": "SparsePauliOp",
"url": "/api/qiskit/dev/qiskit.quantum_info.SparsePauliOp"
Expand Down Expand Up @@ -1345,6 +1365,10 @@
"title": "RemoveFinalReset",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.RemoveFinalReset"
},
{
"title": "RemoveIdentityEquivalent",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.RemoveIdentityEquivalent"
},
{
"title": "RemoveResetInZeroState",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.RemoveResetInZeroState"
Expand Down
6 changes: 5 additions & 1 deletion docs/api/qiskit/dev/assembler.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,13 @@ python_api_name: qiskit.assembler

### assemble\_schedules

<Function id="qiskit.assembler.assemble_schedules" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/assembler/assemble_schedules.py#L27-L103" signature="qiskit.assembler.assemble_schedules(schedules, qobj_id, qobj_header, run_config)">
<Function id="qiskit.assembler.assemble_schedules" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/assembler/assemble_schedules.py#L28-L105" signature="qiskit.assembler.assemble_schedules(schedules, qobj_id, qobj_header, run_config)">
Assembles a list of schedules into a qobj that can be run on the backend.

<Admonition title="Deprecated since version 1.3" type="danger">
The function `qiskit.assembler.assemble_schedules.assemble_schedules()` is deprecated as of Qiskit 1.3. It will be removed in Qiskit 2.0. The entire Qiskit Pulse package is being deprecated and will be moved to the Qiskit Dynamics repository: [https://github.com/qiskit-community/qiskit-dynamics](https://github.com/qiskit-community/qiskit-dynamics). Note that once removed, `qiskit.assembler.assemble_schedules.assemble_schedules()` will have no alternative in Qiskit.
</Admonition>

**Parameters**

* **schedules** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*,* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]]*) – Schedules to assemble.
Expand Down
16 changes: 12 additions & 4 deletions docs/api/qiskit/dev/circuit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ Hardware can be instructed to apply a real-time idle period on a given qubit. A

#### Delay

<Class id="qiskit.circuit.Delay" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/delay.py#L24-L121" signature="qiskit.circuit.Delay(duration, unit='dt')" modifiers="class">
<Class id="qiskit.circuit.Delay" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/delay.py#L25-L123" signature="qiskit.circuit.Delay(duration, unit='dt')" modifiers="class">
Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction")

Do nothing and just delay/wait/idle for a specified duration.
Expand All @@ -511,7 +511,7 @@ it is forbidden for the optimizer to cancel out the two $X$ instructions.

#### Barrier

<Class id="qiskit.circuit.Barrier" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/barrier.py#L25-L48" signature="qiskit.circuit.Barrier(num_qubits, label=None)" modifiers="class">
<Class id="qiskit.circuit.Barrier" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/barrier.py#L26-L50" signature="qiskit.circuit.Barrier(num_qubits, label=None)" modifiers="class">
Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction")

A directive for circuit compilation to separate pieces of a circuit so that any optimizations or re-writes are constrained to only act between barriers.
Expand All @@ -537,7 +537,7 @@ qc.store(creg[0], parity)

#### Store

<Class id="qiskit.circuit.Store" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/store.py#L55-L95" signature="qiskit.circuit.Store(lvalue, rvalue)" modifiers="class">
<Class id="qiskit.circuit.Store" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/store.py#L56-L97" signature="qiskit.circuit.Store(lvalue, rvalue)" modifiers="class">
Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction")

A manual storage of some classical value to a classical memory location.
Expand All @@ -549,6 +549,14 @@ qc.store(creg[0], parity)
* **lvalue** ([*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – the memory location being stored into.
* **rvalue** ([*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) – the expression result being stored.

##### c\_if

<Function id="qiskit.circuit.Store.c_if" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/store.py#L92-L97" signature="c_if(classical, val)">
<Admonition title="Deprecated since version 1.3.0" type="danger">
The method `qiskit.circuit.store.Store.c_if()` is deprecated as of qiskit 1.3.0. It will be removed in 2.0.0.
</Admonition>
</Function>

##### lvalue

<Attribute id="qiskit.circuit.Store.lvalue">
Expand Down Expand Up @@ -714,7 +722,7 @@ Subclasses of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruc

#### \_define

<Function id="qiskit.circuit.Instruction._define" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L290-L297" signature="Instruction._define()">
<Function id="qiskit.circuit.Instruction._define" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L291-L298" signature="Instruction._define()">
Populate the cached `_definition` field of this [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction").

Subclasses should implement this method to provide lazy construction of their public [`definition`](qiskit.circuit.Instruction#definition "qiskit.circuit.Instruction.definition") attribute. A subclass can use its [`params`](qiskit.circuit.Instruction#params "qiskit.circuit.Instruction.params") at the time of the call. The method should populate `_definition` with a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") and not return a value.
Expand Down
97 changes: 91 additions & 6 deletions docs/api/qiskit/dev/circuit_library.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,31 @@ print(diagonal.num_qubits)

These are [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") subclasses that implement boolean logic operations, such as the logical or of a set of qubit states.

| | |
| ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- |
| [`AND`](qiskit.circuit.library.AND "qiskit.circuit.library.AND")(num\_variable\_qubits\[, flags, mcx\_mode]) | A circuit implementing the logical AND operation on a number of qubits. |
| [`OR`](qiskit.circuit.library.OR "qiskit.circuit.library.OR")(num\_variable\_qubits\[, flags, mcx\_mode]) | A circuit implementing the logical OR operation on a number of qubits. |
| [`XOR`](qiskit.circuit.library.XOR "qiskit.circuit.library.XOR")(num\_qubits\[, amount, seed]) | An n\_qubit circuit for bitwise xor-ing the input with some integer `amount`. |
| [`InnerProduct`](qiskit.circuit.library.InnerProduct "qiskit.circuit.library.InnerProduct")(num\_qubits) | A 2n-qubit Boolean function that computes the inner product of two n-qubit vectors over $F_2$. |
| | |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| [`AND`](qiskit.circuit.library.AND "qiskit.circuit.library.AND")(num\_variable\_qubits\[, flags, mcx\_mode]) | A circuit implementing the logical AND operation on a number of qubits. |
| [`AndGate`](qiskit.circuit.library.AndGate "qiskit.circuit.library.AndGate")(num\_variable\_qubits\[, flags]) | A gate representing the logical AND operation on a number of qubits. |
| [`OR`](qiskit.circuit.library.OR "qiskit.circuit.library.OR")(num\_variable\_qubits\[, flags, mcx\_mode]) | A circuit implementing the logical OR operation on a number of qubits. |
| [`OrGate`](qiskit.circuit.library.OrGate "qiskit.circuit.library.OrGate")(num\_variable\_qubits\[, flags]) | A gate representing the logical OR operation on a number of qubits. |
| [`XOR`](qiskit.circuit.library.XOR "qiskit.circuit.library.XOR")(num\_qubits\[, amount, seed]) | An n\_qubit circuit for bitwise xor-ing the input with some integer `amount`. |
| [`BitwiseXorGate`](qiskit.circuit.library.BitwiseXorGate "qiskit.circuit.library.BitwiseXorGate")(num\_qubits, amount) | An n-qubit gate for bitwise xor-ing the input with some integer `amount`. |
| [`InnerProduct`](qiskit.circuit.library.InnerProduct "qiskit.circuit.library.InnerProduct")(num\_qubits) | A 2n-qubit Boolean function that computes the inner product of two n-qubit vectors over $F_2$. |
| [`InnerProductGate`](qiskit.circuit.library.InnerProductGate "qiskit.circuit.library.InnerProductGate")(num\_qubits) | A 2n-qubit Boolean function that computes the inner product of two n-qubit vectors over $F_2$. |

### random\_bitwise\_xor

<Function id="qiskit.circuit.library.random_bitwise_xor" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/boolean_logic/quantum_xor.py#L154-L165" signature="qiskit.circuit.library.random_bitwise_xor(num_qubits, seed)">
Create a random BitwiseXorGate.

**Parameters**

* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – the width of circuit.
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – random seed in case a random xor is requested.

**Return type**

[*BitwiseXorGate*](qiskit.circuit.library.BitwiseXorGate "qiskit.circuit.library.boolean_logic.quantum_xor.BitwiseXorGate")
</Function>

## Basis Change Circuits

Expand Down Expand Up @@ -270,6 +289,72 @@ These [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCi
| [`HamiltonianGate`](qiskit.circuit.library.HamiltonianGate "qiskit.circuit.library.HamiltonianGate")(data, time\[, label]) | Class for representing evolution by a Hamiltonian operator as a gate. |
| [`UnitaryOverlap`](qiskit.circuit.library.UnitaryOverlap "qiskit.circuit.library.UnitaryOverlap")(unitary1, unitary2\[, ...]) | Circuit that returns the overlap between two unitaries $U_2^{\dag} U_1$. |

### iqp

<Function id="qiskit.circuit.library.iqp" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/iqp.py#L84-L143" signature="qiskit.circuit.library.iqp(interactions)">
Instantaneous quantum polynomial time (IQP) circuit.

The circuit consists of a column of Hadamard gates, a column of powers of T gates, a sequence of powers of CS gates (up to $\frac{n^2-n}{2}$ of them), and a final column of Hadamard gates, as introduced in \[1].

The circuit is parameterized by an $n \times n$ interactions matrix. The powers of each T gate are given by the diagonal elements of the interactions matrix. The powers of the CS gates are given by the upper triangle of the interactions matrix.

**Reference Circuit:**

![../\_images/circuit\_library-2.png](/images/api/qiskit/dev/circuit_library-2.png)

**Expanded Circuit:**

> ![../\_images/circuit\_library-3.png](/images/api/qiskit/dev/circuit_library-3.png)
**References:**

\[1] M. J. Bremner et al. Average-case complexity versus approximate simulation of commuting quantum computations, Phys. Rev. Lett. 117, 080501 (2016). [arXiv:1504.07999](https://arxiv.org/abs/1504.07999)

**Parameters**

**interactions** ([*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence "(in Python v3.13)")*\[*[*Sequence*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]]*) – The interactions as symmetric square matrix. If `None`, then the `num_qubits` argument must be set and a random IQP circuit will be generated.

**Returns**

An IQP circuit.

**Return type**

[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")
</Function>

### random\_iqp

<Function id="qiskit.circuit.library.random_iqp" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/iqp.py#L146-L175" signature="qiskit.circuit.library.random_iqp(num_qubits, seed=None)">
A random instantaneous quantum polynomial time (IQP) circuit.

See [`iqp()`](#qiskit.circuit.library.iqp "qiskit.circuit.library.iqp") for more details on the IQP circuit.

Example:

```python
from qiskit.circuit.library import random_iqp

circuit = random_iqp(3)
circuit.draw("mpl")
```

![../\_images/circuit\_library-4.png](/images/api/qiskit/dev/circuit_library-4.png)

**Parameters**

* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) – The number of qubits in the circuit.
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) – A seed for the random number generator, in case the interactions matrix is randomly generated.

**Returns**

An IQP circuit.

**Return type**

[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
</Function>

## N-local circuits

These `BlueprintCircuit` subclasses are used as parameterized models (a.k.a. ansatzes or variational forms) in variational algorithms. They are heavily used in near-term algorithms in e.g. Chemistry, Physics or Optimization.
Expand Down
Loading

0 comments on commit 04bd249

Please sign in to comment.