From a2e6ca0c0b09aeca00386c8dc04f694007bb5dd5 Mon Sep 17 00:00:00 2001 From: Hirmay Sandesara <56473003+Hirmay@users.noreply.github.com> Date: Sat, 22 Jun 2024 23:13:23 +0530 Subject: [PATCH] Update state_preparation.py incorporated Julien's changes! --- .../circuit/library/data_preparation/state_preparation.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/qiskit/circuit/library/data_preparation/state_preparation.py b/qiskit/circuit/library/data_preparation/state_preparation.py index be0a5379fd04..3284b8dd4f5c 100644 --- a/qiskit/circuit/library/data_preparation/state_preparation.py +++ b/qiskit/circuit/library/data_preparation/state_preparation.py @@ -451,8 +451,8 @@ def __init__( num_superpos_states (int): A positive integer M = num_superpos_states (> 1) representing the number of computational basis states with an amplitude of 1/sqrt(M) in the uniform superposition - state ($\frac{1}{\sqrt{M}} \sum_{j=0}^{M-1} \ket{j} $, where - $1< M <= 2^n$). Note that the remaining (2^n - M) computational basis + state (:math:`\frac{1}{\sqrt{M}} \sum_{j=0}^{M-1} \ket{j}`, where + :math:`1< M <= 2^n`). Note that the remaining (2^n - M) computational basis states have zero amplitudes. Here M need not be an integer power of 2. num_qubits (int): @@ -477,8 +477,6 @@ def _define(self): """ Defines the gate operation. - Returns: - QuantumCircuit: The quantum circuit implementing the gate. """ qreg = QuantumRegister(self._num_qubits, "q") qc = QuantumCircuit(self._num_qubits)