atlas_q.stabilizer_backend.StabilizerState#

class atlas_q.stabilizer_backend.StabilizerState(n_qubits, tableau)[source]#

Bases: object

Stabilizer state represented as a tableau

A stabilizer state on n qubits is represented by a (2n+1) × 2n binary matrix: - First n rows: X part of stabilizer generators - Next n rows: Z part of stabilizer generators - Last column: phase bits (±1)

Example for |0⟩: stabilizer is Z Example for |+⟩: stabilizer is X Example for Bell |Φ+⟩: stabilizers are XX and ZZ

Methods

copy()

Create a copy of this state

init_plus(n_qubits)

Initialize |++...+⟩ state (stabilized by X on each qubit)

init_zero(n_qubits)

Initialize |00...0⟩ state (stabilized by Z on each qubit)

__init__(n_qubits, tableau)#

Methods

__init__(n_qubits, tableau)

copy()

Create a copy of this state

init_plus(n_qubits)

Initialize |++...+⟩ state (stabilized by X on each qubit)

init_zero(n_qubits)

Initialize |00...0⟩ state (stabilized by Z on each qubit)

Attributes

n_qubits: int#
tableau: ndarray#
static init_zero(n_qubits)[source]#

Initialize |00…0⟩ state (stabilized by Z on each qubit)

static init_plus(n_qubits)[source]#

Initialize |++…+⟩ state (stabilized by X on each qubit)

copy()[source]#

Create a copy of this state