pub struct BasisRotationWrapper {
    pub internal: BasisRotation,
}
Expand description

Collected information for executing a basis rotation measurement.

Fields

internal: BasisRotation

Internal storage of [roqoqo::BasisRotation].

Implementations

Create a new BasisRotation measurement.

Args: constant_circuit (OptionalCircuit): The constant Circuit that is executed before each Circuit in circuits. circuits (listCircuit): The collection of quantum circuits for the separate basis rotations. input (BasisRotationInput): The additional input information required for measurement.

Returns: BasisRotation: The BasisRotation containing the new basis rotation measurement.

Execute the basis rotation 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 measurement.

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

Return the collection of quantum circuits for the separate basis rotations.

Returns: listCircuit: The quantum circuits.

Return 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: BasisRotationInput: The measurment input of BasisRotation.

Returns the type of the measurement in string form.

Returns: str: The type of the measurement.

Return clone of Measurement with symbolic parameters replaced.

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

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 BasisRotation to json form using the serde_json crate.

Returns: str: The serialized BasisRotation.

Raises: RuntimeError: Unexpected error serializing BasisRotation.

Deserialize the BasisRotation from json form using the serde_json crate.

Returns: BasisRotation: The deserialized BasisRotation.

Raises: RuntimeError: Cannot deserialize string to BasisRotation.

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.