Skip to content

Commit

Permalink
Merge branch 'doc-fix' of https://github.com/qiboteam/qibotn into doc…
Browse files Browse the repository at this point in the history
…-fix
  • Loading branch information
Tankya2 committed Mar 4, 2024
2 parents e6a3060 + 014a39c commit 7c7d860
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions src/qibotn/circuit_convertor.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self, circuit, dtype="complex128"):
def state_vector_operands(self):
"""Create the operands for dense vector computation in the interleave
format.
Parameters:
None
Returns:
Operands for the contraction in the interleave format.
"""
Expand Down Expand Up @@ -88,11 +88,11 @@ def _parse_gates_to_mode_labels_operands(
return mode_labels, operands

def op_shape_from_qubits(self, nqubits):
"""Modify tensor to cuQuantum shape
"""Modify tensor to cuQuantum shape.
Parameters:
nqubits (int): The number of qubits in quantum circuit.
Returns:
(qubit_states,input_output) * nqubits
"""
Expand Down
30 changes: 15 additions & 15 deletions src/qibotn/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
def dense_vector_tn(qibo_circ, datatype):
"""Convert qibo circuit to tensornet (TN) format and perform contraction to
dense vector.
Parameters:
qibo_circ: The quantum circuit object.
datatype (str): Either single ("complex64") or double (complex128) precision.
Expand All @@ -25,12 +25,12 @@ def dense_vector_tn(qibo_circ, datatype):
def expectation_pauli_tn(qibo_circ, datatype, pauli_string_pattern):
"""Convert qibo circuit to tensornet (TN) format and perform contraction to
expectation of given Pauli string.
Parameters:
qibo_circ: The quantum circuit object.
datatype (str): Either single ("complex64") or double (complex128) precision.
pauli_string_pattern(str): pauli string pattern.
Returns:
Expectation of quantum circuit due to pauli string.
"""
Expand All @@ -52,12 +52,12 @@ def dense_vector_tn_MPI(qibo_circ, datatype, n_samples=8):
the least costly contraction path. This is sped up with multi
thread. After pathfinding the optimal path is used in the actual
contraction to give a dense vector representation of the TN.
Parameters:
qibo_circ: The quantum circuit object.
datatype (str): Either single ("complex64") or double (complex128) precision.
n_samples(int): Number of samples for pathfinding.
Returns:
Dense vector of quantum circuit.
"""
Expand Down Expand Up @@ -127,12 +127,12 @@ def dense_vector_tn_nccl(qibo_circ, datatype, n_samples=8):
the least costly contraction path. This is sped up with multi
thread. After pathfinding the optimal path is used in the actual
contraction to give a dense vector representation of the TN.
Parameters:
qibo_circ: The quantum circuit object.
datatype (str): Either single ("complex64") or double (complex128) precision.
n_samples(int): Number of samples for pathfinding.
Returns:
Dense vector of quantum circuit.
"""
Expand Down Expand Up @@ -216,13 +216,13 @@ def expectation_pauli_tn_nccl(qibo_circ, datatype, pauli_string_pattern, n_sampl
select the least costly contraction path. This is sped up with multi
thread. After pathfinding the optimal path is used in the actual
contraction to give an expectation value.
Parameters:
qibo_circ: The quantum circuit object.
datatype (str): Either single ("complex64") or double (complex128) precision.
pauli_string_pattern(str): pauli string pattern.
n_samples(int): Number of samples for pathfinding.
Returns:
Expectation of quantum circuit due to pauli string.
"""
Expand Down Expand Up @@ -308,13 +308,13 @@ def expectation_pauli_tn_MPI(qibo_circ, datatype, pauli_string_pattern, n_sample
select the least costly contraction path. This is sped up with multi
thread. After pathfinding the optimal path is used in the actual
contraction to give an expectation value.
Parameters:
qibo_circ: The quantum circuit object.
datatype (str): Either single ("complex64") or double (complex128) precision.
pauli_string_pattern(str): pauli string pattern.
n_samples(int): Number of samples for pathfinding.
Returns:
Expectation of quantum circuit due to pauli string.
"""
Expand Down Expand Up @@ -378,12 +378,12 @@ def expectation_pauli_tn_MPI(qibo_circ, datatype, pauli_string_pattern, n_sample
def dense_vector_mps(qibo_circ, gate_algo, datatype):
"""Convert qibo circuit to matrix product state (MPS) format and perform
contraction to dense vector.
Parameters:
qibo_circ: The quantum circuit object.
gate_algo(dict): Dictionary for SVD and QR settings.
datatype (str): Either single ("complex64") or double (complex128) precision.
Returns:
Dense vector of quantum circuit.
"""
Expand All @@ -402,10 +402,10 @@ def pauli_string_gen(nqubits, pauli_string_pattern):
Parameters:
nqubits(int): Number of qubits of Quantum Circuit
pauli_string_pattern(str): Strings representing sequence of pauli gates.
Returns:
String representation of the actual pauli string from the pattern.
Example: pattern: "XZ", number of qubit: 7, output = XZXZXZX
"""
if nqubits <= 0:
Expand Down

0 comments on commit 7c7d860

Please sign in to comment.