Skip to content

Commit

Permalink
Match Aer convention for measurement strings
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathfulSpatula committed Oct 5, 2024
1 parent d4fc854 commit c2e16a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pyqrack/qrack_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3849,7 +3849,7 @@ def _add_sample_measure(self, sample_qubits, sample_clbits, num_samples):
qubit_outcome << clbit
)

data.append(hex(int(bin(self._classical_memory)[2:], 2)))
data.append(bin(self._classical_memory)[2:].zfill(self.num_qubits()))

return data

Expand Down Expand Up @@ -3940,7 +3940,7 @@ def run_qiskit_circuit(self, experiment, shots=1):
self._apply_op(operation)

if not self._sample_measure and (len(self._sample_qubits) > 0):
_data += [hex(int(bin(self._classical_memory)[2:], 2))]
_data += [bin(self._classical_memory)[2:].zfill(self.num_qubits())]
self._sample_qubits = []
self._sample_clbits = []
self._sample_cregbits = []
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup


VERSION = "1.30.31"
VERSION = "1.30.32"

# Read long description from README.
README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.md')
Expand Down

0 comments on commit c2e16a5

Please sign in to comment.