Skip to content

Commit 071ae91

Browse files
committed
docs: Describe test measurements as slots, not columns
1 parent f69629e commit 071ae91

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎test/unit_tests/braket/default_simulator/openqasm/test_interpreter.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2151,7 +2151,7 @@ def test_basis_rotation_hermitian():
21512151

21522152

21532153
class Slot(NamedTuple):
2154-
"""One measurement column: which register element reports which qubit."""
2154+
"""One measurement slot: which register element reports which qubit."""
21552155

21562156
register: str | None
21572157
element: int
@@ -2366,8 +2366,8 @@ def test_unused_register_does_not_count():
23662366

23672367

23682368
def test_remeasure_into_scalar_bit_keeps_last_only():
2369-
"""Measuring twice into the same bit replaces its source; the earlier measurement
2370-
is applied to the state but is not a column."""
2369+
"""Measuring twice into the same bit replaces its source. The earlier measurement
2370+
is applied to the state but is not a measurement slot."""
23712371
qasm = "\n".join(
23722372
[
23732373
"bit b;",

‎test/unit_tests/braket/default_simulator/test_mcm.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@ def test_simple_conditional_feedforward(self, simulator):
26142614
assert 0.4 < counter["00"] / 1000 < 0.6
26152615

26162616
def test_scalar_bit_mcm_reports_only_the_measured_qubit(self, simulator):
2617-
"""A scalar ``bit`` destination is a one-element register and one column."""
2617+
"""A scalar ``bit`` destination is a one-element register and one measurement slot."""
26182618
qasm = """
26192619
OPENQASM 3.0;
26202620
bit b;
@@ -3365,7 +3365,7 @@ def test_measure_only_in_if_branch_z(self, simulator):
33653365
"""
33663366
result = simulator.run_openqasm(OpenQASMProgram(source=qasm, inputs={}), shots=1000)
33673367
counter = Counter(["".join(m) for m in result.measurements])
3368-
# b[0] is deterministically 0, so b[1] is never measured and has no column
3368+
# b[0] is deterministically 0, so b[1] is never measured and has no measurement slot
33693369
assert counter == {"0": 1000}
33703370

33713371

@@ -4554,7 +4554,7 @@ def test_flush_when_already_branched(self, simulator):
45544554
# Verify we get both b[0]=0 and b[0]=1 branches
45554555
assert len(counter) >= 1
45564556
for outcome in counter:
4557-
# b[1] (middle column) is always '0' since q[1] is never modified
4557+
# b[1] (the middle bit of each shot) is always '0' since q[1] is never modified
45584558
assert outcome[1] == "0"
45594559

45604560

@@ -4609,7 +4609,7 @@ def test_gate_on_measured_qubit_before_control_flow(self, simulator):
46094609
assert len(result.measurements) == 1000
46104610
counter = Counter(["".join(m) for m in result.measurements])
46114611
# b should be roughly 50/50 since q[0] was in superposition
4612-
# Output is 2 columns (full qubit state from branched simulation)
4612+
# Only b is measured, so each shot reports one bit
46134613
assert len(counter) >= 2
46144614

46154615
def test_reset_on_measured_qubit_flushes_pending(self, simulator):

0 commit comments

Comments
 (0)