Skip to content

Commit

Permalink
feat: make statevector calculation optional
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoRobbiati committed Feb 3, 2025
1 parent 67b900b commit 08ad49e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/qibotn/backends/qmatchatea.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def execute_circuit(
initial_state=None,
nshots=None,
prob_type="U",
return_array=False,
**prob_kwargs,
):
"""Execute a Qibo quantum circuit using tensor network simulation.
Expand Down Expand Up @@ -153,7 +154,7 @@ def execute_circuit(
observables=observables,
)

if circuit.num_qubits < 20:
if circuit.num_qubits < 20 and return_array:
statevector = results.statevector
else:
statevector = None
Expand Down

0 comments on commit 08ad49e

Please sign in to comment.