qiskit 1.3.1__cp39-abi3-win32.whl → 1.3.2__cp39-abi3-win32.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. qiskit/VERSION.txt +1 -1
  2. qiskit/_accelerate.pyd +0 -0
  3. qiskit/circuit/__init__.py +2 -0
  4. qiskit/circuit/controlledgate.py +2 -0
  5. qiskit/circuit/library/__init__.py +1 -0
  6. qiskit/circuit/library/arithmetic/piecewise_chebyshev.py +1 -0
  7. qiskit/circuit/library/basis_change/qft.py +3 -0
  8. qiskit/circuit/library/boolean_logic/inner_product.py +2 -0
  9. qiskit/circuit/library/boolean_logic/quantum_and.py +4 -0
  10. qiskit/circuit/library/boolean_logic/quantum_or.py +4 -0
  11. qiskit/circuit/library/boolean_logic/quantum_xor.py +2 -0
  12. qiskit/circuit/library/fourier_checking.py +2 -0
  13. qiskit/circuit/library/generalized_gates/gms.py +1 -0
  14. qiskit/circuit/library/generalized_gates/gr.py +4 -0
  15. qiskit/circuit/library/generalized_gates/mcmt.py +1 -0
  16. qiskit/circuit/library/generalized_gates/permutation.py +5 -1
  17. qiskit/circuit/library/generalized_gates/unitary.py +1 -1
  18. qiskit/circuit/library/graph_state.py +2 -0
  19. qiskit/circuit/library/grover_operator.py +7 -3
  20. qiskit/circuit/library/hidden_linear_function.py +2 -0
  21. qiskit/circuit/library/iqp.py +5 -0
  22. qiskit/circuit/library/n_local/efficient_su2.py +7 -2
  23. qiskit/circuit/library/n_local/evolved_operator_ansatz.py +3 -0
  24. qiskit/circuit/library/n_local/excitation_preserving.py +14 -8
  25. qiskit/circuit/library/n_local/n_local.py +10 -5
  26. qiskit/circuit/library/n_local/pauli_two_design.py +5 -2
  27. qiskit/circuit/library/n_local/qaoa_ansatz.py +1 -0
  28. qiskit/circuit/library/n_local/real_amplitudes.py +10 -4
  29. qiskit/circuit/library/overlap.py +1 -0
  30. qiskit/circuit/library/phase_estimation.py +2 -0
  31. qiskit/circuit/library/quantum_volume.py +3 -0
  32. qiskit/circuit/operation.py +1 -0
  33. qiskit/circuit/parameter.py +1 -0
  34. qiskit/circuit/parameterexpression.py +1 -1
  35. qiskit/circuit/quantumcircuit.py +13 -19
  36. qiskit/circuit/random/utils.py +2 -0
  37. qiskit/converters/dag_to_circuit.py +1 -0
  38. qiskit/primitives/statevector_estimator.py +1 -0
  39. qiskit/providers/fake_provider/__init__.py +1 -0
  40. qiskit/pulse/builder.py +8 -0
  41. qiskit/pulse/library/symbolic_pulses.py +1 -0
  42. qiskit/qasm2/export.py +2 -2
  43. qiskit/qasm3/__init__.py +1 -0
  44. qiskit/qasm3/exporter.py +6 -3
  45. qiskit/quantum_info/operators/symplectic/pauli_list.py +8 -8
  46. qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py +10 -1
  47. qiskit/quantum_info/states/statevector.py +1 -0
  48. qiskit/synthesis/arithmetic/multipliers/hrs_cumulative_multiplier.py +1 -0
  49. qiskit/synthesis/arithmetic/multipliers/rg_qft_multiplier.py +1 -0
  50. qiskit/synthesis/evolution/product_formula.py +0 -6
  51. qiskit/synthesis/evolution/suzuki_trotter.py +22 -5
  52. qiskit/transpiler/__init__.py +22 -1
  53. qiskit/transpiler/layout.py +3 -0
  54. qiskit/transpiler/passes/routing/star_prerouting.py +1 -0
  55. qiskit/transpiler/passes/scheduling/dynamical_decoupling.py +1 -0
  56. qiskit/transpiler/passes/scheduling/padding/dynamical_decoupling.py +1 -0
  57. qiskit/transpiler/passes/synthesis/hls_plugins.py +48 -9
  58. qiskit/transpiler/passes/utils/filter_op_nodes.py +2 -1
  59. qiskit/transpiler/passes/utils/remove_barriers.py +1 -0
  60. qiskit/transpiler/preset_passmanagers/__init__.py +5 -5
  61. qiskit/transpiler/preset_passmanagers/builtin_plugins.py +19 -22
  62. qiskit/transpiler/target.py +1 -1
  63. qiskit/visualization/__init__.py +6 -0
  64. qiskit/visualization/circuit/circuit_visualization.py +1 -0
  65. qiskit/visualization/counts_visualization.py +2 -0
  66. qiskit/visualization/dag_visualization.py +1 -0
  67. qiskit/visualization/gate_map.py +7 -3
  68. qiskit/visualization/pulse_v2/interface.py +4 -1
  69. qiskit/visualization/state_visualization.py +13 -2
  70. qiskit/visualization/timeline/interface.py +6 -3
  71. {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/METADATA +17 -17
  72. {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/RECORD +76 -76
  73. {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/WHEEL +1 -1
  74. {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/LICENSE.txt +0 -0
  75. {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/entry_points.txt +0 -0
  76. {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/top_level.txt +0 -0
@@ -70,10 +70,11 @@ def plot_state_hinton(state, title="", figsize=None, ax_real=None, ax_imag=None,
70
70
 
71
71
  Raises:
72
72
  MissingOptionalLibraryError: Requires matplotlib.
73
- VisualizationError: if input is not a valid N-qubit state.
73
+ VisualizationError: Input is not a valid N-qubit state.
74
74
 
75
75
  Examples:
76
76
  .. plot::
77
+ :alt: Output from the previous code.
77
78
  :include-source:
78
79
 
79
80
  import numpy as np
@@ -214,6 +215,7 @@ def plot_bloch_vector(
214
215
 
215
216
  Examples:
216
217
  .. plot::
218
+ :alt: Output from the previous code.
217
219
  :include-source:
218
220
 
219
221
  from qiskit.visualization import plot_bloch_vector
@@ -221,6 +223,7 @@ def plot_bloch_vector(
221
223
  plot_bloch_vector([0,1,0], title="New Bloch Sphere")
222
224
 
223
225
  .. plot::
226
+ :alt: Output from the previous code.
224
227
  :include-source:
225
228
 
226
229
  import numpy as np
@@ -290,6 +293,7 @@ def plot_bloch_multivector(
290
293
 
291
294
  Examples:
292
295
  .. plot::
296
+ :alt: Output from the previous code.
293
297
  :include-source:
294
298
 
295
299
  from qiskit import QuantumCircuit
@@ -304,6 +308,7 @@ def plot_bloch_multivector(
304
308
  plot_bloch_multivector(state)
305
309
 
306
310
  .. plot::
311
+ :alt: Output from the previous code.
307
312
  :include-source:
308
313
 
309
314
  from qiskit import QuantumCircuit
@@ -406,6 +411,7 @@ def plot_state_city(
406
411
 
407
412
  Examples:
408
413
  .. plot::
414
+ :alt: Output from the previous code.
409
415
  :include-source:
410
416
 
411
417
  # You can choose different colors for the real and imaginary parts of the density matrix.
@@ -422,6 +428,7 @@ def plot_state_city(
422
428
  plot_state_city(state, color=['midnightblue', 'crimson'], title="New State City")
423
429
 
424
430
  .. plot::
431
+ :alt: Output from the previous code.
425
432
  :include-source:
426
433
 
427
434
  # You can make the bars more transparent to better see the ones that are behind
@@ -643,6 +650,7 @@ def plot_state_paulivec(state, title="", figsize=None, color=None, ax=None, *, f
643
650
 
644
651
  Examples:
645
652
  .. plot::
653
+ :alt: Output from the previous code.
646
654
  :include-source:
647
655
 
648
656
  # You can set a color for all the bars.
@@ -659,6 +667,7 @@ def plot_state_paulivec(state, title="", figsize=None, color=None, ax=None, *, f
659
667
  plot_state_paulivec(state, color='midnightblue', title="New PauliVec plot")
660
668
 
661
669
  .. plot::
670
+ :alt: Output from the previous code.
662
671
  :include-source:
663
672
 
664
673
  # If you introduce a list with less colors than bars, the color of the bars will
@@ -816,12 +825,13 @@ def plot_state_qsphere(
816
825
 
817
826
  Raises:
818
827
  MissingOptionalLibraryError: Requires matplotlib.
819
- VisualizationError: if input is not a valid N-qubit state.
828
+ VisualizationError: Input is not a valid N-qubit state.
820
829
 
821
830
  QiskitError: Input statevector does not have valid dimensions.
822
831
 
823
832
  Examples:
824
833
  .. plot::
834
+ :alt: Output from the previous code.
825
835
  :include-source:
826
836
 
827
837
  from qiskit import QuantumCircuit
@@ -836,6 +846,7 @@ def plot_state_qsphere(
836
846
  plot_state_qsphere(state)
837
847
 
838
848
  .. plot::
849
+ :alt: Output from the previous code.
839
850
  :include-source:
840
851
 
841
852
  # You can show the phase of each state and use
@@ -291,13 +291,14 @@ def draw(
291
291
  for more details. No default layout is set. (default `None`).
292
292
 
293
293
  Examples:
294
- To visualize a scheduled circuit program, you can call this function with set of
295
- control arguments. Most of appearance of the output image can be controlled by the
294
+ To visualize a scheduled circuit program, you can call this function with a set of
295
+ control arguments. Most of the appearance of the output image can be controlled by the
296
296
  stylesheet.
297
297
 
298
298
  Drawing with the default stylesheet.
299
299
 
300
300
  .. plot::
301
+ :alt: Output from the previous code.
301
302
  :include-source:
302
303
 
303
304
  from qiskit import QuantumCircuit, transpile, schedule
@@ -314,6 +315,7 @@ def draw(
314
315
  Drawing with the simple stylesheet.
315
316
 
316
317
  .. plot::
318
+ :alt: Output from the previous code.
317
319
  :include-source:
318
320
 
319
321
  from qiskit import QuantumCircuit, transpile, schedule
@@ -330,6 +332,7 @@ def draw(
330
332
  Drawing with the stylesheet suited for program debugging.
331
333
 
332
334
  .. plot::
335
+ :alt: Output from the previous code.
333
336
  :include-source:
334
337
 
335
338
  from qiskit import QuantumCircuit, transpile, schedule
@@ -356,7 +359,7 @@ def draw(
356
359
 
357
360
  In the same way as above, you can create custom generator or layout functions
358
361
  and update existing stylesheet with custom functions.
359
- This feature enables you to control the most of appearance of the output image
362
+ This feature enables you to control the most of the appearance of the output image
360
363
  without modifying the codebase of the scheduled circuit drawer.
361
364
  """
362
365
  del show_idle
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: qiskit
3
- Version: 1.3.1
3
+ Version: 1.3.2
4
4
  Summary: An open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
5
5
  Author-email: Qiskit Development Team <qiskit@us.ibm.com>
6
6
  License: Apache 2.0
@@ -94,7 +94,7 @@ To install from source, follow the instructions in the [documentation](https://d
94
94
  Now that Qiskit is installed, it's time to begin working with Qiskit. The essential parts of a quantum program are:
95
95
  1. Define and build a quantum circuit that represents the quantum state
96
96
  2. Define the classical output by measurements or a set of observable operators
97
- 3. Depending on the output, use the primitive function `sampler` to sample outcomes or the `estimator` to estimate values.
97
+ 3. Depending on the output, use the Sampler primitive to sample outcomes or the Estimator primitive to estimate expectation values.
98
98
 
99
99
  Create an example quantum circuit using the `QuantumCircuit` class:
100
100
 
@@ -102,22 +102,22 @@ Create an example quantum circuit using the `QuantumCircuit` class:
102
102
  import numpy as np
103
103
  from qiskit import QuantumCircuit
104
104
 
105
- # 1. A quantum circuit for preparing the quantum state |000> + i |111>
106
- qc_example = QuantumCircuit(3)
107
- qc_example.h(0) # generate superpostion
108
- qc_example.p(np.pi/2,0) # add quantum phase
109
- qc_example.cx(0,1) # 0th-qubit-Controlled-NOT gate on 1st qubit
110
- qc_example.cx(0,2) # 0th-qubit-Controlled-NOT gate on 2nd qubit
105
+ # 1. A quantum circuit for preparing the quantum state |000> + i |111> / √2
106
+ qc = QuantumCircuit(3)
107
+ qc.h(0) # generate superposition
108
+ qc.p(np.pi / 2, 0) # add quantum phase
109
+ qc.cx(0, 1) # 0th-qubit-Controlled-NOT gate on 1st qubit
110
+ qc.cx(0, 2) # 0th-qubit-Controlled-NOT gate on 2nd qubit
111
111
  ```
112
112
 
113
- This simple example makes an entangled state known as a [GHZ state](https://en.wikipedia.org/wiki/Greenberger%E2%80%93Horne%E2%80%93Zeilinger_state) $(|000\rangle + i|111\rangle)/\sqrt{2}$. It uses the standard quantum gates: Hadamard gate (`h`), Phase gate (`p`), and CNOT gate (`cx`).
113
+ This simple example creates an entangled state known as a [GHZ state](https://en.wikipedia.org/wiki/Greenberger%E2%80%93Horne%E2%80%93Zeilinger_state) $(|000\rangle + i|111\rangle)/\sqrt{2}$. It uses the standard quantum gates: Hadamard gate (`h`), Phase gate (`p`), and CNOT gate (`cx`).
114
114
 
115
- Once you've made your first quantum circuit, choose which primitive function you will use. Starting with `sampler`,
115
+ Once you've made your first quantum circuit, choose which primitive you will use. Starting with the Sampler,
116
116
  we use `measure_all(inplace=False)` to get a copy of the circuit in which all the qubits are measured:
117
117
 
118
118
  ```python
119
119
  # 2. Add the classical output in the form of measurement of all qubits
120
- qc_measured = qc_example.measure_all(inplace=False)
120
+ qc_measured = qc.measure_all(inplace=False)
121
121
 
122
122
  # 3. Execute using the Sampler primitive
123
123
  from qiskit.primitives import StatevectorSampler
@@ -127,7 +127,7 @@ result = job.result()
127
127
  print(f" > Counts: {result[0].data["meas"].get_counts()}")
128
128
  ```
129
129
  Running this will give an outcome similar to `{'000': 497, '111': 503}` which is `000` 50% of the time and `111` 50% of the time up to statistical fluctuations.
130
- To illustrate the power of Estimator, we now use the quantum information toolbox to create the operator $XXY+XYX+YXX-YYY$ and pass it to the `run()` function, along with our quantum circuit. Note the Estimator requires a circuit _**without**_ measurement, so we use the `qc_example` circuit we created earlier.
130
+ To illustrate the power of the Estimator, we now use the quantum information toolbox to create the operator $XXY+XYX+YXX-YYY$ and pass it to the `run()` function, along with our quantum circuit. Note that the Estimator requires a circuit _**without**_ measurements, so we use the `qc` circuit we created earlier.
131
131
 
132
132
  ```python
133
133
  # 2. Define the observable to be measured
@@ -137,7 +137,7 @@ operator = SparsePauliOp.from_list([("XXY", 1), ("XYX", 1), ("YXX", 1), ("YYY",
137
137
  # 3. Execute using the Estimator primitive
138
138
  from qiskit.primitives import StatevectorEstimator
139
139
  estimator = StatevectorEstimator()
140
- job = estimator.run([(qc_example, operator)], precision=1e-3)
140
+ job = estimator.run([(qc, operator)], precision=1e-3)
141
141
  result = job.result()
142
142
  print(f" > Expectation values: {result[0].data.evs}")
143
143
  ```
@@ -150,17 +150,17 @@ The power of quantum computing cannot be simulated on classical computers and yo
150
150
  However, running a quantum circuit on hardware requires rewriting to the basis gates and connectivity of the quantum hardware.
151
151
  The tool that does this is the [transpiler](https://docs.quantum.ibm.com/api/qiskit/transpiler), and Qiskit includes transpiler passes for synthesis, optimization, mapping, and scheduling.
152
152
  However, it also includes a default compiler, which works very well in most examples.
153
- The following code will map the example circuit to the `basis_gates = ['cz', 'sx', 'rz']` and a linear chain of qubits $0 \rightarrow 1 \rightarrow 2$ with the `coupling_map =[[0, 1], [1, 2]]`.
153
+ The following code will map the example circuit to the `basis_gates = ["cz", "sx", "rz"]` and a linear chain of qubits $0 \rightarrow 1 \rightarrow 2$ with the `coupling_map = [[0, 1], [1, 2]]`.
154
154
 
155
155
  ```python
156
156
  from qiskit import transpile
157
- qc_transpiled = transpile(qc_example, basis_gates = ['cz', 'sx', 'rz'], coupling_map =[[0, 1], [1, 2]] , optimization_level=3)
157
+ qc_transpiled = transpile(qc, basis_gates=["cz", "sx", "rz"], coupling_map=[[0, 1], [1, 2]], optimization_level=3)
158
158
  ```
159
159
 
160
160
  ### Executing your code on real quantum hardware
161
161
 
162
162
  Qiskit provides an abstraction layer that lets users run quantum circuits on hardware from any vendor that provides a compatible interface.
163
- The best way to use Qiskit is with a runtime environment that provides optimized implementations of `sampler` and `estimator` for a given hardware platform. This runtime may involve using pre- and post-processing, such as optimized transpiler passes with error suppression, error mitigation, and, eventually, error correction built in. A runtime implements `qiskit.primitives.BaseSamplerV2` and `qiskit.primitives.BaseEstimatorV2` interfaces. For example,
163
+ The best way to use Qiskit is with a runtime environment that provides optimized implementations of Sampler and Estimator for a given hardware platform. This runtime may involve using pre- and post-processing, such as optimized transpiler passes with error suppression, error mitigation, and, eventually, error correction built in. A runtime implements `qiskit.primitives.BaseSamplerV2` and `qiskit.primitives.BaseEstimatorV2` interfaces. For example,
164
164
  some packages that provide implementations of a runtime primitive implementation are:
165
165
 
166
166
  * https://github.com/Qiskit/qiskit-ibm-runtime