def final_state_vector(
        self,
        *,
        initial_state: cirq.STATE_VECTOR_LIKE = 0,
        qubit_order: cirq.QubitOrderOrList = ops.QubitOrder.DEFAULT,
        ignore_terminal_measurements: bool = False,
        dtype: type[np.complexfloating] = np.complex128,
        param_resolver: cirq.ParamResolverOrSimilarType = None,
        seed: cirq.RANDOM_STATE_OR_SEED_LIKE = None,
    ) -> np.ndarray:
        """Returns the state vector resulting from acting operations on a state.

        This is equivalent to calling cirq.final_state_vector with the same
        arguments and this circuit as the "program".

        Args:
            initial_state: If an int, the state is set to the computational
                basis state corresponding to this state. Otherwise  if this
                is a np.ndarray it is the full initial state. In this case it
                must be the correct size, be normalized (an L2 norm of 1), and
                be safely castable to an appropriate dtype for the simulator.
            qubit_order: Determines the canonical ordering of the qubits. This
                is often used in specifying the initial state, i.e. the
                ordering of the computational basis states.
            qubits_that_should_be_present: Qubits that may or may not appear
                in operations within the circuit, but that should be included
                regardless when generating the matrix.
            ignore_terminal_measurements: When set, measurements at the end of
                the circuit are ignored instead of causing the method to
                fail. Defaults to False.
            dtype: The `numpy.dtype` used by the simulation. Typically one of
                `numpy.complex64` or `numpy.complex128`.
            param_resolver: Parameters to run with the program.
            seed: The random seed to use for this simulator.

        Returns:
            The state vector resulting from applying the given unitary
            operations to the desired initial state. Specifically, a numpy
            array containing 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).

        Raises:
            ValueError: If the program doesn't have a well defined final state
                because it has non-unitary gates.
        """
        from cirq.sim.mux import final_state_vector

        return final_state_vector(
            self,
            initial_state=initial_state,
            param_resolver=param_resolver,
            qubit_order=qubit_order,
            ignore_terminal_measurements=ignore_terminal_measurements,
            dtype=dtype,
            seed=seed,
        )
Returns the state vector resulting from acting operations on a state.

        This is equivalent to calling cirq.final_state_vector with the same
        arguments and this circuit as the "program".

        Args:
            initial_state: If an int, the state is set to the computational
                basis state corresponding to this state. Otherwise  if this
                is a np.ndarray it is the full initial state. In this case it
                must be the correct size, be normalized (an L2 norm of 1), and
                be safely castable to an appropriate dtype for the simulator.
            qubit_order: Determines the canonical ordering of the qubits. This
                is often used in specifying the initial state, i.e. the
                ordering of the computational basis states.
            qubits_that_should_be_present: Qubits that may or may not appear
                in operations within the circuit, but that should be included
                regardless when generating the matrix.
            ignore_terminal_measurements: When set, measurements at the end of
                the circuit are ignored instead of causing the method to
                fail. Defaults to False.
            dtype: The `numpy.dtype` used by the simulation. Typically one of
                `numpy.complex64` or `numpy.complex128`.
            param_resolver: Parameters to run with the program.
            seed: The random seed to use for this simulator.

        Returns:
            The state vector resulting from applying the given unitary
            operations to the desired initial state. Specifically, a numpy
            array containing 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).

        Raises:
            ValueError: If the program doesn't have a well defined final state
                because it has non-unitary gates.
        
cirq-core/cirq/circuits/circuit.py