pub struct ClassicalRegisterWrapper {
    pub internal: ClassicalRegister,
}
Expand description

Collected information for executing a classical register.

Fields

internal: ClassicalRegister

Internal storage of [roqoqo::ClassicalRegister].

Implementations

Create an new ClassicalRegister measurement.

Args: constant_circuit (OptionalCircuit): The constant Circuit that is executed before each Circuit in circuits. circuits (listCircuit): The collection of quantum circuits executed for the measurement.

Returns: ClassicalRegister: The new register.

Return the collection of quantum circuits that make up the total measurement.

Returns: listCircuit: The quantum circuits.

Returns constant circuit that is executed before any Circuit in circuits.

Returns: OptionalCircuit: The constant Circuit (None if not defined).

Returns the type of the measurement in string form.

Returns: str: The type of the measurement.

Return copy of Measurement with symbolic parameters replaced.

Args: substituted_parameters (dict[str, float]): The dictionary containing the substitutions to use in the Circuit.

Raises: RuntimeError: Error substituting symbolic parameters.

Return the name of the measurement and the bincode representation of the Measurement using the bincode crate.

Returns: (str, ByteArray): Name and serialized measurement (in bincode form).

Raises: ValueError: Cannot serialize Measurement to bytes.

Serialize the ClassicalRegister measurement to json form.

Returns: str: The serialized ClassicalRegister measurement.

Raises: PyRuntimeError: Unexpected error serializing ClassicalRegister.

Deserialize the ClassicalRegister measurement from json form.

Returns: ClassicalRegister: The deserialized ClassicalRegister Measurement.

Raises: PyRuntimeError: Cannot deserialize string to ClassicalRegister.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Specify this class has #[pyclass(dict)] or not.

Specify this class has #[pyclass(weakref)] or not.

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict. Read more

Class doc string

#[pyclass(gc)]

#[pyclass(subclass)]

#[pyclass(extends=…)]

Layout

Base class

This handles following two situations: Read more

Utility type to make Py::as_ref work.

Class name.

Module name, if any.

PyTypeObject instance for this type.

Checks if object is an instance of this type or a subclass of this type.

Checks if object is an instance of this type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Extracts Self from the source PyObject.

Performs the conversion.

Arguments for exception

Returns the safe abstraction over the type object.

Should always be Self

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more

Checks if self is actually part of its subset T (and can be converted to it).

Use with care! Same as self.to_subset but without any property checks. Always succeeds.

The inclusion map: converts self to the equivalent element of its superset.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.