Skip to content

Commit

Permalink
A couple of bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
yapolyak committed Mar 11, 2024
1 parent 5a0f418 commit f6fce3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ def __init__(
loglevel: Internal logger output level.
"""
self._logger = set_logger("GeneralState", loglevel)
self._circuit = circuit.replace_implicit_wire_swaps()
self._circuit = circuit
self._circuit.replace_implicit_wire_swaps()
self._handle = libhandle.handle
self._dev = libhandle.dev

Expand Down
2 changes: 1 addition & 1 deletion tests/test_general_state_operator_expval.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def to_bool_tuple(n_qubits: int, x: int) -> tuple:

with CuTensorNetHandle() as libhandle:
state = GeneralState(ket_circ, libhandle)
oper = GeneralOperator(op, 2, libhandle)
oper = GeneralOperator(op, n_qubits, libhandle)
ev = GeneralExpectationValue(state, oper, libhandle)
ovl, state_norm = ev.configure().prepare().compute()
ev.destroy()
Expand Down

0 comments on commit f6fce3b

Please sign in to comment.