pygsti.tools.errgenproptools.slow_bulk_amplitude_of_state

pygsti.tools.errgenproptools.slow_bulk_amplitude_of_state#

slow_bulk_amplitude_of_state(tableau, desired_states, only_phase)#

Get the amplitudes particular computational basis state fors given stabilizer state.

Note: This is a pure python implementation of this function. For best performance see the optimized cython implementation tools.fasterrgencalc.fast_bulk_amplitude_of_state.

Parameters:
  • tableau (stim.Tableau or stim.TableauSimulator) – Stim tableau corresponding to the stabilizer state we wish to extract the amplitude from. If a stim.TableauSimulator it is assumed that this simulator has already had the appropriate inverse tableau value instantiated.

  • desired_states (iterable of str or stim.PauliString) – If a string, then a series of of 0’s and 1’s corresponding to the computational basis state to extract the amplitude for. If a stim.PauliString then the paulis operator which maps the all-zero state to the target computational basis state.

  • only_phase (bool) – If True then on the phase of the complex amplitude is returned. In many cases this phase is the only information required, and for many qubits amplitude of any given state may underflow.

Returns:

amplitude – Amplitude of the desired computational basis state for a given stabilizer state.

Return type:

complex