pub struct CheatedWrapper {
    pub internal: Cheated,
}
Expand description

Collected information for executing a cheated measurement.

Fields

internal: Cheated

Internal storage of [roqoqo::Cheated]

Implementations

Create an new Cheated 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. input (CheatedInput): The additional input information required for measurement.

Returns: Cheated: The new measurement.

Execute the cheated measurement.

Args: input_bit_registers (dict[str, Union[list[list[int]], list[listbool]]]): The classical bit registers with the register name as key. float_registers (dict[str, list[list[float]]): The classical float registers as a dictionary with the register name as key. complex_registers (dict[str, list[list[complex]]): The classical complex registers as a dictionary with the register name as key.

Returns: Optional[dict[str, float]: The evaluated expectation values.

Raises: RuntimeError: Unexpected repetition of key in bit_register. RuntimeError: Error evaluating cheated measurement.

Return the collection of quantum circuits for the separate cheated measurements.

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 measurement input data defining how to construct expectation values from measurements.

Returns: CheatedInput: The input of Cheated measurement

Returns the type of the measurement in string form.

Returns: str: The type of the measurement.

Return copy of Measurement with symbolic parameters replaced.

Arguments: 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 Cheated measurement to json form.

Returns: str: The serialized Cheated measurement.

Raises: RuntimeError: Unexpected error serializing Cheated.

Deserialize the Cheated measurement from json form.

Returns: Cheated: The deserialized Cheated Measurement.

Raises: RuntimeError: Cannot deserialize string to Cheated.

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.