Skip to content

Commit

Permalink
function for returning M
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirmay authored Apr 10, 2024
1 parent 9695872 commit c9b856f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion qiskit/circuit/library/data_preparation/state_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,13 +534,17 @@ def _define(self):

return qc

def M(self):
"""Returns the M value used by the gate"
return self._M
def num_qubits(self):
"""Returns the number of qubits used by the gate."""
return self._num_qubits
def __repr__(self):
"""Returns a string representation of the gate."""
return f"Generalized_Uniform_Superposition_Gate(M={self.M}, num_qubits={self._num_qubits})"
return f"Generalized_Uniform_Superposition_Gate(M={self._M}, num_qubits={self._num_qubits})"
def broadcast_arguments(self, qargs, cargs):
"""Validates and handles the arguments."""
Expand Down

0 comments on commit c9b856f

Please sign in to comment.