Skip to content

Commit

Permalink
fix lib_comb circuit
Browse files Browse the repository at this point in the history
  • Loading branch information
t-imamichi committed Dec 7, 2022
1 parent db67cb9 commit f11b71d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions qiskit/algorithms/gradients/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ def _make_lin_comb_gradient_circuit(
]

circuit2 = transpile(circuit, basis_gates=supported_gates, optimization_level=0)
qr_aux = QuantumRegister(1, "aux")
cr_aux = ClassicalRegister(1, "aux")
qr_aux = QuantumRegister(1, "qr_aux")
cr_aux = ClassicalRegister(1, "cr_aux")
circuit2.add_register(qr_aux)
circuit2.add_bits(cr_aux)
circuit2.add_register(cr_aux)
circuit2.h(qr_aux)
circuit2.data.insert(0, circuit2.data.pop())
circuit2.sdg(qr_aux)
Expand Down

0 comments on commit f11b71d

Please sign in to comment.