Möttönen State Preparation¶
This module implements the state preparation scheme defined by Möttönen et. al. (http://dl.acm.org/citation.cfm?id=2011670.2011675)
- dc_qiskit_algorithms.MöttönenStatePreparation.get_alpha_z(omega, n, k)[source]¶
Computes the rotation angles alpha for the z-rotations
- Parameters
omega (
dok_matrix) – the input phasen (
int) – total number of qubitsk (
int) – current qubit
- Return type
dok_matrix- Returns
a sparse vector
- dc_qiskit_algorithms.MöttönenStatePreparation.get_alpha_y(a, n, k)[source]¶
Computes the rotation angles alpha for the y-rotations
- Parameters
a (
dok_matrix) – the input absolute valuesn (
int) – total number of qubitsk (
int) – current qubit
- Return type
dok_matrix- Returns
a sparse vector
- class dc_qiskit_algorithms.MöttönenStatePreparation.RZGateNegatedAngle(phi)[source]¶
Bases:
qiskit.circuit.library.standard_gates.rz.RZGate
- class dc_qiskit_algorithms.MöttönenStatePreparation.RYGateNegatedAngle(phi)[source]¶
Bases:
qiskit.circuit.library.standard_gates.ry.RYGate
- class dc_qiskit_algorithms.MöttönenStatePreparation.MöttönenStatePreparationGate(vector, neglect_absolute_value=False)[source]¶
Bases:
qiskit.circuit.gate.GateUniform rotation Y gate (Möttönen).
- dc_qiskit_algorithms.MöttönenStatePreparation.state_prep_möttönen(self, a, qubits)[source]¶
Convenience function to encapsulate the composite gate of the state preparation
- Parameters
self (
QuantumCircuit) – Quantum circuit to apply this toa (
Union[List[float],dok_matrix]) – the input vectorqubits (
Union[List[Qubit],QuantumRegister]) – the qubits to be transformed
- Return type
Instruction- Returns
gate just added
- dc_qiskit_algorithms.MöttönenStatePreparation.state_prep_möttönen_dg(self, a, qubits)[source]¶
Convenience function to encapsulate the composite gate of the dagger of the state preparation
- Parameters
self (
QuantumCircuit) – Composite Gate or Quantum circuit to apply this toa (
Union[List[float],dok_matrix]) – the input vectorqubits (
Union[List[Qubit],QuantumRegister]) – the qubits to be transformed
- Return type
Instruction- Returns
gate or instruction set