Skip to content

Commit 0fbb09b

Browse files
committed
docs(tableau-algebra): highlight canonicalization input requirements
1 parent 686b75c commit 0fbb09b

4 files changed

Lines changed: 17 additions & 2 deletions

File tree

‎crates/tableau_algebra/src/canonical.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ use crate::rows::{forward_pass, has_x, has_z};
77

88
/// Reduce all X columns, then all Z columns, in place.
99
///
10+
/// > **Warning:** Requires a valid full-rank frame: `n` destabilizers followed by
11+
/// > their `n` paired stabilizers on `n` qubits (`2n × n` Pauli entries).
12+
/// > Stabilizer-only and rank-deficient tableaux are unsupported.
13+
///
1014
/// This is QuantumClifford's `canonicalize!` form, used there for stabilizer
1115
/// inner products (Garcia et al., 2012). Returns `(x_rank, total_rank)`, the
1216
/// numbers of pivots after the X pass and after both passes. For a valid

‎crates/tableau_algebra/src/clipped.rs‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ use crate::rows::{multiply, site, swap};
88

99
/// Put a pure stabilizer state in the clipped gauge, in place.
1010
///
11+
/// > **Warning:** Requires a valid full-rank frame: `n` destabilizers followed by
12+
/// > their `n` paired stabilizers on `n` qubits (`2n × n` Pauli entries).
13+
/// > Stabilizer-only and rank-deficient tableaux are unsupported.
14+
///
1115
/// This is QuantumClifford's `canonicalize_clip!` form (Nahum et al., 2017;
1216
/// Li et al., 2019, Appendix A). A left-to-right pass fixes the left endpoints;
1317
/// a right-to-left pass shortens the rows while preserving those endpoints.
@@ -16,7 +20,7 @@ use crate::rows::{multiply, site, swap};
1620
/// different nonidentity Paulis there.
1721
///
1822
/// Endpoint pairs describe the state's entanglement across cuts in the qubit
19-
/// ordering. The input must be a valid full-rank pure-state frame.
23+
/// ordering.
2024
///
2125
/// ```
2226
/// use ppvm_tableau_2::Tableau;

‎crates/tableau_algebra/src/gottesman.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ pub struct GottesmanForm {
2222

2323
/// Put the stabilizers in Gottesman's standard form, reordering qubits.
2424
///
25+
/// > **Warning:** Requires a valid full-rank frame: `n` destabilizers followed by
26+
/// > their `n` paired stabilizers on `n` qubits (`2n × n` Pauli entries).
27+
/// > Stabilizer-only and rank-deficient tableaux are unsupported.
28+
///
2529
/// Like QuantumClifford's `canonicalize_gott!`, first reduce X and move its
2630
/// pivot columns to the left. Then reduce Z on the remaining columns and
2731
/// move those pivots next. The pivot blocks are identity matrices. This form
@@ -30,7 +34,6 @@ pub struct GottesmanForm {
3034
///
3135
/// Both halves of the frame follow the qubit permutations. These are physical
3236
/// qubit reorderings, so use the returned permutations to track qubit labels.
33-
/// This API accepts a pure-state frame, with one stabilizer per qubit.
3437
///
3538
/// ```
3639
/// use ppvm_tableau_2::Tableau;

‎crates/tableau_algebra/src/rref.rs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ use crate::rows::{eliminate, has_x, has_z, site, swap};
77

88
/// Reduce selected qubit columns, alternating X and Z elimination.
99
///
10+
/// > **Warning:** Requires a valid full-rank frame: `n` destabilizers followed by
11+
/// > their `n` paired stabilizers on `n` qubits (`2n × n` Pauli entries).
12+
/// > Stabilizer-only and rank-deficient tableaux are unsupported.
13+
///
1014
/// This is QuantumClifford's `canonicalize_rref!` form (Audenaert and Plenio,
1115
/// 2005). Pivots go at the bottom. Returns the number of leading stabilizer
1216
/// rows that are identity on every selected qubit. Those rows generate the

0 commit comments

Comments
 (0)