QrStatevector module
- class QrStatevector
Implements the Quantum Rings Statevector class
- QrStatevector(data, dims, *args, **kwargs)
Initialize a Quantum Rings statevector object.
- Args:
- data: Data from which the statevector can be constructed. This can be either a complexvector,
QuantumCircuit
orInstruction
. If the data is a circuit or instruction,the statevector is constructed by assuming that all qubits are initialized to thezero state.dims: The subsystem dimension of the state (usually 2).
- data()
- Returns:
- np.ndarray: The complex statevector.
- sample_memory(shots: int, qargs: list)
Sample a list of qubit measurement outcomes in the computational basis.
- Args:
- shots (int): number of samples to generate.qargs (None or list): qubits to sample measurements for, if None sample measurement of all qubits (Default: None).
- Returns:
- np.array: list of sampled counts if the order sampled.