Documentation for BGLS#

Indices and tables#

Bgls Simulator#

class bgls.Simulator(initial_state: State, apply_op: Callable[[Operation, State], None], compute_probability: Callable[[State, str], float], seed: Any = None)#
run(program: cirq.AbstractCircuit, param_resolver: cirq.ParamResolverOrSimilarType = None, repetitions: int = 1) cirq.Result#

Samples from the given Circuit.

This mode of operation for a sampler will provide results in the form of measurement outcomes. It will not provide access to state vectors (even if the underlying sampling mechanism is a simulator). This method will substitute parameters in the param_resolver attributes for sympy.Symbols used within the Circuit. This circuit will be executed a number of times specified in the repetitions attribute, though some simulated implementations may instead sample from the final distribution rather than execute the circuit each time.

Args:

program: The circuit to sample from. param_resolver: Parameters to run with the program. repetitions: The number of times to sample.

Returns:

cirq.Result that contains all the measurements for a run.