diff --git a/CHANGELOG.md b/CHANGELOG.md index a9bb7301..92006a68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ ### Breaking changes 💔 +* The ``qml.QubitStateVector`` template has been removed. Instead, use :class:`~pennylane.StatePrep`. + [(#601)](https://github.com/PennyLaneAI/pennylane-qiskit/pull/601) + ### Deprecations 👋 ### Documentation 📝 @@ -16,6 +19,8 @@ This release contains contributions from (in alphabetical order): +Andrija Paurevic + --- # Release 0.39.0 diff --git a/doc/conf.py b/doc/conf.py index 68acb948..616fbb61 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -293,7 +293,6 @@ "of Google Inc." ], "toc_overview": True, - "navbar_active_link": 3, "google_analytics_tracking_id": "G-C480Z9JL0D" } diff --git a/pennylane_qiskit/converter.py b/pennylane_qiskit/converter.py index 938a3a3b..d55a966b 100644 --- a/pennylane_qiskit/converter.py +++ b/pennylane_qiskit/converter.py @@ -61,7 +61,6 @@ "CRY": lib.CRYGate, "CRZ": lib.CRZGate, "PhaseShift": lib.PhaseGate, - "QubitStateVector": lib.Initialize, "StatePrep": lib.Initialize, "Toffoli": lib.CCXGate, "QubitUnitary": lib.UnitaryGate, @@ -527,7 +526,7 @@ def _function(*args, params: dict = None, wires: list = None, **kwargs): elif instruction_name in inv_map: operation_class = getattr(pennylane_ops, inv_map[instruction_name]) operation_args.extend(operation_params) - if operation_class in (qml.QubitStateVector, qml.StatePrep): + if operation_class is qml.StatePrep: operation_args = [np.array(operation_params)] elif isinstance(instruction, Measure): @@ -747,7 +746,7 @@ def operation_to_qiskit(operation, reg, creg=None): # Need to revert the order of the quantum registers used in # Qiskit such that it matches the PennyLane ordering - if operation in ("QubitUnitary", "QubitStateVector", "StatePrep"): + if operation in ("QubitUnitary", "StatePrep"): qregs = list(reversed(qregs)) if creg: diff --git a/pennylane_qiskit/qiskit_device_legacy.py b/pennylane_qiskit/qiskit_device_legacy.py index 11b72451..33d2c4a0 100644 --- a/pennylane_qiskit/qiskit_device_legacy.py +++ b/pennylane_qiskit/qiskit_device_legacy.py @@ -301,7 +301,7 @@ def apply_operations(self, operations): qregs = [self._reg[i] for i in device_wires.labels] - if operation in ("QubitUnitary", "QubitStateVector", "StatePrep"): + if operation in ("QubitUnitary", "StatePrep"): # Need to revert the order of the quantum registers used in # Qiskit such that it matches the PennyLane ordering qregs = list(reversed(qregs)) @@ -327,9 +327,9 @@ def qubit_state_vector_check(self, operation): operation (pennylane.Operation): operation to be checked Raises: - DeviceError: If the operation is QubitStateVector or StatePrep + DeviceError: If the operation is StatePrep """ - if operation in ("QubitStateVector", "StatePrep"): + if operation == "StatePrep": if self._is_unitary_backend: raise DeviceError( f"The {operation} operation "