Skip to content

Commit

Permalink
correct rst docstring format
Browse files Browse the repository at this point in the history
  • Loading branch information
tjstavenger-pnnl committed Oct 12, 2023
1 parent f265568 commit e07eba5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 2 additions & 0 deletions c2qa/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,10 @@ def c_multiboson_sampling(self, max):

def gate_from_matrix(self, matrix):
"""Converts matrix into gate. Called using ParameterizedUnitaryGate.
Args:
matrix (list): the (unitary) matrix that you wish to convert into a gate
Returns:
csc_matrix: operator matrix
"""
Expand Down
9 changes: 4 additions & 5 deletions c2qa/parameterized_unitary_gate.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ def __init__(
Args:
op_func (function): function to build operator matrix
params (List): List of parameters to pass to op_func to build
operator matrix (supports instances of Qiskit Parameter to be
bound later)
num_qubits (int): Number of qubits in the operator -- this would
likely equate to (num_qubits_per_qumode * num_qumodes + num_ancilla).
params (List): List of parameters to pass to op_func to build operator matrix (supports instances of Qiskit Parameter to be bound later)
num_qubits (int): Number of qubits in the operator -- this would likely equate to (num_qubits_per_qumode * num_qumodes + num_ancilla).
label (string, optional): Gate name. Defaults to None.
duration (int, optional): Duration of gate used for noise modeling. Defaults to 100.
unit (string, optional): Unit of duration (only supports those allowed by Qiskit).
Expand Down Expand Up @@ -94,9 +91,11 @@ def calculate_matrix(
):
"""Calculate the operator matrix by executing the selected function.
Increment the parameters based upon the current and total steps.
Args:
current_step (int, optional): Current step within total_steps. Defaults to 1.
total_steps (int, optional): Total steps to increment parameters. Defaults to 1.
Returns:
ndarray: operator matrix
"""
Expand Down

0 comments on commit e07eba5

Please sign in to comment.