final_wavefunction: Final wavefunction

Description Usage Arguments Details Value See Also

View source: R/sampling_simulations.R

Description

Returns the state vector resulting from acting operations on a state.

Usage

1

Arguments

program

The circuit, gate, operation, or tree of operations to apply to the initial state in order to produce the result.

...

additional parameters to pass.

Details

By default the input state is the computational basis zero state, in which case the output is just the first column of the implied unitary matrix.

Value

The wavefunction resulting from applying the given unitary operations to the desired initial state. Specifically, a numpy array containing the the amplitudes in np.kron order, where the order of arguments to kron is determined by the qubit order argument (which defaults to just sorting the qubits that are present into an ascending order).

See Also

Other Sampling, Simulations and Data collection: big_endian_bits_to_int(), big_endian_digits_to_int(), big_endian_int_to_bits(), big_endian_int_to_digits(), circuit_like(), final_density_matrix(), flatten_to_ops_or_moments(), flatten_to_ops(), flatten_with_params(), flatten_with_sweep(), flatten(), hog_score_xeb_fidelity_from_probabilities(), measure_density_matrix(), measure_state_vector(), random_state_or_seed_like(), sample_density_matrix(), sample_state_vector(), sample_sweep(), sample(), to_resolvers(), to_sweep(), validate_mixture()


henry090/Cirq documentation built on June 13, 2020, 1:28 a.m.