![]() |
A representation of stabilizer states using the CH form,
cirq.sim.StabilizerStateChForm(
num_qubits: int,
initial_state: int = 0
) -> None
$|\psi> = \omega U_C U_H |s>$
This representation keeps track of overall phase.
Reference: https://arxiv.org/abs/1808.00128
Args | |
---|---|
num_qubits
|
The number of qubits in the system. |
initial_state
|
The computational basis representation of the state as a big endian int. |
Methods
copy
copy() -> "cirq.StabilizerStateChForm"
inner_product_of_state_and_x
inner_product_of_state_and_x(
x: int
) -> Union[float, complex]
Returns the amplitude of x'th element of
the state vector, i.e.
project_Z
project_Z(
q, z
)
Applies a Z projector on the q'th qubit.
Returns: a normalized state with Z_q |psi> = z |psi>
state_vector
state_vector() -> np.ndarray
to_state_vector
to_state_vector() -> np.ndarray
update_sum
update_sum(
t, u, delta=0, alpha=0
)
Implements the transformation (Proposition 4 in Bravyi et al)
i^alpha U_H (|t> + i^delta |u>) = omega W_C W_H |s'>
wave_function
wave_function() -> np.ndarray
THIS FUNCTION IS DEPRECATED.
IT WILL BE REMOVED IN cirq v0.10.0
.
Use state_vector instead.
__eq__
__eq__(
other: _SupportsValueEquality
) -> bool
__ne__
__ne__(
other: _SupportsValueEquality
) -> bool