cirq.StabilizerStateChForm

class cirq.StabilizerStateChForm(num_qubits: int, initial_state: Union[int, numpy.ndarray] = 0)[source]

A representation of stabilizer states using the CH form,

$|\psi> = \omega U_C U_H |s>$

This representation keeps track of overall phase.

Reference: https://arxiv.org/abs/1808.00128

__init__(num_qubits: int, initial_state: Union[int, numpy.ndarray] = 0) → None[source]

Initializes StabilizerStateChForm

Parameters
  • num_qubits – The number of qubits in the system

  • initial_state – If an int, the state is set to the computational

  • state corresponding to this state. (basis) –

  • an np.ndarray it is the full initial state. (If) –

Methods

copy()

inner_product_of_state_and_x(x)

Returns the amplitude of x’th element of

project_Z(q, z)

Applies a Z projector on the q’th qubit.

to_state_vector()

wave_function()