Spanish
Idiomas
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

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

  1. 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

conjugate

Return the conjugate of the operator.

copy

Make a copy of current operator.

dims

Return tuple of input dimension for specified subsystems.

equiv

Return True if the two generating sets generate the same stabilizer group.

evolve

Evolve a stabilizer state by a Clifford operator.

expand

Return the tensor product stabilzier state other ⊗ self.

expectation_value

Compute the expectation value of a Pauli operator.

is_valid

Return True if a valid StabilizerState.

measure

Measure subsystems and return outcome and post-measure state.

probabilities

Return the subsystem measurement probability vector.

probabilities_dict

Return the subsystem measurement probability dictionary.

purity

Return the purity of the quantum state, which equals to 1, since it is always a pure state.

reset

Reset state or subsystems to the 0-state.

sample_counts

Sample a dict of qubit measurement outcomes in the computational basis.

sample_memory

Sample a list of qubit measurement outcomes in the computational basis.

seed

Set the seed for the quantum state RNG.

tensor

Return the tensor product stabilzier state self ⊗ other.

to_operator

Convert state to matrix operator class

trace

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.