StabilizerState¶
- class StabilizerState(data, validate=True)[fuente]¶
Bases:
QuantumState
StabilizerState class. Stabilizer simulator using the convention from reference [1]. Based on the internal class
Clifford
.from qiskit import QuantumCircuit from qiskit.quantum_info import StabilizerState, Pauli # Bell state generation circuit qc = QuantumCircuit(2) qc.h(0) qc.cx(0, 1) stab = StabilizerState(qc) # Print the StabilizerState print(stab) # Calculate the StabilizerState measurement probabilities dictionary print (stab.probabilities_dict()) # Calculate expectation value of the StabilizerState print (stab.expectation_value(Pauli('ZZ')))
StabilizerState(StabilizerTable: ['+XX', '+ZZ']) {'00': 0.5, '11': 0.5} 1
Referencias
S. Aaronson, D. Gottesman, Improved Simulation of Stabilizer Circuits, Phys. Rev. A 70, 052328 (2004). arXiv:quant-ph/0406196
Initialize a StabilizerState object.
- Parámetros
or (data (StabilizerState or Clifford or Pauli or QuantumCircuit) – qiskit.circuit.Instruction): Data from which the stabilizer state can be constructed.
validate (boolean) – validate that the stabilizer state data is a valid Clifford.
Methods
Return the conjugate of the operator.
Make a copy of current operator.
Return tuple of input dimension for specified subsystems.
Return True if the two generating sets generate the same stabilizer group.
Evolve a stabilizer state by a Clifford operator.
Return the tensor product stabilzier state other ⊗ self.
Compute the expectation value of a Pauli operator.
Return True if a valid StabilizerState.
Measure subsystems and return outcome and post-measure state.
Return the subsystem measurement probability vector.
Return the subsystem measurement probability dictionary.
Return the purity of the quantum state, which equals to 1, since it is always a pure state.
Reset state or subsystems to the 0-state.
Sample a dict of qubit measurement outcomes in the computational basis.
Sample a list of qubit measurement outcomes in the computational basis.
Set the seed for the quantum state RNG.
Return the tensor product stabilzier state self ⊗ other.
Convert state to matrix operator class
Return the trace of the stabilizer state as a density matrix, which equals to 1, since it is always a pure state.
Attributes
- clifford¶
Return StabilizerState Clifford data
- dim¶
Return total state dimension.
- num_qubits¶
Return the number of qubits if a N-qubit state or None otherwise.