ChpSim.ChpStateType
ChpState(num_qubits[, bitpack=true])

The state of a quantum stabilizer circuit simulation. I.e. the simulated state of a quantum computer after applying only Clifford operations to qubits that all start in the |0⟩ state.

Supported operations: cnot!, hadamard!, phase!, measure!

ChpSim.MeasureResultType
MeasureResult(value, determined)

The result of a qubit measurement returned by measure!.

ChpSim.cnot!Method
cnot!(state, control, target)

Perform a CNOT gate and update the state.

ChpSim.hadamard!Method
hadamard!(state, qubit)

Perform a Hadamard gate and update the state.

ChpSim.measure!Method
measure!(state, qubit; rng=GLOBAL_RNG, bias=0.5)

Perform a measurement in the Z basis and return the result. If the qubit was in superposition, pick a random result and update the state.

Arguments

  • qubit::Int: The qubit index to measure.
  • rng::AbstractRNG: The random number generator to use.
  • bias::Real: The artificial probablility of measuring a 1 randomly.
ChpSim.phase!Method
phase!(state, qubit)

Perform a phase gate (S gate) and update the state.