Skip to content

Commit

Permalink
Fix mypy complaint about int type needing to be complex
Browse files Browse the repository at this point in the history
  • Loading branch information
woodsp-ibm committed May 3, 2024
1 parent 739dda3 commit 067e1fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qiskit_algorithms/gradients/reverse/derive_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def derive_circuit(
gradient = []
for product_rule_term in itertools.product(*summands):
summand_circuit = QuantumCircuit(*circuit.qregs)
c = 1
c = complex(1)
for i, term in enumerate(product_rule_term):
c *= term[0]
summand_circuit.data.append([term[1], *op_context[i]])
Expand Down

0 comments on commit 067e1fb

Please sign in to comment.