SYMBOL INDEX (2651 symbols across 231 files) FILE: benchmark/benchmark-unitary.py function phase_shift (line 42) | def phase_shift(n_mode, theta): FILE: benchmark/benchmark_QML-DE-solver.py function F (line 42) | def F(u_prime, u, x): # DE: F(u_prime, u, x) = 0 function calc (line 81) | def calc(circuit, input_state, coefs): function computation (line 87) | def computation(params): function test_QML_DE_solver (line 140) | def test_QML_DE_solver(benchmark): FILE: benchmark/benchmark_bosonsampling.py function get_interferometer (line 35) | def get_interferometer(n): function simulate_sampling (line 42) | def simulate_sampling(shots, circuit, input_state): function test_bosonsampling_clifford_6 (line 50) | def test_bosonsampling_clifford_6(benchmark): function test_bosonsampling_clifford_8 (line 55) | def test_bosonsampling_clifford_8(benchmark): FILE: benchmark/benchmark_pdisplay.py function generate_circuit (line 40) | def generate_circuit(n_mode): function run_pdisplay (line 54) | def run_pdisplay(c, t, f): function _run_pdisplay_mplot_6 (line 59) | def _run_pdisplay_mplot_6(): function _run_pdisplay_mplot_12 (line 63) | def _run_pdisplay_mplot_12(): function _run_pdisplay_svg_6 (line 67) | def _run_pdisplay_svg_6(): function _run_pdisplay_svg_12 (line 71) | def _run_pdisplay_svg_12(): function test_pdisplay_mplot_6 (line 75) | def test_pdisplay_mplot_6(benchmark): function test_pdisplay_mplot_12 (line 79) | def test_pdisplay_mplot_12(benchmark): function test_pdisplay_svg_6 (line 83) | def test_pdisplay_svg_6(benchmark): function test_pdisplay_svg_12 (line 87) | def test_pdisplay_svg_12(benchmark): FILE: benchmark/benchmark_stepper.py function get_sample_from_statevector (line 47) | def get_sample_from_statevector(sv): function run_stepper (line 59) | def run_stepper(): function run_direct (line 71) | def run_direct(): function test_stepper (line 101) | def test_stepper(benchmark): function test_stepper_comp_direct (line 105) | def test_stepper_comp_direct(benchmark): FILE: conftest.py function pytest_addoption (line 4) | def pytest_addoption(parser): function pytest_runtest_setup (line 11) | def pytest_runtest_setup(item): FILE: docs/source/build_catalog.py function get_pretty_string (line 33) | def get_pretty_string(s: str): function build_catalog_rst (line 46) | def build_catalog_rst(path: str): FILE: perceval/algorithm/abstract_algorithm.py class AAlgorithm (line 33) | class AAlgorithm: method __init__ (line 36) | def __init__(self, processor: AProcessor, **kwargs): method _check_compatibility (line 53) | def _check_compatibility(self) -> bool: FILE: perceval/algorithm/analyzer.py class Analyzer (line 37) | class Analyzer(AAlgorithm): method __init__ (line 52) | def __init__(self, processor: AProcessor, method compute (line 108) | def compute(self, normalize: bool = False, expected: dict = None, prog... method distribution (line 185) | def distribution(self) -> Matrix: method col (line 194) | def col(self, output_state: BasicState) -> int | None: FILE: perceval/algorithm/sampler.py class Sampler (line 40) | class Sampler(AAlgorithm): method __init__ (line 74) | def __init__(self, processor: AProcessor, **kwargs): method _get_primitive_converter (line 79) | def _get_primitive_converter(self, method: str): method _input_available (line 90) | def _input_available(self) -> bool: method _check_sample_shot_iterator (line 101) | def _check_sample_shot_iterator(self) -> bool: method _create_job (line 105) | def _create_job(self, method: str): method samples (line 149) | def samples(self) -> Job: method sample_count (line 157) | def sample_count(self) -> Job: method probs (line 165) | def probs(self) -> Job: method _add_iteration (line 173) | def _add_iteration(self, iter_params): method _check_iteration (line 177) | def _check_iteration(self, iter_params): method add_iteration (line 200) | def add_iteration(self, **kwargs): method add_iteration_list (line 216) | def add_iteration_list(self, iterations: list[dict]): method clear_iterations (line 224) | def clear_iterations(self): method n_iterations (line 232) | def n_iterations(self): method _probs_wrapper (line 235) | def _probs_wrapper(self, progress_callback: callable = None): method _samples_wrapper (line 241) | def _samples_wrapper(self, max_samples: int = None, progress_callback:... method _probs_iterate_locally (line 249) | def _probs_iterate_locally(self, max_shots: int = None, progress_callb... method _samples_iterate_locally (line 263) | def _samples_iterate_locally(self, max_shots: int = None, max_samples:... method _apply_iteration (line 284) | def _apply_iteration(self, it): method _set_circuit_params (line 291) | def _set_circuit_params(self, params: dict): method _set_input_state (line 298) | def _set_input_state(self, input_state: BasicState): method _set_min_detected_photons (line 301) | def _set_min_detected_photons(self, count: int): method _set_max_samples (line 304) | def _set_max_samples(self, val: int): method _set_max_shots (line 307) | def _set_max_shots(self, val: int): method _set_noise (line 310) | def _set_noise(self, noise: NoiseModel): method _it_default_parameters (line 313) | def _it_default_parameters(self) -> dict: FILE: perceval/algorithm/tomography/abstract_process_tomography.py class AProcessTomography (line 37) | class AProcessTomography(AAlgorithm): method __init__ (line 38) | def __init__(self, processor: AProcessor, **kwargs): method chi_matrix (line 47) | def chi_matrix(self) -> np.ndarray: method _beta_tensor_elem (line 50) | def _beta_tensor_elem(self, j: int, k: int, m: int, n: int, nqubit: in... method _beta_as_matrix (line 67) | def _beta_as_matrix(self) -> np.ndarray: method _lambda_target (line 82) | def _lambda_target(self, operator: np.ndarray) -> np.ndarray: method chi_target (line 102) | def chi_target(self, operator: np.ndarray) -> np.ndarray: FILE: perceval/algorithm/tomography/tomography.py class StateTomography (line 43) | class StateTomography(AAlgorithm): method __init__ (line 57) | def __init__(self, operator_processor: AProcessor, **kwargs): method _stokes_parameter (line 71) | def _stokes_parameter(self, prep_state_indices: list, meas_pauli_basis... method perform_state_tomography (line 106) | def perform_state_tomography(self, prep_state_indices: list) -> np.nda... class ProcessTomography (line 125) | class ProcessTomography(AProcessTomography): method __init__ (line 139) | def __init__(self, operator_processor: AProcessor, **kwargs): method _lambda_vector (line 149) | def _lambda_vector(self) -> np.ndarray: method chi_matrix (line 173) | def chi_matrix(self) -> np.ndarray: method average_fidelity (line 189) | def average_fidelity(self, operator: np.ndarray) -> float: method error_process_matrix (line 221) | def error_process_matrix(self, computed_chi: np.ndarray, operator: np.... FILE: perceval/algorithm/tomography/tomography_mle.py class TomographyMLE (line 44) | class TomographyMLE(AAlgorithm): method __init__ (line 51) | def __init__(self, operator_processor: AProcessor, **kwargs): method _log_likelihood_func (line 75) | def _log_likelihood_func(self, *args, **kwargs) -> float: method _grad_log_likelihood_func (line 79) | def _grad_log_likelihood_func(self, *args, **kwargs) -> np.ndarray: method _povm_data (line 83) | def _povm_data(self): method _collect_data (line 86) | def _collect_data(self, prep_state_indices, state_meas_indices) -> list: method _povm_state (line 104) | def _povm_state(self) -> list: method _povm_operator (line 135) | def _povm_operator(self) -> list: method _input_basis (line 143) | def _input_basis(self) -> list: method _proj_simplex (line 163) | def _proj_simplex(eigenvalues: list) -> list: method _proj (line 178) | def _proj(h_matrix: np.ndarray) -> np.ndarray: method _perform_mle_tomography (line 191) | def _perform_mle_tomography(self, init_guess_quantum_map: np.ndarray) ... class StateTomographyMLE (line 243) | class StateTomographyMLE(TomographyMLE): method __init__ (line 250) | def __init__(self, operator_processor, **kwargs): method _povm_data (line 255) | def _povm_data(self): method _log_likelihood_func (line 272) | def _log_likelihood_func(self, rho: np.ndarray) -> float: method _grad_log_likelihood_func (line 284) | def _grad_log_likelihood_func(self, rho: np.ndarray) -> float: method state_tomography_density_matrix (line 296) | def state_tomography_density_matrix(self) -> np.ndarray: method state_fidelity (line 300) | def state_fidelity(target_state_dm: np.ndarray, computed_state_dm: np.... class ProcessTomographyMLE (line 312) | class ProcessTomographyMLE(TomographyMLE, AProcessTomography): method __init__ (line 319) | def __init__(self, operator_processor, **kwargs): method _povm_data (line 327) | def _povm_data(self): method _log_likelihood_func (line 350) | def _log_likelihood_func(self, choi_matrix: np.ndarray) -> float: method _grad_log_likelihood_func (line 366) | def _grad_log_likelihood_func(self, choi_matrix: np.ndarray) -> np.nda... method chi_matrix (line 383) | def chi_matrix(self) -> np.ndarray: FILE: perceval/algorithm/tomography/tomography_utils.py function _compute_probs (line 39) | def _compute_probs(tomography_experiment, prep_state_indices: list, meas... function _state_to_dens_matrix (line 75) | def _state_to_dens_matrix(state: np.ndarray) -> np.ndarray: function _matrix_basis (line 85) | def _matrix_basis(nqubit: int, d: int) -> list: function _matrix_to_vector (line 107) | def _matrix_to_vector(matrix: np.ndarray) -> np.ndarray: function _vector_to_sq_matrix (line 116) | def _vector_to_sq_matrix(vector: np.ndarray) -> np.ndarray: function _coef_linear_decomp (line 129) | def _coef_linear_decomp(matrix: np.ndarray, basis: list) -> np.ndarray: function _get_fixed_basis_ops (line 146) | def _get_fixed_basis_ops(j: int, nqubit: int) -> np.ndarray: function _get_canonical_basis_ops (line 173) | def _get_canonical_basis_ops(j: int, d: int) -> np.ndarray: function _krauss_repr_ops (line 185) | def _krauss_repr_ops(m: int, rhoj: np.ndarray, n: int, nqubit: int) -> n... function _generate_pauli_index (line 199) | def _generate_pauli_index(nqubit: int) -> list: function _generate_pauli_prep_index (line 209) | def _generate_pauli_prep_index(nqubit: int, prep_basis_size: int = None)... function _list_subset_k_from_n (line 226) | def _list_subset_k_from_n(k: int, n: int) -> list: function is_physical (line 239) | def is_physical(input_matrix: np.ndarray, nqubit: int, eigen_tolerance: ... function _index_num_to_basis (line 285) | def _index_num_to_basis(index, nqubit, basis_size) -> list: function process_fidelity (line 293) | def process_fidelity(computed_map: np.ndarray, ideal_map: np.ndarray) ->... FILE: perceval/backends/__init__.py class BackendFactory (line 49) | class BackendFactory: method get_backend (line 51) | def get_backend(backend_name: str = "SLOS", **kwargs) -> ABackend: method list (line 61) | def list(): FILE: perceval/backends/_abstract_backends.py class ABackend (line 39) | class ABackend(ABC): method __init__ (line 40) | def __init__(self): method set_circuit (line 45) | def set_circuit(self, circuit: ACircuit): method set_input_state (line 56) | def set_input_state(self, input_state: FockState): method _check_state (line 63) | def _check_state(self, state: FockState): method name (line 69) | def name(self) -> str: class ASamplingBackend (line 73) | class ASamplingBackend(ABackend): method sample (line 75) | def sample(self) -> BasicState: method samples (line 79) | def samples(self, count: int) -> BSSamples: class _StateProbIterator (line 83) | class _StateProbIterator(Iterable[tuple[FockState, float]]): method __init__ (line 85) | def __init__(self, states: Iterable[FockState], probs: Iterable[float]): method __iter__ (line 89) | def __iter__(self): class AStrongSimulationBackend (line 93) | class AStrongSimulationBackend(ABackend): method __init__ (line 95) | def __init__(self): method set_mask (line 103) | def set_mask(self, masks: str | list[str], n = None, at_least_modes = ... method _init_mask (line 130) | def _init_mask(self): method clear_mask (line 139) | def clear_mask(self): method set_input_state (line 148) | def set_input_state(self, input_state: FockState): method _get_iterator (line 152) | def _get_iterator(self, input_state: BasicState): method clear_iterator_cache (line 160) | def clear_iterator_cache(self): method set_circuit (line 163) | def set_circuit(self, circuit: ACircuit): method prob_amplitude (line 169) | def prob_amplitude(self, output_state: FockState) -> complex: method probability (line 173) | def probability(self, output_state: FockState) -> float: method all_prob (line 177) | def all_prob(self, input_state: FockState = None) -> list[float]: method prob_distribution (line 187) | def prob_distribution(self) -> BSDistribution: method prob_iterator (line 197) | def prob_iterator(self, min_p: float = global_params["min_p"]) -> Iter... method evolve (line 203) | def evolve(self) -> StateVector: class IFFBackend (line 211) | class IFFBackend(ABC): method can_simulate_feed_forward (line 215) | def can_simulate_feed_forward(components: list[tuple[tuple, AComponent]], method set_feed_forward (line 227) | def set_feed_forward(self, components: list[tuple[tuple, AComponent]],... FILE: perceval/backends/_clifford2017.py class Clifford2017Backend (line 36) | class Clifford2017Backend(ASamplingBackend): method __init__ (line 37) | def __init__(self): method set_circuit (line 41) | def set_circuit(self, circuit: ACircuit): method set_input_state (line 45) | def set_input_state(self, input_state: FockState): method sample (line 49) | def sample(self): method samples (line 52) | def samples(self, count: int): method name (line 60) | def name(self) -> str: FILE: perceval/backends/_mps.py class MPSBackend (line 41) | class MPSBackend(AStrongSimulationBackend): method __init__ (line 53) | def __init__(self, cutoff : int = None): method name (line 68) | def name(self) -> str: method set_cutoff (line 71) | def set_cutoff(self, cutoff_val: int): method set_circuit (line 80) | def set_circuit(self, circuit: ACircuit): method set_input_state (line 95) | def set_input_state(self, input_state: FockState): method prob_amplitude (line 99) | def prob_amplitude(self, output_state: FockState) -> complex: method _compile (line 122) | def _compile(self) -> bool: method _apply (line 167) | def _apply(self, r, c): method update_state_1_mode (line 185) | def update_state_1_mode(self, k, u): method _transition_matrix_1_mode (line 196) | def _transition_matrix_1_mode(self, u): method update_state_2_mode (line 213) | def update_state_2_mode(self, k, u): method _transition_matrix_2_mode (line 282) | def _transition_matrix_2_mode(self, u): method _sv_diag (line 309) | def _sv_diag(self, k): FILE: perceval/backends/_naive.py class NaiveBackend (line 38) | class NaiveBackend(AStrongSimulationBackend): method name (line 43) | def name(self) -> str: method prob_amplitude (line 46) | def prob_amplitude(self, output_state: FockState) -> complex: method _compute_submatrix (line 51) | def _compute_submatrix(self, output_state: FockState) -> np.ndarray: method _compute_permanent (line 70) | def _compute_permanent(self, m): FILE: perceval/backends/_naive_approx.py class NaiveApproxBackend (line 37) | class NaiveApproxBackend(NaiveBackend): method __init__ (line 44) | def __init__(self, gurvits_iterations: int = 10000): method name (line 49) | def name(self) -> str: method _compute_permanent (line 52) | def _compute_permanent(self, m): method prob_amplitude_with_error (line 56) | def prob_amplitude_with_error(self, output_state: FockState) -> tuple[... method probability_confidence_interval (line 64) | def probability_confidence_interval(self, output_state: FockState) -> ... FILE: perceval/backends/_slap.py class SLAPBackend (line 38) | class SLAPBackend(AStrongSimulationBackend, IFFBackend): method __init__ (line 40) | def __init__(self, mask=None): method set_circuit (line 46) | def set_circuit(self, circuit: ACircuit): method _init_mask (line 51) | def _init_mask(self): method prob_amplitude (line 58) | def prob_amplitude(self, output_state: FockState) -> complex: method prob_distribution (line 66) | def prob_distribution(self) -> BSDistribution: method name (line 70) | def name(self) -> str: method all_prob (line 73) | def all_prob(self, input_state: FockState = None): method evolve (line 80) | def evolve(self) -> StateVector: method can_simulate_feed_forward (line 89) | def can_simulate_feed_forward(components, input_state, detectors = Non... method set_feed_forward (line 141) | def set_feed_forward(self, components: list[tuple[tuple, AComponent]],... FILE: perceval/backends/_slos.py class _Path (line 37) | class _Path: method __init__ (line 40) | def __init__(self, n, m, states, targets, backend): method _decompose (line 61) | def _decompose(self): method compute (line 88) | def compute(self, u, parent_coefs: Matrix = None, mk: int = None): class SLOSBackend (line 105) | class SLOSBackend(AStrongSimulationBackend): method __init__ (line 106) | def __init__(self, mask=None, use_symbolic=False): method name (line 114) | def name(self) -> str: method _reset (line 117) | def _reset(self): method _compute_path (line 126) | def _compute_path(self, umat): method set_circuit (line 130) | def set_circuit(self, circuit): method set_input_state (line 143) | def set_input_state(self, input_state: FockState): method clear_mask (line 147) | def clear_mask(self): method _deploy (line 151) | def _deploy(self, input_list: list[FockState]): method preprocess (line 170) | def preprocess(self, input_list: list[FockState]) -> bool: method prob_amplitude (line 187) | def prob_amplitude(self, output_state: FockState) -> complex: method prob_distribution (line 195) | def prob_distribution(self) -> BSDistribution: method all_prob (line 205) | def all_prob(self, input_state: FockState = None): method evolve (line 216) | def evolve(self) -> StateVector: FILE: perceval/components/_decompose_perms.py function decompose_perms (line 34) | def decompose_perms(circuit: Circuit, merge: bool=True) -> Circuit: FILE: perceval/components/_mode_connector.py class UnavailableModeException (line 35) | class UnavailableModeException(Exception): method __init__ (line 36) | def __init__(self, mode: int | list[int] | tuple[int], reason: str = N... class InvalidMappingException (line 43) | class InvalidMappingException(Exception): method __init__ (line 44) | def __init__(self, mapping: dict | list, reason: str = None): class ModeConnector (line 51) | class ModeConnector: method __init__ (line 58) | def __init__(self, left_experiment, right_obj, mapping): method _mapping_type_checks (line 75) | def _mapping_type_checks(self): method _get_ordered_rmodes (line 86) | def _get_ordered_rmodes(self): method resolve (line 95) | def resolve(self) -> dict[int, int]: method _check_consistency (line 172) | def _check_consistency(self): method _resolve_port_left (line 188) | def _resolve_port_left(self, name: str): method _resolve_port_right (line 204) | def _resolve_port_right(self, name: str): method add_heralded_modes (line 221) | def add_heralded_modes(self, mapping): method generate_permutation (line 236) | def generate_permutation(mode_mapping: dict[int, int]): method compose_lists (line 255) | def compose_lists(self, mode_mapping: dict[int, int], l: list, r: list): FILE: perceval/components/_pauli.py class PauliType (line 37) | class PauliType(Enum): class PauliEigenStateType (line 48) | class PauliEigenStateType(Enum): function get_pauli_eigen_state_prep_circ (line 63) | def get_pauli_eigen_state_prep_circ(pauli_type: PauliEigenStateType) -> ... function get_pauli_gate (line 94) | def get_pauli_gate(pauli_type: PauliType): function get_pauli_eigenvectors (line 118) | def get_pauli_eigenvectors(pauli_type) -> list: function get_pauli_eigenvector_matrix (line 144) | def get_pauli_eigenvector_matrix(pauli_eigenv) -> np.ndarray: function get_pauli_basis_measurement_circuit (line 153) | def get_pauli_basis_measurement_circuit(pauli_type: PauliType) -> Circuit: FILE: perceval/components/abstract_component.py class AComponent (line 37) | class AComponent(ABC): method __init__ (line 40) | def __init__(self, m: int, name: str = None): method m (line 45) | def m(self) -> int: method name (line 49) | def name(self) -> str: method name (line 56) | def name(self, new_name: str = None) -> None: method is_composite (line 60) | def is_composite(self) -> bool: class AParametrizedComponent (line 67) | class AParametrizedComponent(AComponent): method __init__ (line 68) | def __init__(self, m: int, name: str = None): method vars (line 74) | def vars(self) -> dict[str, Parameter]: method assign (line 80) | def assign(self, method defined (line 97) | def defined(self) -> bool: method params (line 107) | def params(self) -> Iterable[str]: method param (line 113) | def param(self, param_name: str) -> Parameter: method get_parameters (line 122) | def get_parameters(self, all_params: bool = False, expressions = False... method reset_parameters (line 147) | def reset_parameters(self) -> None: method _set_parameter (line 151) | def _set_parameter(self, method _populate_parameters (line 186) | def _populate_parameters(self, out_parameters: dict, pname: str, defau... method get_variables (line 210) | def get_variables(self): method copy (line 213) | def copy(self): FILE: perceval/components/abstract_processor.py class ProcessorType (line 44) | class ProcessorType(Enum): class AProcessor (line 49) | class AProcessor(ABC): method __init__ (line 50) | def __init__(self, experiment = None): method experiment (line 55) | def experiment(self) -> Experiment: method experiment (line 59) | def experiment(self, experiment: Experiment): method _circuit_change_observer (line 66) | def _circuit_change_observer(self, new_component = None): method _noise_changed_observer (line 70) | def _noise_changed_observer(self): method _input_changed_observer (line 73) | def _input_changed_observer(self): method name (line 77) | def name(self) -> str: method name (line 81) | def name(self, name: str): method type (line 86) | def type(self) -> ProcessorType: method is_remote (line 91) | def is_remote(self) -> bool: method specs (line 95) | def specs(self): method set_parameters (line 98) | def set_parameters(self, params: dict[str, any]): method set_parameter (line 102) | def set_parameter(self, key: str, value: any): method parameters (line 108) | def parameters(self): method clear_parameters (line 111) | def clear_parameters(self): method clear_input_and_circuit (line 114) | def clear_input_and_circuit(self, new_m=None): method _min_detected_photons_filter (line 118) | def _min_detected_photons_filter(self): method min_detected_photons_filter (line 121) | def min_detected_photons_filter(self, n: int): method input_state (line 133) | def input_state(self): method noise (line 137) | def noise(self): method noise (line 141) | def noise(self, nm: NoiseModel): method available_commands (line 146) | def available_commands(self) -> list[str]: method remove_heralded_modes (line 149) | def remove_heralded_modes(self, s: FockState) -> FockState: method post_select_fn (line 155) | def post_select_fn(self): method set_postselection (line 158) | def set_postselection(self, postselect: PostSelect): method clear_postselection (line 168) | def clear_postselection(self): method compute_physical_logical_perf (line 172) | def compute_physical_logical_perf(self, value: bool): method _state_selected (line 175) | def _state_selected(self, state: BasicState) -> bool: method set_circuit (line 187) | def set_circuit(self, circuit: ACircuit) -> AProcessor: method add (line 197) | def add(self, mode_mapping, component, keep_port: bool = True) -> APro... method detectors (line 229) | def detectors(self): method add_herald (line 232) | def add_herald(self, mode: int, expected: int, name: str = None, locat... method components (line 245) | def components(self): method m (line 249) | def m(self) -> int: method m_in (line 256) | def m_in(self) -> int: method m (line 264) | def m(self, value: int): method circuit_size (line 268) | def circuit_size(self) -> int: method linear_circuit (line 274) | def linear_circuit(self, flatten: bool = False) -> Circuit: method non_unitary_circuit (line 281) | def non_unitary_circuit(self, flatten: bool = False) -> list[tuple[tup... method get_circuit_parameters (line 284) | def get_circuit_parameters(self) -> dict[str, Parameter]: method out_port_names (line 288) | def out_port_names(self): method in_port_names (line 295) | def in_port_names(self): method add_port (line 301) | def add_port(self, m, port: APort, location: PortLocation = PortLocati... method remove_port (line 305) | def remove_port(self, m, location: PortLocation = PortLocation.IN_OUT): method get_input_port (line 309) | def get_input_port(self, mode): method get_output_port (line 312) | def get_output_port(self, mode): method detection_type (line 316) | def detection_type(self) -> DetectionType: method heralds (line 320) | def heralds(self): method in_heralds (line 327) | def in_heralds(self): method check_input (line 333) | def check_input(self, input_state: FockState): method check_min_detected_photons_filter (line 337) | def check_min_detected_photons_filter(self): method with_input (line 347) | def with_input(self, input_state: BasicState | LogicalState | StateVec... method flatten (line 361) | def flatten(self, max_depth = None) -> list[tuple]: FILE: perceval/components/compiled_circuit.py class CompiledCircuit (line 34) | class CompiledCircuit(ACircuit): method __init__ (line 35) | def __init__(self, name: str, template_or_size: ACircuit | int, parame... method _compute_unitary (line 45) | def _compute_unitary(self, method describe (line 61) | def describe(self) -> str: method is_composite (line 72) | def is_composite(self) -> bool: FILE: perceval/components/component_catalog.py class CatalogItem (line 37) | class CatalogItem(ABC): method __init__ (line 44) | def __init__(self, name: str): method name (line 49) | def name(self) -> str: method doc (line 57) | def doc(self): method _handle_param (line 78) | def _handle_param(value): method build_circuit (line 84) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 92) | def build_experiment(self, **kwargs) -> Experiment: method build_processor (line 99) | def build_processor(self, **kwargs) -> Processor: class Catalog (line 111) | class Catalog: method __init__ (line 112) | def __init__(self, path: str): method add_path (line 117) | def add_path(self, path): method _add_sub_catalog (line 125) | def _add_sub_catalog(self, catalog): method list (line 131) | def list(self) -> list[str]: method __contains__ (line 134) | def __contains__(self, item: str) -> bool: method __getitem__ (line 137) | def __getitem__(self, item_name: str) -> CatalogItem: FILE: perceval/components/core_catalog/_helpers/entanglement_qloq.py function generalized_cz (line 35) | def generalized_cz(n: int, m: int) -> Processor: function generate_permutation_for_controlled_op (line 65) | def generate_permutation_for_controlled_op(control: int, target: int, nu... function create_internal_controlled_op (line 88) | def create_internal_controlled_op(op_type: str, control: int, target: in... function generate_chained_controlled_ops (line 113) | def generate_chained_controlled_ops(op_type: str, n: int) -> Circuit: FILE: perceval/components/core_catalog/_helpers/rotations_qloq.py function internal_swap (line 34) | def internal_swap(qubit1: int, qubit2: int, num_qubits: int) -> Circuit: function _generate_rotation_kth_qubit (line 83) | def _generate_rotation_kth_qubit(gate_layer: Circuit, nqubits: int, k: i... function _generate_rotation_last_qubit (line 102) | def _generate_rotation_last_qubit(gate: Circuit, nqubits: int) -> Circuit: function _g_rn (line 110) | def _g_rn(gate_name: str, angle: float | Parameter, n: int ) -> Circuit: function G_RHn (line 118) | def G_RHn(n: int) -> Circuit: function G_RHk (line 123) | def G_RHk(n: int, k: int) -> Circuit: function _g_rk (line 128) | def _g_rk(angle: float, n: int, k: int, rotation: str) -> Circuit: function apply_rotations_to_qubits (line 132) | def apply_rotations_to_qubits(angle_list: list[float | Parameter], n: in... FILE: perceval/components/core_catalog/controlled_rotation_gates.py function build_control_gate_unitary (line 42) | def build_control_gate_unitary(n: int, alpha: float) -> Matrix: class PostProcessedControlledRotationsItem (line 73) | class PostProcessedControlledRotationsItem(CatalogItem): method __init__ (line 93) | def __init__(self): method build_circuit (line 96) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 119) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/gates_1qubit.py function _get_component_str_repr (line 45) | def _get_component_str_repr(repr_name: str) -> str: class ASingleQubitGate (line 60) | class ASingleQubitGate(CatalogItem, ABC): method __init__ (line 65) | def __init__(self): method description (line 69) | def description(self): method str_repr (line 73) | def str_repr(self): method build_experiment (line 76) | def build_experiment(self, **kwargs) -> Experiment: class AFixedItem (line 82) | class AFixedItem(ASingleQubitGate, ABC): method build_circuit (line 85) | def build_circuit(self, **kwargs) -> Circuit: class HadamardItem (line 89) | class HadamardItem(AFixedItem): class SGateItem (line 96) | class SGateItem(AFixedItem): class SDagGateItem (line 103) | class SDagGateItem(AFixedItem): class TGateItem (line 110) | class TGateItem(AFixedItem): class TDagGateItem (line 117) | class TDagGateItem(AFixedItem): class APauliItem (line 124) | class APauliItem(AFixedItem, ABC): method repr_name (line 128) | def repr_name(self): method catalog_name (line 132) | def catalog_name(self): method doc_name (line 136) | def doc_name(self): class PauliXItem (line 140) | class PauliXItem(APauliItem): class PauliYItem (line 145) | class PauliYItem(APauliItem): class PauliZItem (line 150) | class PauliZItem(APauliItem): class AParamItem (line 155) | class AParamItem(ASingleQubitGate, ABC): method get_circuit (line 159) | def get_circuit(self, param) -> Circuit: method build_circuit (line 162) | def build_circuit(self, **kwargs) -> Circuit: class PhaseShiftItem (line 175) | class PhaseShiftItem(AParamItem): method get_circuit (line 181) | def get_circuit(self, phi): class ARItem (line 185) | class ARItem(AParamItem, ABC): method repr_name (line 190) | def repr_name(self): method catalog_name (line 194) | def catalog_name(self): method doc_name (line 198) | def doc_name(self): class RxItem (line 202) | class RxItem(ARItem): method get_circuit (line 205) | def get_circuit(self, theta): class RyItem (line 209) | class RyItem(ARItem): method get_circuit (line 212) | def get_circuit(self, theta): class RzItem (line 216) | class RzItem(ARItem): method get_circuit (line 219) | def get_circuit(self, theta): FILE: perceval/components/core_catalog/generic_2mode.py class Generic2ModeItem (line 34) | class Generic2ModeItem(CatalogItem): method __init__ (line 49) | def __init__(self): method build_circuit (line 52) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 59) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/heralded_cnot.py class HeraldedCnotItem (line 38) | class HeraldedCnotItem(CatalogItem): method __init__ (line 50) | def __init__(self): method build_circuit (line 53) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 61) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/heralded_cz.py class HeraldedCzItem (line 37) | class HeraldedCzItem(CatalogItem): method __init__ (line 51) | def __init__(self): method build_circuit (line 54) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 74) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/klm_cnot.py class KLMCnotItem (line 39) | class KLMCnotItem(CatalogItem): method __init__ (line 58) | def __init__(self): method build_circuit (line 61) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 80) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/mzi.py class AMZI (line 38) | class AMZI(CatalogItem, ABC): method _handle_params (line 48) | def _handle_params(**kwargs): method build_experiment (line 57) | def build_experiment(self, **kwargs) -> Experiment: method generate (line 60) | def generate(self, i: int): class MZIPhaseFirst (line 69) | class MZIPhaseFirst(AMZI): method __init__ (line 77) | def __init__(self): method build_circuit (line 80) | def build_circuit(self, **kwargs) -> Circuit: class MZIPhaseLast (line 86) | class MZIPhaseLast(AMZI): method __init__ (line 94) | def __init__(self): method build_circuit (line 97) | def build_circuit(self, **kwargs) -> Circuit: class SymmetricMZI (line 103) | class SymmetricMZI(AMZI): method __init__ (line 112) | def __init__(self): method build_circuit (line 115) | def build_circuit(self, **kwargs) -> Circuit: FILE: perceval/components/core_catalog/postprocessed_ccz.py class PostProcessedCCZItem (line 38) | class PostProcessedCCZItem(CatalogItem): method __init__ (line 52) | def __init__(self): method build_circuit (line 55) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 59) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/postprocessed_cnot.py class PostProcessedCnotItem (line 37) | class PostProcessedCnotItem(CatalogItem): method __init__ (line 49) | def __init__(self): method build_circuit (line 52) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 59) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/postprocessed_cz.py class PostProcessedCzItem (line 35) | class PostProcessedCzItem(CatalogItem): method __init__ (line 47) | def __init__(self): method build_circuit (line 50) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 60) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/core_catalog/qloq_ansatz.py class QLOQAnsatz (line 36) | class QLOQAnsatz(CatalogItem): method __init__ (line 48) | def __init__(self): method _apply_layer_operations (line 55) | def _apply_layer_operations(self, offset: int, size: int) -> None: method _add_single_layer (line 69) | def _add_single_layer(self, offset: int, size: int, ctype: str): method _build_qubit_circuit (line 78) | def _build_qubit_circuit(self, qubit_group_sizes: list[int], lp: list[... method get_parameter_nb (line 128) | def get_parameter_nb(qubit_group_sizes: list[Encoding], nb_layers: int... method build_circuit (line 151) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 186) | def build_experiment(self, **kwargs) -> Experiment: method _generate_phases (line 208) | def _generate_phases(parameter_nb: int) -> list[str]: FILE: perceval/components/core_catalog/toffoli.py class ToffoliItem (line 35) | class ToffoliItem(CatalogItem): method __init__ (line 47) | def __init__(self): method build_circuit (line 50) | def build_circuit(self, **kwargs) -> Circuit: method build_experiment (line 57) | def build_experiment(self, **kwargs) -> Experiment: FILE: perceval/components/detector.py class DetectionType (line 44) | class DetectionType(Enum): class IDetector (line 59) | class IDetector(AComponent, ABC): method __init__ (line 61) | def __init__(self): method type (line 66) | def type(self) -> DetectionType: method detect (line 72) | def detect(self, theoretical_photons: int) -> BSDistribution | FockState: method copy (line 80) | def copy(self) -> IDetector: method max_detections (line 85) | def max_detections(self): method efficiency (line 90) | def efficiency(self): class BSLayeredPPNR (line 94) | class BSLayeredPPNR(IDetector): method __init__ (line 104) | def __init__(self, bs_layers: int, reflectivity: float = 0.5): method max_detections (line 115) | def max_detections(self) -> int: method type (line 120) | def type(self) -> DetectionType: method efficiency (line 124) | def efficiency(self) -> float: method clear_cache (line 127) | def clear_cache(self): method create_circuit (line 134) | def create_circuit(self) -> Circuit: method detect (line 147) | def detect(self, theoretical_photons: int) -> BSDistribution | FockState: class Detector (line 169) | class Detector(IDetector): method __init__ (line 199) | def __init__(self, n_wires: int = None, max_detections: int = None, wi... method max_detections (line 213) | def max_detections(self) -> int: method efficiency (line 218) | def efficiency(self): method threshold (line 223) | def threshold() -> Detector: method pnr (line 230) | def pnr() -> Detector: method ppnr (line 237) | def ppnr(n_wires: int = None, max_detections: int = None, wire_efficie... method type (line 244) | def type(self) -> DetectionType: method detect (line 251) | def detect(self, theoretical_photons: int) -> BSDistribution | FockState: method _cond_probability (line 278) | def _cond_probability(self, det: int, nph: int): function get_detection_type (line 298) | def get_detection_type(detectors: list[IDetector]) -> DetectionType: function check_heralds_detectors (line 320) | def check_heralds_detectors(heralds: dict[int, int] | None, detectors: l... FILE: perceval/components/experiment.py class _PhaseNoise (line 53) | class _PhaseNoise: class Experiment (line 58) | class Experiment: method __init__ (line 79) | def __init__(self, m_circuit: int | ACircuit = None, noise: NoiseModel... method _reset_circuit (line 94) | def _reset_circuit(self): method is_unitary (line 113) | def is_unitary(self) -> bool: method has_td (line 120) | def has_td(self) -> bool: method has_feedforward (line 127) | def has_feedforward(self) -> bool: method _init_circuit (line 133) | def _init_circuit(self, m_circuit: ACircuit | int): method clear_input_and_circuit (line 140) | def clear_input_and_circuit(self, new_m=None): method _circuit_changed (line 149) | def _circuit_changed(self, component=None): method add_observers (line 155) | def add_observers(self, circuit_observer: callable, noise_observer: ca... method min_detected_photons_filter (line 160) | def min_detected_photons_filter(self, n: int): method min_photons_filter (line 172) | def min_photons_filter(self): method input_state (line 176) | def input_state(self): method noise (line 180) | def noise(self): method noise (line 184) | def noise(self, nm: NoiseModel | None): method post_select_fn (line 199) | def post_select_fn(self): method set_postselection (line 202) | def set_postselection(self, postselect: PostSelect): method clear_postselection (line 215) | def clear_postselection(self): method __deepcopy__ (line 220) | def __deepcopy__(self, memo): method copy (line 234) | def copy(self) -> Experiment: method set_circuit (line 242) | def set_circuit(self, circuit: ACircuit): method add (line 257) | def add(self, mode_mapping, component, keep_port: bool = True): method _add_ffconfig (line 318) | def _add_ffconfig(self, modes, component: AFFConfigurator): method _add_detector (line 350) | def _add_detector(self, mode: int, detector: IDetector): method detectors (line 364) | def detectors(self): method _validate_postselect_composition (line 370) | def _validate_postselect_composition(self, mode_mapping: dict): method _validate_new_parameters (line 377) | def _validate_new_parameters(self, new_params: dict[str, Parameter]): method _compose_experiment (line 385) | def _compose_experiment(self, connector: ModeConnector, experiment: Ex... method _add_component (line 527) | def _add_component(self, mode_mapping, component, keep_port: bool): method _add_herald (line 552) | def _add_herald(self, mode, herald: Herald, location: PortLocation = P... method add_herald (line 562) | def add_herald(self, mode: int, expected: int, name: str = None, locat... method components (line 583) | def components(self): method m (line 587) | def m(self) -> int: method m_in (line 594) | def m_in(self): method m (line 601) | def m(self, value: int): method circuit_size (line 613) | def circuit_size(self) -> int: method unitary_circuit (line 619) | def unitary_circuit(self, flatten: bool = False, use_phase_noise: bool... method non_unitary_circuit (line 648) | def non_unitary_circuit(self, flatten: bool = False) -> list[tuple[tup... method get_circuit_parameters (line 680) | def get_circuit_parameters(self) -> dict[str, Parameter]: method out_port_names (line 685) | def out_port_names(self): method in_port_names (line 696) | def in_port_names(self): method add_port (line 706) | def add_port(self, m, port: APort, location: PortLocation = PortLocati... method _find_and_remove_port_from_list (line 728) | def _find_and_remove_port_from_list(m, port_list) -> bool: method remove_port (line 735) | def remove_port(self, m, location: PortLocation = PortLocation.IN_OUT): method is_mode_connectible (line 745) | def is_mode_connectible(self, mode: int) -> bool: method are_modes_free (line 752) | def are_modes_free(self, mode_range, location: PortLocation = PortLoca... method get_input_port (line 766) | def get_input_port(self, mode): method get_output_port (line 772) | def get_output_port(self, mode): method detection_type (line 779) | def detection_type(self) -> DetectionType: method heralds (line 783) | def heralds(self) -> dict[int, int]: method in_heralds (line 787) | def in_heralds(self) -> dict[int, int]: method check_input (line 790) | def check_input(self, input_state: FockState): method _input_changed (line 797) | def _input_changed(self): method with_input (line 804) | def with_input(self, input_state: LogicalState): method with_input (line 811) | def with_input(self, input_state: FockState) -> None: method with_input (line 827) | def with_input(self, input_state: AnnotatedFockState) -> None: method with_input (line 835) | def with_input(self, sv: StateVector | NoisyFockState): method with_input (line 844) | def with_input(self, svd: SVDistribution): method flatten (line 856) | def flatten(self, max_depth=None) -> list[tuple]: function _flatten (line 865) | def _flatten(composite, starting_mode=0, max_depth=None) -> list[tuple]: FILE: perceval/components/feed_forward_configurator.py class AFFConfigurator (line 39) | class AFFConfigurator(AParametrizedComponent, ABC): method __init__ (line 55) | def __init__(self, m: int, offset: int, default_circuit: ACircuit, nam... method block_circuit_size (line 62) | def block_circuit_size(self): method configure (line 67) | def configure(self, measured_state: BasicState) -> ACircuit: method circuit_template (line 78) | def circuit_template(self) -> ACircuit: method config_modes (line 83) | def config_modes(self, self_modes: tuple[int, ...]) -> tuple[int, ...]: method circuit_offset (line 98) | def circuit_offset(self): method circuit_offset (line 102) | def circuit_offset(self, offset: int): class FFCircuitProvider (line 107) | class FFCircuitProvider(AFFConfigurator): method __init__ (line 125) | def __init__(self, m: int, offset: int, default_circuit: ACircuit, nam... method _get_parameters (line 133) | def _get_parameters(circ, all_params: bool, expressions: bool) -> dict: method reset_map (line 144) | def reset_map(self): method circuit_map (line 150) | def circuit_map(self): method circuit_map (line 154) | def circuit_map(self, circuit_map: dict[BasicState, ACircuit]): method add_configuration (line 159) | def add_configuration(self, state, circuit: ACircuit) -> FFCircuitProv... method configure (line 186) | def configure(self, measured_state: BasicState) -> ACircuit: method circuit_template (line 189) | def circuit_template(self) -> ACircuit: class FFConfigurator (line 193) | class FFConfigurator(AFFConfigurator): method __init__ (line 213) | def __init__(self, method _check_configuration (line 230) | def _check_configuration(self, config: dict[str, float]): method add_configuration (line 238) | def add_configuration(self, detections: BasicState | tuple[int, ...], ... method configure (line 246) | def configure(self, measured_state: BasicState) -> ACircuit: method circuit_template (line 254) | def circuit_template(self) -> ACircuit: FILE: perceval/components/generic_interferometer.py class GenericInterferometer (line 39) | class GenericInterferometer(Circuit): method __init__ (line 61) | def __init__(self, method __repr__ (line 102) | def __repr__(self): method mzi_depths (line 106) | def mzi_depths(self) -> list[int]: method remove_phase_layer (line 110) | def remove_phase_layer(self): method set_identity_mode (line 118) | def set_identity_mode(self): method _add_single_mode_component (line 123) | def _add_single_mode_component(self, mode: int, component: ACircuit) -... method _add_upper_component (line 132) | def _add_upper_component(self, i_depth: int) -> None: method _add_lower_component (line 140) | def _add_lower_component(self, i_depth: int) -> None: method _build_rectangle (line 150) | def _build_rectangle(self): method _build_triangle (line 167) | def _build_triangle(self): method _find_param_index (line 181) | def _find_param_index(self, col: int, lin: int, even_col_size: int, od... method _compute_insertion_depth (line 191) | def _compute_insertion_depth(start_col: int, m: int, param_count: int)... method set_param_list (line 201) | def set_param_list(self, param_list: list[float], top_left_pos: tuple[... method set_params_from_other (line 236) | def set_params_from_other(self, other: Circuit, top_left_pos: tuple[in... FILE: perceval/components/linear_circuit.py class ACircuit (line 50) | class ACircuit(AParametrizedComponent, ABC): method __init__ (line 57) | def __init__(self, m: int, name: str = None): method _compute_unitary (line 61) | def _compute_unitary(self, method compute_unitary (line 72) | def compute_unitary(self, method requires_polarization (line 97) | def requires_polarization(self): method U (line 105) | def U(self): method definition (line 111) | def definition(self) -> Matrix: method add (line 119) | def add(self, port_range: int | tuple[int, ...], method __setitem__ (line 123) | def __setitem__(self, key, value): method __ifloordiv__ (line 126) | def __ifloordiv__(self, component: ACircuit | tuple[int, ACircuit]) ->... method __floordiv__ (line 143) | def __floordiv__(self, component: ACircuit | tuple[int, ACircuit]) -> ... method __iter__ (line 154) | def __iter__(self): method identify (line 164) | def identify(self, unitary_matrix, phases, precision=None, max_try=10,... method _match_unitary (line 207) | def _match_unitary(circuit: ACircuit | Matrix, pattern: ACircuit, matc... method match (line 258) | def match(self, pattern: ACircuit, pos: int = None, method transfer_from (line 266) | def transfer_from(self, source: ACircuit, force: bool = False): method depths (line 286) | def depths(self): method ncomponents (line 292) | def ncomponents(self): method inverse (line 298) | def inverse(self, v, h): method describe (line 302) | def describe(self) -> str: class Circuit (line 311) | class Circuit(ACircuit): method __init__ (line 320) | def __init__(self, m: int, name: str = None): method is_composite (line 325) | def is_composite(self): method __iter__ (line 328) | def __iter__(self) -> Generator[tuple[tuple[int, ...], ACircuit]]: method getitem (line 333) | def getitem(self, idx: tuple[int, int], only_parameterized: bool=False... method get_parameters (line 357) | def get_parameters(self, all_params: bool = False, expressions = False... method __getitem__ (line 374) | def __getitem__(self, idx) -> ACircuit: method describe (line 383) | def describe(self) -> str: method requires_polarization (line 399) | def requires_polarization(self) -> bool: method definition (line 402) | def definition(self) -> Matrix: method barrier (line 405) | def barrier(self): method __imatmul__ (line 419) | def __imatmul__(self, component: ACircuit | tuple[int, ACircuit]) -> C... method __matmul__ (line 428) | def __matmul__(self, component: ACircuit | tuple[int, ACircuit]) -> Ci... method add (line 438) | def add(self, port_range: int | tuple[int, ...], method _compute_unitary (line 482) | def _compute_unitary(self, method _compute_circuit_unitary (line 487) | def _compute_circuit_unitary(self, method inverse (line 505) | def inverse(self, v=False, h=False): method compute_unitary (line 535) | def compute_unitary(self, method copy (line 549) | def copy(self): method decomposition (line 554) | def decomposition(U: MatrixN, method depths (line 627) | def depths(self): method ncomponents (line 635) | def ncomponents(self): method transfer_from (line 641) | def transfer_from(self, source: ACircuit, force: bool = False): method find_subnodes (line 658) | def find_subnodes(self, pos: int) -> list[int]: method isolate (line 681) | def isolate(self, lc: list[int], name=None, color=None): method replace (line 706) | def replace(self, p: int, pattern: ACircuit, merge: bool = False): method _check_brother_node (line 719) | def _check_brother_node(self, p0, p1): method match (line 728) | def match(self, pattern: ACircuit, pos: int = None, FILE: perceval/components/non_unitary_components.py class TD (line 36) | class TD(AParametrizedComponent): method __init__ (line 48) | def __init__(self, dt: int | Parameter): method get_variables (line 52) | def get_variables(self): method describe (line 57) | def describe(self): class LC (line 65) | class LC(AParametrizedComponent): method __init__ (line 75) | def __init__(self, loss: float | Parameter): method get_variables (line 79) | def get_variables(self): method describe (line 84) | def describe(self): method apply (line 91) | def apply(self, r, sv): FILE: perceval/components/port.py class PortLocation (line 36) | class PortLocation(Enum): class APort (line 47) | class APort(AComponent, ABC): method __init__ (line 48) | def __init__(self, size, name): method supports_location (line 52) | def supports_location(loc: PortLocation) -> bool: method output_mode_type (line 56) | def output_mode_type(self) -> ModeType: method encoding (line 62) | def encoding(self) -> Encoding | None: class Port (line 67) | class Port(APort): method __init__ (line 74) | def __init__(self, encoding: Encoding, name: str): method encoding (line 79) | def encoding(self): method output_mode_type (line 82) | def output_mode_type(self) -> ModeType: class Herald (line 86) | class Herald(APort): method __init__ (line 94) | def __init__(self, value: int, name: str | int = None): method output_mode_type (line 102) | def output_mode_type(self) -> ModeType: method user_given_name (line 106) | def user_given_name(self): method expected (line 113) | def expected(self): function get_basic_state_from_ports (line 118) | def get_basic_state_from_ports(ports: list[APort], state: LogicalState, ... function _to_fock (line 136) | def _to_fock(encoding: Encoding, qubit_state: list[int]) -> list[int]: function get_basic_state_from_encoding (line 162) | def get_basic_state_from_encoding(encoding: list[Encoding | int], logica... FILE: perceval/components/processor.py class Processor (line 40) | class Processor(AProcessor): method __init__ (line 59) | def __init__(self, backend, m_circuit: int | ACircuit | Experiment = N... method _has_custom_input (line 76) | def _has_custom_input(self): method _noise_changed_observer (line 80) | def _noise_changed_observer(self): method noise (line 86) | def noise(self): method source_distribution (line 93) | def source_distribution(self) -> SVDistribution | None: method _circuit_change_observer (line 102) | def _circuit_change_observer(self, new_component = None): method source (line 106) | def source(self): method _init_backend (line 112) | def _init_backend(self, backend): method type (line 122) | def type(self) -> ProcessorType: method is_remote (line 126) | def is_remote(self) -> bool: method _generate_noisy_input (line 129) | def _generate_noisy_input(self): method generate_noisy_heralds (line 132) | def generate_noisy_heralds(self) -> SVDistribution: method _input_changed_observer (line 138) | def _input_changed_observer(self): method clear_input_and_circuit (line 147) | def clear_input_and_circuit(self, new_m=None): method linear_circuit (line 151) | def linear_circuit(self, flatten: bool = False) -> Circuit: method samples (line 162) | def samples(self, max_samples: int, max_shots: int = None, progress_ca... method probs (line 185) | def probs(self, precision: float = None, progress_callback: callable =... method available_commands (line 210) | def available_commands(self) -> list[str]: method log_resources (line 214) | def log_resources(self, method: str, extra_parameters: dict): method compute_physical_logical_perf (line 247) | def compute_physical_logical_perf(self, value: bool): FILE: perceval/components/source.py class Source (line 40) | class Source: method __init__ (line 55) | def __init__(self, method from_noise_model (line 75) | def from_noise_model(noise: NoiseModel): method partially_distinguishable (line 85) | def partially_distinguishable(self): method emission_probability (line 89) | def emission_probability(self): method multiphoton_component (line 93) | def multiphoton_component(self): method indistinguishability (line 97) | def indistinguishability(self): method losses (line 101) | def losses(self): method multiphoton_model (line 105) | def multiphoton_model(self): method probability_distribution (line 108) | def probability_distribution(self, nphotons: int = 1, prob_threshold: ... method generate_distribution (line 116) | def generate_distribution(self, expected_input: FockState, prob_thresh... method create_iterator (line 136) | def create_iterator(self, expected_input: FockState, min_photons_filte... method create_sampler (line 159) | def create_sampler(self, expected_input: FockState, min_photons_filter... method generate_samples (line 167) | def generate_samples(self, max_samples: int, expected_input: FockState... method generate_separated_samples (line 184) | def generate_separated_samples(self, max_samples: int, expected_input:... method is_perfect (line 205) | def is_perfect(self) -> bool: method __eq__ (line 208) | def __eq__(self, value: Source) -> bool: method to_dict (line 211) | def to_dict(self) -> dict: FILE: perceval/components/tomography_exp_configurer.py function _prep_state_circuit_preparer (line 34) | def _prep_state_circuit_preparer(prep_state_indices: list): function _meas_state_circuit_preparer (line 44) | def _meas_state_circuit_preparer(pauli_indices: list): function processor_circuit_configurator (line 54) | def processor_circuit_configurator(processor, prep_state_indices: list, ... FILE: perceval/components/unitary_components.py class BSConvention (line 41) | class BSConvention(IntEnum): class BS (line 48) | class BS(ACircuit): method __init__ (line 61) | def __init__(self, method name (line 77) | def name(self): method convention (line 81) | def convention(self): method H (line 86) | def H(theta=sp.pi/2, phi_tl=0, phi_bl=0, phi_tr=0, phi_br=0): method Rx (line 94) | def Rx(theta=sp.pi / 2, phi_tl=0, phi_bl=0, phi_tr=0, phi_br=0): method Ry (line 102) | def Ry(theta=sp.pi / 2, phi_tl=0, phi_bl=0, phi_tr=0, phi_br=0): method r_to_theta (line 110) | def r_to_theta(r: float | Parameter) -> float | Expression: method theta_to_r (line 122) | def theta_to_r(theta: float | Parameter) -> float | Expression: method reflectivity (line 135) | def reflectivity(self): method _compute_unitary (line 142) | def _compute_unitary(self, assign=None, use_symbolic=False): method _matrix_template (line 174) | def _matrix_template(self, use_symbolic): method get_variables (line 185) | def get_variables(self): method describe (line 194) | def describe(self) -> str: method inverse (line 199) | def inverse(self, v=False, h=False): method definition (line 239) | def definition(self): class PS (line 244) | class PS(ACircuit): method __init__ (line 257) | def __init__(self, phi: Parameter | float, max_error: Parameter | floa... method _compute_unitary (line 262) | def _compute_unitary(self, assign=None, use_symbolic=False): method get_variables (line 273) | def get_variables(self): method describe (line 280) | def describe(self): method inverse (line 284) | def inverse(self, v=False, h=False): method definition (line 291) | def definition(self) -> Matrix: class WP (line 296) | class WP(ACircuit): method __init__ (line 309) | def __init__(self, delta: float | Parameter, xsi: float | Parameter): method _compute_unitary (line 314) | def _compute_unitary(self, assign=None, use_symbolic=False): method get_variables (line 337) | def get_variables(self): method describe (line 343) | def describe(self): method inverse (line 347) | def inverse(self, v=False, h=False): class HWP (line 351) | class HWP(WP): method __init__ (line 358) | def __init__(self, xsi): method definition (line 361) | def definition(self): class QWP (line 365) | class QWP(WP): method __init__ (line 372) | def __init__(self, xsi): method definition (line 375) | def definition(self): class PR (line 379) | class PR(ACircuit): method __init__ (line 395) | def __init__(self, delta: float | Parameter): method _compute_unitary (line 399) | def _compute_unitary(self, assign=None, use_symbolic=False): method get_variables (line 410) | def get_variables(self): method describe (line 415) | def describe(self): method inverse (line 419) | def inverse(self, v: bool = False, h: bool = False): class Unitary (line 423) | class Unitary(ACircuit): method __init__ (line 432) | def __init__(self, U: Matrix, name: str = None, use_polarization: bool... method _compute_unitary (line 445) | def _compute_unitary(self, assign: dict = None, use_symbolic: bool = F... method inverse (line 449) | def inverse(self, v=False, h=False): method describe (line 455) | def describe(self): class PERM (line 464) | class PERM(Unitary): method __init__ (line 475) | def __init__(self, perm: list[int]): method describe (line 486) | def describe(self): method definition (line 489) | def definition(self): method perm_vector (line 493) | def perm_vector(self): method apply (line 499) | def apply(self, r: tuple[int, ...], sv: BasicState | StateVector): method break_in_2_mode_perms (line 525) | def break_in_2_mode_perms(self): class PBS (line 551) | class PBS(Unitary): method __init__ (line 566) | def __init__(self): method describe (line 574) | def describe(self): class Barrier (line 578) | class Barrier(ACircuit): method __init__ (line 587) | def __init__(self, m: int, visible: bool = True): method visible (line 593) | def visible(self): method _compute_unitary (line 596) | def _compute_unitary(self, assign: dict = None, use_symbolic: bool = F... method describe (line 599) | def describe(self): method definition (line 602) | def definition(self): method apply (line 606) | def apply(self, r, sv): method inverse (line 609) | def inverse(self, v=False, h=False): FILE: perceval/error_mitigation/_loss_mitigation_utils.py function check_no_collision (line 38) | def check_no_collision(state) -> bool: function _handle_zero_photon_lost_dist (line 43) | def _handle_zero_photon_lost_dist(noisy_distributions, pattern_map, nois... function _handle_one_photon_lost_dist (line 48) | def _handle_one_photon_lost_dist(noisy_distributions, pattern_map, noisy... function _handle_two_photons_lost_dist (line 57) | def _handle_two_photons_lost_dist(noisy_distributions, pattern_map, nois... function _generate_one_photon_per_mode_mapping (line 71) | def _generate_one_photon_per_mode_mapping(m, n): function _gen_lossy_dists (line 80) | def _gen_lossy_dists(noisy_input, ideal_photon_count, pattern_map): function _get_avg_exp_from_uni_dist (line 108) | def _get_avg_exp_from_uni_dist(noisy_distributions, m, n): FILE: perceval/error_mitigation/loss_mitigation.py function _validate_noisy_input (line 37) | def _validate_noisy_input(noisy_input: BSCount | BSDistribution, ideal_p... function photon_recycling (line 54) | def photon_recycling(noisy_input: BSCount | BSDistribution, ideal_photon... FILE: perceval/providers/__init__.py class ProviderFactory (line 42) | class ProviderFactory: method get_provider (line 44) | def get_provider(provider_name: str, **kwargs) -> ISession: method list (line 52) | def list(): FILE: perceval/providers/quandela/quandela_session.py class Session (line 37) | class Session(ISession): method __init__ (line 45) | def __init__(self, platform_name: str, token: str, url: str = None): method build_remote_processor (line 51) | def build_remote_processor(self) -> RemoteProcessor: FILE: perceval/providers/scaleway/scaleway_rpc_handler.py class RPCHandler (line 47) | class RPCHandler: method __init__ (line 50) | def __init__( method name (line 73) | def name(self) -> str: method url (line 77) | def url(self) -> str: method headers (line 81) | def headers(self) -> dict: method proxies (line 85) | def proxies(self) -> dict: method fetch_platform_details (line 88) | def fetch_platform_details(self) -> dict: method get_platform (line 91) | def get_platform(self, platform_name: str, provider_name: str) -> dict: method create_session (line 113) | def create_session( method terminate_session (line 156) | def terminate_session(self) -> None: method delete_session (line 167) | def delete_session(self) -> None: method create_job (line 180) | def create_job(self, payload: dict) -> str: method cancel_job (line 210) | def cancel_job(self, job_id: str) -> None: method rerun_job (line 219) | def rerun_job(self, job_id: str) -> str: method get_job_status (line 229) | def get_job_status(self, job_id: str) -> dict: method get_job_results (line 266) | def get_job_results(self, job_id: str) -> dict: method __build_endpoint (line 314) | def __build_endpoint(self, endpoint) -> str: method __to_date (line 317) | def __to_date(self, date: str) -> float | None: method __get_duration (line 327) | def __get_duration(self, start_time: float | None) -> int | None: FILE: perceval/providers/scaleway/scaleway_session.py class Session (line 38) | class Session(ISession): method __init__ (line 52) | def __init__( method build_remote_processor (line 95) | def build_remote_processor(self) -> RemoteProcessor: method start (line 98) | def start(self) -> None: method stop (line 105) | def stop(self) -> None: method delete (line 109) | def delete(self) -> None: FILE: perceval/rendering/_density_matrix_utils.py function _complex_to_rgb (line 37) | def _complex_to_rgb(z: complex, cmap='hsv'): function _csr_to_rgb (line 46) | def _csr_to_rgb(matrix, cmap='hsv'): function _csr_to_greyscale (line 64) | def _csr_to_greyscale(matrix): function generate_ticks (line 82) | def generate_ticks(dm): FILE: perceval/rendering/_processor_utils.py class ComponentHeraldInfo (line 32) | class ComponentHeraldInfo: method __init__ (line 37) | def __init__(self): method register_herald (line 41) | def register_herald(self, forward_pass, mode_index, herald_mode): function collect_herald_info (line 48) | def collect_herald_info(processor: Experiment, recursive: bool): FILE: perceval/rendering/canvas/canvas.py class Canvas (line 32) | class Canvas(ABC): method __init__ (line 33) | def __init__(self, inverse_Y: bool = False, **opts): method set_offset (line 46) | def set_offset(self, v: tuple[float, float], width: float, height: flo... method position (line 53) | def position(self): method relative_position (line 57) | def relative_position(self): method position (line 61) | def position(self, v): method height (line 73) | def height(self): method width (line 76) | def width(self): method add_mline (line 79) | def add_mline(self, method add_polygon (line 100) | def add_polygon(self, method add_rect (line 123) | def add_rect(self, method add_mpath (line 134) | def add_mpath(self, method add_circle (line 226) | def add_circle(self, method add_text (line 248) | def add_text(self, points: tuple[float, float], method normalize_text (line 264) | def normalize_text(self, text: str, size: float, points: tuple[float, ... method add_shape (line 300) | def add_shape(self, shape_fn, circuit, mode_style): method set_background_color (line 303) | def set_background_color(self, background_color): method background_color (line 312) | def background_color(self): method draw (line 315) | def draw(self): FILE: perceval/rendering/canvas/latex_canvas.py class LatexCanvas (line 68) | class LatexCanvas(Canvas): method __init__ (line 69) | def __init__(self, **opts): method _check_color_is_implemented (line 86) | def _check_color_is_implemented(self, color): method add_mline (line 93) | def add_mline( method add_polygon (line 113) | def add_polygon( method add_mpath (line 138) | def add_mpath( method add_circle (line 195) | def add_circle( method add_text (line 212) | def add_text(self, points, text, size, ta="left", fontstyle="normal", ... method draw (line 242) | def draw(self): FILE: perceval/rendering/canvas/mplot_canvas.py class MplotCanvas (line 41) | class MplotCanvas(Canvas): method __init__ (line 42) | def __init__(self, **opts): method add_mline (line 50) | def add_mline(self, points, stroke="black", stroke_width=1, stroke_lin... method add_polygon (line 58) | def add_polygon(self, points, stroke="black", stroke_width=1, fill=Non... method add_mpath (line 66) | def add_mpath(self, points, stroke="black", stroke_width=1, fill=None,... method add_circle (line 94) | def add_circle(self, points, r, stroke="black", stroke_width=1, fill=N... method add_text (line 101) | def add_text(self, points, text, size, ta="left", fontstyle="normal", ... method draw (line 117) | def draw(self): FILE: perceval/rendering/canvas/svg_canvas.py class SvgCanvas (line 40) | class SvgCanvas(Canvas): method __init__ (line 45) | def __init__(self, **opts): method add_mline (line 55) | def add_mline(self, points, stroke="black", stroke_width=1, stroke_lin... method add_polygon (line 61) | def add_polygon(self, points, stroke="black", stroke_width=1, fill=Non... method add_mpath (line 70) | def add_mpath(self, points, stroke="black", stroke_width=1, fill=None,... method add_circle (line 94) | def add_circle(self, points, r, stroke="black", stroke_width=1, fill=N... method add_text (line 102) | def add_text(self, points, text, size, ta="start", fontstyle="normal",... method draw (line 117) | def draw(self): FILE: perceval/rendering/circuit/_canvas_shapes.py class ShapeFactory (line 31) | class ShapeFactory: method half_circle_port_in (line 53) | def half_circle_port_in(radius: float): method half_circle_port_out (line 63) | def half_circle_port_out(radius: float, x_offset: float = 8): method triangle_port_out (line 73) | def triangle_port_out(size: float, x_offset: float = 0): method polygon_port_out (line 80) | def polygon_port_out(size: float, x_offset: float = 0): method bs_symbolic_mpath (line 89) | def bs_symbolic_mpath(compact: bool): method rounded_corner_square (line 111) | def rounded_corner_square(radius: float, length_ratio: float): FILE: perceval/rendering/circuit/abstract_skin.py class ASkin (line 38) | class ASkin(ABC): method __init__ (line 55) | def __init__(self, photonic_style: dict, style_subcircuit: dict, compa... method get_size (line 66) | def get_size(self, c: ACircuit, recursive: bool = False) -> tuple[int,... method get_size (line 86) | def get_size(self, p: Experiment, recursive: bool = False) -> tuple[in... method get_size (line 110) | def get_size(self, c: CompiledCircuit, recursive: bool = False) -> tup... method measure (line 116) | def measure(self, c: AComponent) -> tuple[int, int]: method get_width (line 125) | def get_width(self, c) -> int: method get_shape (line 132) | def get_shape(self, c) -> callable: method default_shape (line 139) | def default_shape(self, c, canvas, mode_style): method _get_display_content (line 148) | def _get_display_content(self, circuit: ACircuit) -> str: FILE: perceval/rendering/circuit/canvas_renderer.py class _PortPos (line 38) | class _PortPos: method __init__ (line 39) | def __init__(self, x, y): class CanvasRenderer (line 44) | class CanvasRenderer(ICircuitRenderer): method __init__ (line 50) | def __init__(self, nsize, canvas: Canvas, skin): method open (line 72) | def open(self): method get_circuit_size (line 83) | def get_circuit_size(self, circuit: ACircuit, recursive: bool = False)... method display_input_photons (line 86) | def display_input_photons(self, input_pos: BasicState, mode_style: lis... method add_mode_index (line 101) | def add_mode_index(self, input_mode_style = None): method add_out_port (line 131) | def add_out_port(self, n_mode: int, port: APort): method add_in_port (line 144) | def add_in_port(self, n_mode: int, port: APort): method add_detectors (line 153) | def add_detectors(self, detector_list: list) -> None: method open_subblock (line 167) | def open_subblock(self, lines: tuple[int, ...], name: str, size: tuple... method close_subblock (line 201) | def close_subblock(self, lines: tuple[int, ...]): method max_pos (line 208) | def max_pos(self, start, end, _=None): method extend_pos (line 211) | def extend_pos(self, start, end, margin: int = 0): method _add_shape (line 234) | def _add_shape(self, lines, circuit, w, shape_fn=None): method set_herald_info (line 251) | def set_herald_info(self, info): method _update_mode_style (line 254) | def _update_mode_style(self, lines, circuit, w: int): method append_circuit (line 286) | def append_circuit(self, lines, circuit): method append_subcircuit (line 293) | def append_subcircuit(self, lines, circuit): method close (line 301) | def close(self): method draw (line 319) | def draw(self): class PreRenderer (line 323) | class PreRenderer(ICircuitRenderer): method __init__ (line 331) | def __init__(self, nsize, skin): method open (line 341) | def open(self): method draw (line 344) | def draw(self): method close (line 347) | def close(self): method display_input_photons (line 350) | def display_input_photons(self, input_pos) -> None: method add_mode_index (line 353) | def add_mode_index(self) -> None: method add_out_port (line 356) | def add_out_port(self, m: int, port: APort) -> None: method add_in_port (line 359) | def add_in_port(self, m: int, content: str) -> None: method add_detectors (line 362) | def add_detectors(self, detector_list: list) -> None: method set_herald_info (line 365) | def set_herald_info(self, info): method get_circuit_size (line 368) | def get_circuit_size(self, circuit: ACircuit, recursive: bool = False): method open_subblock (line 371) | def open_subblock(self, lines, name, size, color=None): method close_subblock (line 378) | def close_subblock(self, lines): method max_pos (line 387) | def max_pos(self, start, end, _=None): method extend_pos (line 390) | def extend_pos(self, start: int, end: int, margin: int = 0): method _add_shape (line 395) | def _add_shape(self, lines, circuit, w, shape_fn=None): method _update_mode_style (line 398) | def _update_mode_style(self, lines, circuit, w: int): method append_circuit (line 416) | def append_circuit(self, lines, circuit): method append_subcircuit (line 424) | def append_subcircuit(self, lines, circuit): FILE: perceval/rendering/circuit/create_renderer.py class RendererFactory (line 40) | class RendererFactory: method get_circuit_renderer (line 70) | def get_circuit_renderer( method get_tomography_renderer (line 98) | def get_tomography_renderer( method get_graph_renderer (line 110) | def get_graph_renderer( method get_density_matrix_renderer (line 126) | def get_density_matrix_renderer( FILE: perceval/rendering/circuit/debug_skin.py class DebugSkin (line 33) | class DebugSkin(PhysSkin): method __init__ (line 34) | def __init__(self, compact_display: bool = False): method ps_shape (line 39) | def ps_shape(self, circuit: cp.PS, canvas, mode_style): method barrier_shape (line 46) | def barrier_shape(self, circuit, canvas, mode_style): FILE: perceval/rendering/circuit/display_config.py function _get_default_skin (line 48) | def _get_default_skin(): class DisplayConfig (line 60) | class DisplayConfig: method select_skin (line 68) | def select_skin(skin: type[ASkin]) -> None: method get_selected_skin (line 76) | def get_selected_skin(**kwargs) -> ASkin: method save (line 84) | def save() -> None: FILE: perceval/rendering/circuit/phys_skin.py class PhysSkin (line 43) | class PhysSkin(ASkin): method __init__ (line 46) | def __init__(self, compact_display: bool = False): method get_width (line 55) | def get_width(self, c) -> int: method get_width (line 60) | def get_width(self, c) -> int: method get_width (line 64) | def get_width(self, c) -> int: method get_width (line 68) | def get_width(self, c) -> int: method get_width (line 72) | def get_width(self, c) -> int: method get_width (line 76) | def get_width(self, c) -> int: method get_shape (line 80) | def get_shape(self, c): method get_shape (line 84) | def get_shape(self, c): method get_shape (line 88) | def get_shape(self, c): method get_shape (line 92) | def get_shape(self, c): method get_shape (line 96) | def get_shape(self, c): method get_shape (line 100) | def get_shape(self, c): method get_shape (line 104) | def get_shape(self, c): method get_shape (line 108) | def get_shape(self, c): method get_shape (line 112) | def get_shape(self, c): method get_shape (line 116) | def get_shape(self, c): method get_shape (line 120) | def get_shape(self, c): method get_shape (line 124) | def get_shape(self, c): method get_shape (line 128) | def get_shape(self, c): method get_shape (line 132) | def get_shape(self, port, location): method get_shape (line 138) | def get_shape(self, herald, location): method get_shape (line 144) | def get_shape(self, detector): method ffconf_shape (line 153) | def ffconf_shape(self, comp: AFFConfigurator, canvas, mode_style): method port_shape_in (line 177) | def port_shape_in(self, port, canvas, mode_style): method port_shape_out (line 182) | def port_shape_out(self, port, canvas, mode_style): method pnr_detector_shape (line 187) | def pnr_detector_shape(self, detector, canvas, mode_style): method threshold_detector_shape (line 195) | def threshold_detector_shape(self, detector, canvas, mode_style): method ppnr_detector_shape (line 203) | def ppnr_detector_shape(self, detector, canvas, mode_style): method default_shape (line 211) | def default_shape(self, circuit, canvas, mode_style): method _reflective_side (line 223) | def _reflective_side(theta, convention: cp.BSConvention) -> int: method bs_shape (line 240) | def bs_shape(self, bs, canvas, mode_style): method ps_shape (line 268) | def ps_shape(self, circuit, canvas, mode_style): method lc_shape (line 275) | def lc_shape(self, circuit, canvas, mode_style): method pbs_shape (line 286) | def pbs_shape(self, circuit, canvas, mode_style): method td_shape (line 297) | def td_shape(self, circuit, canvas, mode_style): method unitary_shape (line 308) | def unitary_shape(self, circuit, canvas, mode_style): method barrier_shape (line 315) | def barrier_shape(self, barrier, canvas, mode_style): method perm_shape (line 328) | def perm_shape(self, circuit, canvas, mode_style): method wp_shape (line 337) | def wp_shape(self, circuit, canvas, mode_style): method pr_shape (line 346) | def pr_shape(self, circuit, canvas, mode_style): method subcircuit_shape (line 354) | def subcircuit_shape(self, circuit, canvas, mode_style): method herald_shape_in (line 363) | def herald_shape_in(self, herald, canvas, mode_style): method herald_shape_out (line 369) | def herald_shape_out(self, herald, canvas, mode_style): method comp_circuit_shape (line 383) | def comp_circuit_shape(self, circuit, canvas, mode_style): FILE: perceval/rendering/circuit/renderer_interface.py class ICircuitRenderer (line 36) | class ICircuitRenderer(ABC): method __init__ (line 44) | def __init__(self, nsize): method set_mode_style (line 57) | def set_mode_style(self, index, style): method render_circuit (line 60) | def render_circuit(self, method get_circuit_size (line 106) | def get_circuit_size(self, circuit: ACircuit, recursive: bool = False)... method max_pos (line 112) | def max_pos(self, start, end) -> int: method extend_pos (line 118) | def extend_pos(self, start: int, end: int, margin: int = 0) -> None: method open (line 124) | def open(self) -> None: method close (line 130) | def close(self) -> None: method open_subblock (line 137) | def open_subblock(self, lines: tuple[int, ...], name: str, size: tuple... method close_subblock (line 143) | def close_subblock(self, lines: tuple[int, ...]) -> None: method draw (line 149) | def draw(self) -> any: method append_subcircuit (line 156) | def append_subcircuit(self, lines: tuple[int, ...], circuit: Circuit) ... method append_circuit (line 162) | def append_circuit(self, lines: tuple[int, ...], circuit: ACircuit) ->... method add_mode_index (line 168) | def add_mode_index(self, input_mode_style = None) -> None: method display_input_photons (line 174) | def display_input_photons(self, input_pos, mode_style: list[ModeType])... method add_out_port (line 180) | def add_out_port(self, m: int, port: APort) -> None: method add_in_port (line 186) | def add_in_port(self, m: int, port: APort) -> None: method add_detectors (line 192) | def add_detectors(self, detector_list: list) -> None: method set_herald_info (line 197) | def set_herald_info(self, info): method subblock_info (line 206) | def subblock_info(self) -> dict: FILE: perceval/rendering/circuit/skin_common.py function bs_convention_color (line 40) | def bs_convention_color(convention): FILE: perceval/rendering/circuit/symb_skin.py class SymbSkin (line 41) | class SymbSkin(ASkin): method __init__ (line 42) | def __init__(self, compact_display: bool = False): method get_width (line 51) | def get_width(self, c) -> int: method get_width (line 56) | def get_width(self, c) -> int: method get_width (line 60) | def get_width(self, c) -> int: method get_width (line 64) | def get_width(self, c) -> int: method get_width (line 68) | def get_width(self, c: cp.Barrier) -> int: method get_width (line 72) | def get_width(self, c) -> int: method get_width (line 77) | def get_width(self, c) -> int: method get_shape (line 81) | def get_shape(self, c): method get_shape (line 85) | def get_shape(self, c): method get_shape (line 89) | def get_shape(self, c): method get_shape (line 93) | def get_shape(self, c): method get_shape (line 97) | def get_shape(self, c): method get_shape (line 101) | def get_shape(self, c): method get_shape (line 105) | def get_shape(self, c): method get_shape (line 109) | def get_shape(self, c): method get_shape (line 113) | def get_shape(self, c): method get_shape (line 117) | def get_shape(self, c): method get_shape (line 121) | def get_shape(self, c): method get_shape (line 125) | def get_shape(self, c): method get_shape (line 129) | def get_shape(self, c): method get_shape (line 133) | def get_shape(self, c): method get_shape (line 137) | def get_shape(self, c): method get_shape (line 141) | def get_shape(self, port, location): method get_shape (line 147) | def get_shape(self, herald, location): method ffconf_shape (line 152) | def ffconf_shape(self, comp: AFFConfigurator, canvas, mode_style): method get_shape (line 177) | def get_shape(self, detector): method default_shape (line 180) | def default_shape(self, circuit, canvas, mode_style): method bs_shape (line 191) | def bs_shape(self, bs, canvas, mode_style): method ps_shape (line 199) | def ps_shape(self, circuit, canvas, mode_style): method lc_shape (line 205) | def lc_shape(self, circuit, canvas, mode_style): method pbs_shape (line 216) | def pbs_shape(self, circuit, canvas, mode_style): method td_shape (line 238) | def td_shape(self, circuit, canvas, mode_style): method unitary_shape (line 249) | def unitary_shape(self, circuit, canvas, mode_style): method barrier_shape (line 257) | def barrier_shape(self, barrier: cp.Barrier, canvas, mode_style): method perm_shape (line 268) | def perm_shape(self, circuit, canvas, mode_style): method wp_shape (line 279) | def wp_shape(self, circuit, canvas, mode_style): method hwp_shape (line 287) | def hwp_shape(self, circuit, canvas, mode_style): method qwp_shape (line 294) | def qwp_shape(self, circuit, canvas, mode_style): method pr_shape (line 300) | def pr_shape(self, circuit, canvas, mode_style): method subcircuit_shape (line 306) | def subcircuit_shape(self, circuit, canvas, mode_style): method herald_shape_in (line 315) | def herald_shape_in(self, herald, canvas, mode_style): method herald_shape_out (line 321) | def herald_shape_out(self, herald, canvas, mode_style): method port_shape_in (line 327) | def port_shape_in(self, port, canvas, mode_style): method port_shape_out (line 332) | def port_shape_out(self, port, canvas, mode_style): method detector_shape (line 337) | def detector_shape(self, detector, canvas, mode_style): method comp_circuit_shape (line 345) | def comp_circuit_shape(self, circuit, canvas, mode_style): FILE: perceval/rendering/circuit/text_renderer.py class TextRenderer (line 37) | class TextRenderer(ICircuitRenderer): method __init__ (line 40) | def __init__(self, nsize, hc=3, min_box_size=5): method get_circuit_size (line 50) | def get_circuit_size(self, circuit: ACircuit, recursive: bool = False): method open (line 53) | def open(self): method close (line 57) | def close(self): method max_pos (line 62) | def max_pos(self, start, end, header=False): method extend_pos (line 69) | def extend_pos(self, start, end, internal=False, header=False): method open_subblock (line 78) | def open_subblock(self, lines, name, size, color=None): method close_subblock (line 91) | def close_subblock(self, lines): method append_subcircuit (line 104) | def append_subcircuit(self, lines, circuit): method append_circuit (line 111) | def append_circuit(self, lines, circuit): method draw (line 190) | def draw(self): method _set_offset (line 193) | def _set_offset(self, offset): method add_mode_index (line 201) | def add_mode_index(self, input_mode_style = None): method display_input_photons (line 208) | def display_input_photons(self, input_pos, mode_style) -> None: method add_out_port (line 211) | def add_out_port(self, n_mode: int, port: APort): method add_in_port (line 219) | def add_in_port(self, n_mode: int, port: APort): method add_detectors (line 235) | def add_detectors(self, detector_list: list) -> None: FILE: perceval/rendering/drawsvg_wrapper.py class DrawsvgWrapper (line 33) | class DrawsvgWrapper: method __init__ (line 36) | def __init__(self, res: Any): FILE: perceval/rendering/format.py class Format (line 33) | class Format(Enum): FILE: perceval/rendering/mplotlib_renderers/_mplot_utils.py function autoselect_backend (line 39) | def autoselect_backend(): function _get_sub_figure (line 72) | def _get_sub_figure(ax: Axes3D, array: numpy.array, basis_name: list): FILE: perceval/rendering/mplotlib_renderers/density_matrix_renderer.py class DensityMatrixRenderer (line 34) | class DensityMatrixRenderer: method __init__ (line 35) | def __init__(self, method render (line 51) | def render(self, dm): FILE: perceval/rendering/mplotlib_renderers/graph_renderer.py class GraphRenderer (line 34) | class GraphRenderer: method __init__ (line 35) | def __init__(self): method render (line 38) | def render(self, g: nx.Graph): FILE: perceval/rendering/mplotlib_renderers/tomography_renderer.py function _generate_pauli_captions (line 39) | def _generate_pauli_captions(nqubit: int): class TomographyRenderer (line 51) | class TomographyRenderer: method __init__ (line 52) | def __init__(self, render_size, mplot_noshow: bool, mplot_savefig: str): method render (line 57) | def render(self, qpt: AProcessTomography, precision: float): FILE: perceval/rendering/pdisplay.py function in_ide (line 56) | def in_ide(): function pdisplay_circuit (line 76) | def pdisplay_circuit( function pdisplay_processor (line 105) | def pdisplay_processor(processor: AProcessor, function pdisplay_experiment (line 116) | def pdisplay_experiment(processor: Experiment, function pdisplay_matrix (line 212) | def pdisplay_matrix(matrix: Matrix, precision: float = 1e-6, output_form... function pdisplay_analyzer (line 257) | def pdisplay_analyzer(analyzer: Analyzer, output_format: Format = Format... function pdisplay_state_distrib (line 269) | def pdisplay_state_distrib(sv: StateVector | BSDistribution | SVDistribu... function pdisplay_bs_samples (line 312) | def pdisplay_bs_samples(bs_samples: BSSamples, output_format: Format = F... function pdisplay_tomography_chi (line 318) | def pdisplay_tomography_chi(qpt: AProcessTomography, output_format: Form... function pdisplay_density_matrix (line 324) | def pdisplay_density_matrix(dm, function pdisplay_graph (line 342) | def pdisplay_graph(g: nx.Graph, output_format: Format = Format.MPLOT): function pdisplay_job_group (line 347) | def pdisplay_job_group(jg: JobGroup, output_format: Format = Format.TEXT): function _pdisplay (line 359) | def _pdisplay(o, **kwargs): function _pdisplay (line 363) | def _pdisplay(dm, **kwargs): function _pdisplay (line 367) | def _pdisplay(qpt, **kwargs): function _pdisplay (line 372) | def _pdisplay(jg, **kwargs): function _pdisplay (line 377) | def _pdisplay(circuit, **kwargs): function _pdisplay (line 382) | def _pdisplay(processor, **kwargs): function _pdisplay (line 387) | def _pdisplay(experiment, **kwargs): function _pdisplay (line 392) | def _pdisplay(matrix, **kwargs): function _pdisplay (line 397) | def _pdisplay(analyzer, **kwargs): function _pdisplay (line 402) | def _pdisplay(distrib, **kwargs): function _pdisplay (line 410) | def _pdisplay(bsc, **kwargs): function _pdisplay (line 415) | def _pdisplay(bssamples, **kwargs): function _get_simple_number_kwargs (line 419) | def _get_simple_number_kwargs(**kwargs): function _pdisplay (line 428) | def _pdisplay(f, **kwargs): function _pdisplay (line 433) | def _pdisplay(c, **kwargs): function _pdisplay (line 437) | def _pdisplay(g, **kwargs): function _default_output_format (line 441) | def _default_output_format(o): function pdisplay (line 454) | def pdisplay(o, output_format: Format = None, **opts): function pdisplay_to_file (line 502) | def pdisplay_to_file(o, path: str, output_format: Format = None, **opts): FILE: perceval/runtime/check_cancel.py function cancel_requested (line 30) | def cancel_requested(exec_request: dict = None): FILE: perceval/runtime/job.py class Job (line 38) | class Job(ABC): method __init__ (line 39) | def __init__(self, result_mapping_function: callable = None, command_p... method name (line 46) | def name(self) -> str: method name (line 53) | def name(self, new_name: str): method delta_parameters (line 60) | def delta_parameters(self) -> dict: method _handle_params (line 63) | def _handle_params(self, *args, **kwargs): method __call__ (line 87) | def __call__(self, *args, **kwargs) -> dict: method status (line 95) | def status(self) -> JobStatus: method is_complete (line 101) | def is_complete(self) -> bool: method is_failed (line 105) | def is_failed(self) -> bool: method is_success (line 109) | def is_success(self) -> bool: method is_waiting (line 113) | def is_waiting(self) -> bool: method is_running (line 117) | def is_running(self) -> bool: method execute_sync (line 121) | def execute_sync(self, *args, **kwargs) -> dict: method execute_async (line 125) | def execute_async(self, *args, **kwargs) -> Job: method cancel (line 137) | def cancel(self): method _get_results (line 143) | def _get_results(self): method get_results (line 146) | def get_results(self) -> dict: FILE: perceval/runtime/job_group.py class JobGroup (line 48) | class JobGroup: method __init__ (line 66) | def __init__(self, name: str): method __len__ (line 81) | def __len__(self): method __getitem__ (line 84) | def __getitem__(self, index): method name (line 88) | def name(self) -> str: method remote_jobs (line 95) | def remote_jobs(self) -> list[RemoteJob]: method _to_json (line 101) | def _to_json(self) -> dict: method _from_json (line 110) | def _from_json(self, json_data: dict) -> None: method _write_to_file (line 116) | def _write_to_file(self) -> None: method _load_job_group (line 123) | def _load_job_group(self) -> None: method _build_remote_job (line 131) | def _build_remote_job(job_entry: dict) -> RemoteJob: method list_locally_saved (line 141) | def list_locally_saved() -> list[str]: method _exists_on_disk (line 150) | def _exists_on_disk(name: str) -> bool: method add (line 156) | def add(self, job_to_add: Job, **kwargs) -> None: method _update_job_statuses (line 176) | def _update_job_statuses(self): method progress (line 187) | def progress(self) -> dict: method track_progress (line 231) | def track_progress(self) -> None: method delete_all_job_groups (line 283) | def delete_all_job_groups() -> None: method delete_job_group (line 291) | def delete_job_group(name: str) -> None: method delete_job_groups_date (line 301) | def delete_job_groups_date(del_before_date: datetime) -> None: method _list_jobs_status_type (line 320) | def _list_jobs_status_type(self, statuses: list[RunningStatus]) -> lis... method list_successful_jobs (line 329) | def list_successful_jobs(self) -> list[RemoteJob]: method list_active_jobs (line 335) | def list_active_jobs(self) -> list[RemoteJob]: method list_unsuccessful_jobs (line 342) | def list_unsuccessful_jobs(self) -> list[RemoteJob]: method list_unsent_jobs (line 348) | def list_unsent_jobs(self) -> list[RemoteJob]: method _launch_wait_jobs (line 354) | def _launch_wait_jobs(self, concurrent_job_count: int | None, delay: f... method run_sequential (line 422) | def run_sequential(self, delay: float) -> None: method rerun_failed_sequential (line 434) | def rerun_failed_sequential(self, delay: float, replace_failed_jobs=Tr... method run_parallel (line 449) | def run_parallel(self) -> None: method rerun_failed_parallel (line 458) | def rerun_failed_parallel(self, replace_failed_jobs=True) -> None: method launch_async_jobs (line 471) | def launch_async_jobs(self, concurrent_job_count = None): method relaunch_async_failed_jobs (line 497) | def relaunch_async_failed_jobs(self, replace_failed_jobs=True, concurr... method _get_jobs_availability (line 534) | def _get_jobs_availability(jobs, concurrent_job_count = None): method cancel_all (line 559) | def cancel_all(self): method get_results (line 571) | def get_results(self) -> list[dict]: FILE: perceval/runtime/job_status.py class RunningStatus (line 37) | class RunningStatus(Enum): method from_server_response (line 48) | def from_server_response(res: str) -> RunningStatus: method to_server_response (line 66) | def to_server_response(status: RunningStatus) -> str: class JobStatus (line 93) | class JobStatus: method __init__ (line 97) | def __init__(self): method __call__ (line 109) | def __call__(self) -> str: method status (line 118) | def status(self) -> RunningStatus: method status (line 125) | def status(self, status: RunningStatus): method start_run (line 128) | def start_run(self): method stop_run (line 136) | def stop_run(self, cause: RunningStatus = RunningStatus.SUCCESS, mesg:... method update_progress (line 151) | def update_progress(self, progress: float, phase: str | None = None): method update_times (line 167) | def update_times(self, creation_datetime: float, start_time: float, du... method creation_timestamp (line 182) | def creation_timestamp(self) -> float: method start_timestamp (line 189) | def start_timestamp(self) -> float: method duration (line 196) | def duration(self) -> float: method waiting (line 203) | def waiting(self) -> bool: method running (line 210) | def running(self) -> bool: method completed (line 217) | def completed(self) -> bool: method canceled (line 225) | def canceled(self) -> bool: method success (line 232) | def success(self) -> bool: method failed (line 239) | def failed(self) -> bool: method maybe_completed (line 246) | def maybe_completed(self) -> bool: method unknown (line 254) | def unknown(self) -> bool: method stop_message (line 261) | def stop_message(self) -> str | None: method progress (line 268) | def progress(self) -> float: method running_time (line 275) | def running_time(self) -> float: method __str__ (line 282) | def __str__(self) -> str: FILE: perceval/runtime/local_job.py class LocalJob (line 38) | class LocalJob(Job): method __init__ (line 48) | def __init__(self, method delta_parameters (line 63) | def delta_parameters(self) -> dict: method set_progress_callback (line 66) | def set_progress_callback(self, callback: callable): # Signature must... method status (line 77) | def status(self) -> JobStatus: method _progress_cb (line 82) | def _progress_cb(self, progress: float, phase: str | None = None): method execute_sync (line 90) | def execute_sync(self, *args, **kwargs) -> dict: method _call_fn_safe (line 109) | def _call_fn_safe(self, *args, **kwargs): method execute_async (line 125) | def execute_async(self, *args, **kwargs) -> LocalJob: method cancel (line 137) | def cancel(self): method _get_results (line 140) | def _get_results(self): FILE: perceval/runtime/payload_generator.py class PayloadGenerator (line 40) | class PayloadGenerator: method generate_payload (line 43) | def generate_payload(command: str, FILE: perceval/runtime/remote_config.py class RemoteConfig (line 47) | class RemoteConfig: method __init__ (line 57) | def __init__(self, persistent_data: PersistentData = PersistentData()): method _get_deprecated_token (line 60) | def _get_deprecated_token(self): method _get_remote_config (line 74) | def _get_remote_config(self, key) -> str | dict[str, str] | None: method _get_token_from_env_var (line 81) | def _get_token_from_env_var() -> str | None: method set_proxies (line 85) | def set_proxies(proxies: dict[str, str]) -> None: method get_proxies (line 100) | def get_proxies(self) -> dict[str, str]: method set_url (line 107) | def set_url(url: str) -> None: method get_url (line 115) | def get_url(self) -> str: method set_token (line 129) | def set_token(token: str) -> None: method get_token (line 137) | def get_token(self) -> str: method set_token_env_var (line 152) | def set_token_env_var(env_var: str) -> None: method get_token_env_var (line 164) | def get_token_env_var() -> str: method set_cloud_maximal_job_count (line 170) | def set_cloud_maximal_job_count(count: int) -> None: method get_cloud_maximal_job_count (line 175) | def get_cloud_maximal_job_count() -> int: method clear_cache (line 179) | def clear_cache(): method save (line 185) | def save(self) -> None: FILE: perceval/runtime/remote_job.py function _retrieve_from_response (line 43) | def _retrieve_from_response(response: dict, field: str, default_value: a... class RemoteJob (line 55) | class RemoteJob(Job): method __init__ (line 87) | def __init__(self, request_data: dict, rpc_handler: RPCHandler, job_na... method delta_parameters (line 104) | def delta_parameters(self) -> SerializedDict: method was_sent (line 108) | def was_sent(self) -> bool: method id (line 115) | def id(self) -> str | None: method from_id (line 124) | def from_id(job_id: str, rpc_handler: RPCHandler) -> RemoteJob: method _from_dict (line 137) | def _from_dict(my_dict: dict, rpc_handler): method _to_dict (line 154) | def _to_dict(self): method set_job_group_name (line 173) | def set_job_group_name(self, group_name: str): method _handle_status_error (line 176) | def _handle_status_error(self, error): method status (line 202) | def status(self) -> JobStatus: method _extract_job_times (line 228) | def _extract_job_times(self, response: dict) -> tuple[float, float, int]: method execute_sync (line 240) | def execute_sync(self, *args, **kwargs) -> dict: method _create_payload_data (line 258) | def _create_payload_data(self, *args, **kwargs) -> dict: method execute_async (line 274) | def execute_async(self, *args, **kwargs) -> RemoteJob: method _check_max_shots_samples_validity (line 287) | def _check_max_shots_samples_validity(self): method cancel (line 295) | def cancel(self): method rerun (line 306) | def rerun(self) -> RemoteJob: method _get_results (line 325) | def _get_results(self) -> dict | None: method __str__ (line 354) | def __str__(self): FILE: perceval/runtime/remote_processor.py class RemoteProcessor (line 48) | class RemoteProcessor(AProcessor): method from_local_processor (line 50) | def from_local_processor( method __init__ (line 70) | def __init__(self, method _circuit_change_observer (line 124) | def _circuit_change_observer(self, new_component: Experiment | ACompon... method _noise_changed_observer (line 137) | def _noise_changed_observer(self): method is_remote (line 144) | def is_remote(self) -> bool: method fetch_data (line 147) | def fetch_data(self): method specs (line 161) | def specs(self): method performance (line 165) | def performance(self): method constraints (line 169) | def constraints(self) -> dict: method status (line 175) | def status(self): method check_circuit_size (line 178) | def check_circuit_size(self, m: int): method check_circuit (line 186) | def check_circuit(self, circuit: ACircuit): method set_circuit (line 189) | def set_circuit(self, circuit: ACircuit): method get_rpc_handler (line 194) | def get_rpc_handler(self): method type (line 198) | def type(self) -> ProcessorType: method check_input (line 201) | def check_input(self, input_state: FockState) -> None: method available_commands (line 219) | def available_commands(self) -> list[str]: method prepare_job_payload (line 222) | def prepare_job_payload(self, command: str, **kwargs) -> dict[str, any]: method resume_job (line 233) | def resume_job(self, job_id: str) -> RemoteJob: method _compute_sample_of_interest_probability (line 236) | def _compute_sample_of_interest_probability(self, param_values: dict =... method estimate_required_shots (line 272) | def estimate_required_shots(self, nsamples: int, param_values: dict = ... method estimate_expected_samples (line 287) | def estimate_expected_samples(self, nshots: int, param_values: dict = ... method log_resources (line 300) | def log_resources(self, command: str, extra_parameters: dict): method compute_physical_logical_perf (line 321) | def compute_physical_logical_perf(self, value: bool): FILE: perceval/runtime/rpc_handler.py class RPCHandler (line 51) | class RPCHandler: method __init__ (line 62) | def __init__(self, name, url, token, proxies = None): method build_endpoint (line 70) | def build_endpoint(self, endpoint: str, *args: str): method get_request (line 81) | def get_request(self, endpoint: str) -> None | dict: method post_request (line 98) | def post_request(self, endpoint: str, payload: dict | None, with_json_... method fetch_platform_details (line 121) | def fetch_platform_details(self): method create_job (line 140) | def create_job(self, payload) -> str: method cancel_job (line 152) | def cancel_job(self, job_id: str) -> None: method rerun_job (line 160) | def rerun_job(self, job_id: str) -> str: method get_job_status (line 171) | def get_job_status(self, job_id: str) -> dict: method get_job_results (line 180) | def get_job_results(self, job_id: str) -> dict: method get_job_availability (line 189) | def get_job_availability(self) -> dict: FILE: perceval/runtime/session.py class ISession (line 34) | class ISession(ABC): method build_remote_processor (line 40) | def build_remote_processor(self) -> RemoteProcessor: method start (line 45) | def start(self): method stop (line 48) | def stop(self): method __enter__ (line 51) | def __enter__(self): method __exit__ (line 55) | def __exit__(self, exc_type, exc_val, exc_tb) -> bool: FILE: perceval/serialization/_circuit_serialization.py class ComponentSerializer (line 42) | class ComponentSerializer: method __init__ (line 43) | def __init__(self): method serialize (line 46) | def serialize(self, r: int, c: AComponent): method _convert_bs_convention (line 53) | def _convert_bs_convention(self, convention): method _serialize (line 61) | def _serialize(self, bs: comp.BS): method _serialize (line 72) | def _serialize(self, ps: comp.PS): method _serialize (line 80) | def _serialize(self, p: comp.PERM): method _serialize (line 86) | def _serialize(self, unitary: comp.Unitary): method _serialize (line 96) | def _serialize(self, _): method _serialize (line 101) | def _serialize(self, wp: comp.QWP): method _serialize (line 107) | def _serialize(self, wp: comp.HWP): method _serialize (line 113) | def _serialize(self, wp: comp.WP): method _serialize (line 120) | def _serialize(self, td: nu.TD): method _serialize (line 126) | def _serialize(self, lc: nu.LC): method _serialize (line 132) | def _serialize(self, pr: comp.PR): method _serialize (line 138) | def _serialize(self, barrier: comp.Barrier): method _serialize (line 144) | def _serialize(self, ffconfigurator: FFConfigurator): method _serialize (line 166) | def _serialize(self, ffcp: FFCircuitProvider): method _serialize (line 189) | def _serialize(self, circuit: Circuit): method _serialize (line 194) | def _serialize(self, circuit: CompiledCircuit): function serialize_circuit (line 199) | def serialize_circuit(circuit: ACircuit) -> pb.Circuit: function serialize_compiled_circuit (line 213) | def serialize_compiled_circuit(circuit: CompiledCircuit) -> pb.CompiledC... function serialize_component (line 223) | def serialize_component(component: AComponent) -> pb.Component: function serialize_herald (line 227) | def serialize_herald(herald: Herald) -> pb.Herald: function serialize_port (line 236) | def serialize_port(port: Port) -> pb.Port: FILE: perceval/serialization/_component_deserialization.py function deserialize_ps (line 41) | def deserialize_ps(serial_ps: pb.PhaseShifter, known_params: dict = None... function _convert_bs_convention (line 48) | def _convert_bs_convention(ser_convention): function deserialize_bs (line 56) | def deserialize_bs(serial_bs: pb.BeamSplitter, known_params: dict = None... function deserialize_perm (line 66) | def deserialize_perm(serial_perm, _) -> comp.PERM: function deserialize_unitary (line 70) | def deserialize_unitary(serial_unitary, _) -> comp.Unitary: function deserialize_wp (line 75) | def deserialize_wp(serial_wp, known_params: dict = None) -> comp.WP: function deserialize_qwp (line 80) | def deserialize_qwp(serial_qwp, known_params: dict = None) -> comp.QWP: function deserialize_hwp (line 84) | def deserialize_hwp(serial_hwp, known_params: dict = None) -> comp.HWP: function deserialize_dt (line 88) | def deserialize_dt(serial_dt, known_params: dict = None) -> nu.TD: function deserialize_lc (line 92) | def deserialize_lc(serial_lc, known_params: dict = None) -> nu.LC: function deserialize_pr (line 96) | def deserialize_pr(serial_pr, known_params: dict = None) -> comp.PR: function deserialize_pbs (line 100) | def deserialize_pbs(_, __) -> comp.PBS: function deserialize_barrier (line 104) | def deserialize_barrier(m: int, serial_barrier, _) -> comp.Barrier: function deserialize_ff_configurator (line 108) | def deserialize_ff_configurator(m: int, serial_ffc, known_params: dict =... function deserialize_ff_circuit_provider (line 122) | def deserialize_ff_circuit_provider(m: int, serial_ffcp, known_params: d... function deserialize_cc (line 140) | def deserialize_cc(serial_cc, known_params: dict = None) -> CompiledCirc... FILE: perceval/serialization/_detector_serialization.py function serialize_bs_layer (line 33) | def serialize_bs_layer(detector: BSLayeredPPNR): function deserialize_bs_layer (line 41) | def deserialize_bs_layer(pb_d: pb.BSLayeredPPNR) -> BSLayeredPPNR: function serialize_detector (line 47) | def serialize_detector(detector: Detector): function deserialize_detector (line 59) | def deserialize_detector(pb_d: pb.Detector) -> Detector: FILE: perceval/serialization/_experiment_serialization.py class ExperimentSerializer (line 40) | class ExperimentSerializer: method __init__ (line 42) | def __init__(self): method serialize (line 45) | def serialize(self, experiment: Experiment): method _serialize_port (line 74) | def _serialize_port(port): method _serialize_port (line 81) | def _serialize_port(port): method _serialize_ports (line 86) | def _serialize_ports(self, in_ports: dict[APort, list[int]], out_ports... method _serialize_detector (line 97) | def _serialize_detector(detector): method _serialize_detector (line 104) | def _serialize_detector(detector): method _serialize_detectors (line 109) | def _serialize_detectors(self, detectors: list[IDetector]): method _serialize_components (line 115) | def _serialize_components(self, components: list[tuple[tuple, ACompone... function serialize_experiment (line 122) | def serialize_experiment(experiment: Experiment): FILE: perceval/serialization/_matrix_serialization.py function serialize_matrix (line 37) | def serialize_matrix(m: Matrix) -> pb.Matrix: function _deserialize_numeric (line 63) | def _deserialize_numeric(pb_mat): function _deserialize_symbolic (line 76) | def _deserialize_symbolic(pb_mat): function deserialize_pb_matrix (line 89) | def deserialize_pb_matrix(pb_mat: pb.Matrix) -> Matrix: FILE: perceval/serialization/_parameter_serialization.py function serialize_parameter (line 34) | def serialize_parameter(param: Parameter | float): function deserialize_parameter (line 66) | def deserialize_parameter(serial_param: pb.Parameter, known_params = None): FILE: perceval/serialization/_port_deserialization.py function deserialize_herald (line 37) | def deserialize_herald(serial_herald) -> port.Herald: function deserialize_port (line 52) | def deserialize_port(serial_port) -> port.Port: FILE: perceval/serialization/_serialized_containers.py class SerializedDict (line 36) | class SerializedDict(dict): method __init__ (line 47) | def __init__(self, *args, **kwargs): method __setitem__ (line 53) | def __setitem__(self, key, value): method setdefault (line 56) | def setdefault(self, key, default = None, /): method __delitem__ (line 61) | def __delitem__(self, key): method __getitem__ (line 64) | def __getitem__(self, item): method get (line 67) | def get(self, key, default=None): method pop (line 70) | def pop(self, key, default=None): method fromkeys (line 74) | def fromkeys(*args, **kwargs): method __contains__ (line 77) | def __contains__(self, item): method update (line 80) | def update(self, E=None, **F): method __ior__ (line 92) | def __ior__(self, other): method __or__ (line 96) | def __or__(self, other): class SerializedList (line 102) | class SerializedList(list): method __init__ (line 113) | def __init__(self, seq=()): method __setitem__ (line 117) | def __setitem__(self, key, value): method append (line 120) | def append(self, value): method count (line 123) | def count(self, __value): method extend (line 126) | def extend(self, __iterable): method index (line 129) | def index(self, __value, __start = 0, __stop = sys.maxsize): method insert (line 132) | def insert(self, __index, value): method remove (line 135) | def remove(self, value): method __add__ (line 138) | def __add__(self, other): method __iadd__ (line 141) | def __iadd__(self, other): method __contains__ (line 144) | def __contains__(self, item): method __delitem__ (line 147) | def __delitem__(self, key): function make_serialized (line 152) | def make_serialized(d: dict): function make_serialized (line 158) | def make_serialized(l: list): function make_serialized (line 164) | def make_serialized(o: object): FILE: perceval/serialization/_state_serialization.py function serialize_state (line 36) | def serialize_state(state: BasicState) -> str: function deserialize_state (line 40) | def deserialize_state(serial_bs) -> BasicState: function deserialize_state_list (line 44) | def deserialize_state_list(states): function serialize_statevector (line 49) | def serialize_statevector(sv: StateVector) -> str: function deserialize_statevector (line 59) | def deserialize_statevector(s) -> StateVector: function serialize_bssamples (line 68) | def serialize_bssamples(bss: BSSamples) -> str: function deserialize_bssamples (line 82) | def deserialize_bssamples(serialized_bss: str) -> BSSamples: FILE: perceval/serialization/deserialize.py function deserialize_float (line 63) | def deserialize_float(floatstring): function deserialize_matrix (line 67) | def deserialize_matrix(pb_mat: str | pb.Matrix) -> Matrix: function matrix_from_file (line 78) | def matrix_from_file(filepath: str) -> Matrix: function deserialize_circuit (line 88) | def deserialize_circuit(pb_circ: str | bytes | pb.Circuit, known_params:... function circuit_from_file (line 102) | def circuit_from_file(filepath: str) -> Circuit: function deserialize_component (line 112) | def deserialize_component(pb_c: pb.Component, known_params: dict = None)... function deserialize_experiment (line 124) | def deserialize_experiment(pb_e: pb.Experiment, known_params: dict = Non... function deserialize_compiled_circuit (line 137) | def deserialize_compiled_circuit(pb_cc: pb.CompiledCircuit, known_params... function deserialize_svdistribution (line 149) | def deserialize_svdistribution(serial_svd) -> SVDistribution: function deserialize_bsdistribution (line 160) | def deserialize_bsdistribution(serial_bsd) -> BSDistribution: function deserialize_bscount (line 171) | def deserialize_bscount(serial_bsc) -> BSCount: function deserialize_noise_model (line 182) | def deserialize_noise_model(serial_nm: str) -> NoiseModel: function deserialize_postselect (line 186) | def deserialize_postselect(serial_ps: str) -> PostSelect: function deserialize_bs_layered_detector (line 190) | def deserialize_bs_layered_detector(pb_detect: str | bytes | pb.BSLayere... function deserialize_detector (line 201) | def deserialize_detector(pb_detect: str | bytes | pb.Detector) -> Detector: function deserialize (line 234) | def deserialize(obj, strict=True): function deserialize_file (line 272) | def deserialize_file(filepath: str, strict=True): class CircuitBuilder (line 282) | class CircuitBuilder: method __init__ (line 304) | def __init__(self, m: int, name: str, params: dict): method add (line 310) | def add(self, serial_comp): method retrieve (line 314) | def retrieve(self): method deserialize (line 318) | def deserialize(serial_comp, params): class ExperimentBuilder (line 336) | class ExperimentBuilder: method __init__ (line 347) | def __init__(self, pb_e: pb.Experiment, params: dict): method deserialize_ports (line 351) | def deserialize_ports(self, experiment, serialized_port_map, location:... method resolve (line 363) | def resolve(self): FILE: perceval/serialization/serialize.py function b64encoding (line 47) | def b64encoding(obj: bytes) -> str: function _handle_compress_parameter (line 52) | def _handle_compress_parameter(compress, type_str) -> bool: function _handle_compress_parameter (line 57) | def _handle_compress_parameter(compress, type_str) -> bool: function _handle_compression (line 61) | def _handle_compression(serialized_obj: str, do_compress: bool) -> str: function serialize (line 70) | def serialize(component: AComponent, compress=None) -> str: function serialize (line 81) | def serialize(circuit: ACircuit, compress=None) -> str: function serialize (line 92) | def serialize(experiment: Experiment, compress=None) -> str: function serialize (line 103) | def serialize(compiled_circuit: CompiledCircuit, compress=None) -> str: function serialize (line 114) | def serialize(herald: Herald, compress=None) -> str: function serialize (line 124) | def serialize(port: Port, compress=None) -> str: function serialize (line 134) | def serialize(m: Matrix, compress=None) -> str: function serialize (line 144) | def serialize(obj, compress=None) -> str: function serialize (line 154) | def serialize(sv, compress=None) -> str: function serialize (line 163) | def serialize(dist: SVDistribution, compress=None) -> str: function serialize (line 176) | def serialize(dist: BSDistribution, compress=None) -> str: function serialize (line 188) | def serialize(obj, compress=None) -> str: function serialize (line 200) | def serialize(obj, compress=None) -> str: function serialize (line 209) | def serialize(obj, compress=None): function serialize (line 218) | def serialize(ps: PostSelect, compress=None): function serialize (line 227) | def serialize(obj: BSLayeredPPNR, compress=None): function serialize (line 237) | def serialize(obj: Detector, compress=None): function serialize (line 247) | def serialize(obj, compress=None) -> dict: function serialize (line 255) | def serialize(obj, compress=None) -> list: function serialize (line 263) | def serialize(obj, compress=None) -> object: function serialize_to_file (line 267) | def serialize_to_file(obj, filepath: str, compress=None) -> None: FILE: perceval/serialization/serialize_binary.py function serialize_binary (line 45) | def serialize_binary(circuit: ACircuit): function serialize_binary (line 50) | def serialize_binary(matrix: Matrix): FILE: perceval/simulators/_simulate_detectors.py function heralds_compatible_threshold (line 36) | def heralds_compatible_threshold(s: FockState, heralds: dict[int, int]) ... function compute_distributions (line 50) | def compute_distributions(s: FockState, detectors: list[IDetector], hera... function simulate_detectors (line 85) | def simulate_detectors(dist: BSDistribution, detectors: list[IDetector],... function simulate_detectors_sample (line 152) | def simulate_detectors_sample(sample: FockState, detectors: list[IDetect... FILE: perceval/simulators/_simulator_utils.py function _to_bsd (line 39) | def _to_bsd(sv: StateVector) -> BSDistribution: function _inject_annotation (line 49) | def _inject_annotation(sv: StateVector, annotation: Annotation) -> State... function _inject_annotation (line 60) | def _inject_annotation(sv: StateVector, annotation: int) -> StateVector: function _merge_sv (line 68) | def _merge_sv(sv1: StateVector, sv2: StateVector, prob_threshold: float ... function _annot_state_mapping (line 82) | def _annot_state_mapping(bs_with_annots: FockState): function _annot_state_mapping (line 87) | def _annot_state_mapping(bs_with_annots: NoisyFockState): function _annot_state_mapping (line 92) | def _annot_state_mapping(bs_with_annots: AnnotatedFockState): function _separate_state (line 98) | def _separate_state(bs_with_annots: FockState): function _separate_state (line 103) | def _separate_state(bs_with_annots: NoisyFockState): function _separate_state (line 108) | def _separate_state(bs_with_annots: AnnotatedFockState): function _retrieve_mode_count (line 113) | def _retrieve_mode_count(component_list: list) -> int: function _unitary_components_to_circuit (line 117) | def _unitary_components_to_circuit(component_list: list, m: int = 0): function _split_by_photon_and_tag_count (line 126) | def _split_by_photon_and_tag_count(sv: StateVector) -> SVDistribution: function _list_merge (line 148) | def _list_merge(distributions: list[Iterable[tuple[FockState, float]]], ... FILE: perceval/simulators/delay_simulator.py class _CType (line 39) | class _CType(Enum): function _count_total_delay (line 45) | def _count_total_delay(component_list: list) -> int: function _compute_depth (line 49) | def _compute_depth(component_list: list, mode_count: int) -> int: class DelaySimulator (line 78) | class DelaySimulator(ASimulatorDecorator): method __init__ (line 82) | def __init__(self, simulator): method _prepare_input (line 88) | def _prepare_input(self, input_state): method _prepare_circuit (line 95) | def _prepare_circuit(self, circuit, m=None): method _prepare_detectors_impl (line 105) | def _prepare_detectors_impl(self, detectors: list[IDetector]): method _mode_range (line 110) | def _mode_range(self) -> tuple[int, int]: method _postprocess_bsd_impl (line 113) | def _postprocess_bsd_impl(self, results): method _postprocess_sv_impl (line 122) | def _postprocess_sv_impl(self, results: StateVector) -> StateVector: method _transmit_heralds_postselect (line 131) | def _transmit_heralds_postselect(self): method _expand_td (line 141) | def _expand_td(self, component_list: list): FILE: perceval/simulators/feed_forward_simulator.py class FFSimulator (line 42) | class FFSimulator(ISimulator): method __init__ (line 44) | def __init__(self, backend: AStrongSimulationBackend): method compute_physical_logical_perf (line 53) | def compute_physical_logical_perf(self, value: bool): method set_circuit (line 58) | def set_circuit(self, circuit: Processor | Experiment | list[tuple[tup... method set_noise (line 68) | def set_noise(self, nm: NoiseModel): method set_source (line 72) | def set_source(self, source: Source): method _probs_svd (line 75) | def _probs_svd(self, method _find_next_simulation_layer (line 172) | def _find_next_simulation_layer(self) -> tuple[list[tuple[int, AFFConf... method _get_sim_params (line 214) | def _get_sim_params(self, method _simulate (line 286) | def _simulate(self, input_state: SVDistribution | tuple[Source, BasicS... method _post_process_state (line 297) | def _post_process_state(self, bs: BasicState) -> bool: method _remove_heralds (line 307) | def _remove_heralds(self, state: BasicState) -> BasicState: method probs (line 312) | def probs(self, input_state: BasicState) -> BSDistribution: method probs_svd (line 330) | def probs_svd(self, method evolve (line 362) | def evolve(self, input_state: FockState | StateVector) -> StateVector: method set_precision (line 372) | def set_precision(self, precision: float): FILE: perceval/simulators/loss_simulator.py class LossSimulator (line 36) | class LossSimulator(ASimulatorDecorator): method _prepare_input (line 40) | def _prepare_input(self, input_state): method _prepare_circuit (line 45) | def _prepare_circuit(self, circuit, m = None): method _prepare_detectors_impl (line 54) | def _prepare_detectors_impl(self, detectors: list[IDetector]): method _postprocess_bsd_impl (line 57) | def _postprocess_bsd_impl(self, results: BSDistribution) -> BSDistribu... method _postprocess_sv_impl (line 64) | def _postprocess_sv_impl(self, sv: StateVector) -> StateVector: method _transmit_heralds_postselect (line 71) | def _transmit_heralds_postselect(self): method _simulate_losses_with_beam_splitters (line 74) | def _simulate_losses_with_beam_splitters(self, components: list) -> AC... FILE: perceval/simulators/noisy_sampling_simulator.py class SamplesProvider (line 44) | class SamplesProvider: method __init__ (line 46) | def __init__(self, sampling_backend: ASamplingBackend): method prepare (line 55) | def prepare(self, progress_callback: callable = None): method estimate_weights_from_distribution (line 78) | def estimate_weights_from_distribution(self, noisy_input: SVDistributi... method estimate_weights_from_source (line 97) | def estimate_weights_from_source(self, sample_generator: Callable[[int... method _compute_samples (line 113) | def _compute_samples(self, fock_state: FockState): method sample_from (line 124) | def sample_from(self, input_state: FockState) -> BasicState: class NoisySamplingSimulator (line 132) | class NoisySamplingSimulator: method __init__ (line 141) | def __init__(self, sampling_backend: ASamplingBackend): method min_detected_photons_filter (line 152) | def min_detected_photons_filter(self): method set_detectors (line 155) | def set_detectors(self, detector_list: list[IDetector]): method keep_heralds (line 161) | def keep_heralds(self, value: bool): method compute_physical_logical_perf (line 169) | def compute_physical_logical_perf(self, value: bool): method set_selection (line 177) | def set_selection(self, method _state_selected (line 196) | def _state_selected(self, state: BasicState) -> bool: method set_circuit (line 207) | def set_circuit(self, circuit: ACircuit): method set_min_detected_photons_filter (line 215) | def set_min_detected_photons_filter(self, value: int): method _perfect_sampling_no_selection (line 223) | def _perfect_sampling_no_selection( method _noisy_sampling (line 245) | def _noisy_sampling( method _check_input_svd (line 320) | def _check_input_svd(self, svd: SVDistribution) -> tuple[float, float]: method _preprocess_input_state (line 343) | def _preprocess_input_state(self, svd: SVDistribution, max_p: float, n... method _compute_samples_with_perf (line 363) | def _compute_samples_with_perf(self, prepare_samples: int, physical_pe... method _prepare_provider (line 373) | def _prepare_provider(self, provider: SamplesProvider, method compute_samples (line 416) | def compute_samples(max_samples: int, max_shots: int) -> int: method samples (line 423) | def samples(self, method sample_count (line 481) | def sample_count(self, method log_resources (line 504) | def log_resources(self, method: str, extra_parameters: dict): method format_results (line 526) | def format_results(self, results, physical_perf, logical_perf): FILE: perceval/simulators/polarization_simulator.py class PolarizationSimulator (line 35) | class PolarizationSimulator(ASimulatorDecorator): method __init__ (line 36) | def __init__(self, simulator): method _prepare_input (line 40) | def _prepare_input(self, input_state): method set_circuit (line 57) | def set_circuit(self, circuit, m=None): method _prepare_circuit (line 60) | def _prepare_circuit(self, circuit, m=None): method _prepare_detectors_impl (line 63) | def _prepare_detectors_impl(self, detectors: list[IDetector]): method _split_odd_even (line 68) | def _split_odd_even(self, fs): method _postprocess_sv_impl (line 73) | def _postprocess_sv_impl(self, results: StateVector) -> StateVector: method _postprocess_bsd_impl (line 84) | def _postprocess_bsd_impl(self, results: BSDistribution) -> BSDistribu... method set_min_detected_photons_filter (line 92) | def set_min_detected_photons_filter(self, value: int): FILE: perceval/simulators/simulator.py class Simulator (line 51) | class Simulator(ISimulator): method __init__ (line 61) | def __init__(self, backend: AStrongSimulationBackend): method precision (line 73) | def precision(self): method precision (line 77) | def precision(self, value: float): method set_precision (line 81) | def set_precision(self, precision: float): method set_heralds (line 89) | def set_heralds(self, heralds): method keep_heralds (line 98) | def keep_heralds(self, value: bool): method logical_perf (line 107) | def logical_perf(self): method set_postselection (line 110) | def set_postselection(self, postselect: PostSelect): method clear_postselection (line 117) | def clear_postselection(self): method clear_heralds (line 121) | def clear_heralds(self): method set_circuit (line 126) | def set_circuit(self, circuit: ACircuit, m = None): method prob_amplitude (line 137) | def prob_amplitude(self, input_state: FockState, output_state: FockSta... method prob_amplitude (line 151) | def prob_amplitude(self, input_state: NoisyFockState, output_state: No... method prob_amplitude (line 180) | def prob_amplitude(self, input_state: NoisyFockState, output_state: Fo... method prob_amplitude (line 191) | def prob_amplitude(self, input_state: FockState, output_state: NoisyFo... method prob_amplitude (line 202) | def prob_amplitude(self, input_state: StateVector, output_state: FockS... method prob_amplitude (line 209) | def prob_amplitude(self, input_state: StateVector, output_state: Noisy... method probability (line 216) | def probability(self, input_state: FockState, output_state: FockState)... method probability (line 238) | def probability(self, input_state: NoisyFockState, output_state: FockS... method probability (line 260) | def probability(self, input_state: StateVector, output_state: FockStat... method probability (line 271) | def probability(self, input_state: StateVector, output_state: NoisyFoc... method _invalidate_cache (line 282) | def _invalidate_cache(self): method _evolve_cache (line 287) | def _evolve_cache(self, input_list: set[FockState]): method _evolve_cache_with_n (line 294) | def _evolve_cache_with_n(self, input_list: set[tuple[FockState, int]],... method _merge_probability_dist (line 309) | def _merge_probability_dist(self, input_list: list[FockState]) -> BSDi... method probs (line 315) | def probs(self, input_state: FockState) -> BSDistribution: method probs (line 328) | def probs(self, input_state: NoisyFockState) -> BSDistribution: method probs (line 341) | def probs(self, input_state: StateVector) -> BSDistribution: method _probs_svd_generic (line 346) | def _probs_svd_generic(self, input_dist, p_threshold, non_pnr_detector... method _probs_svd_fast (line 412) | def _probs_svd_fast(self, input_dist, p_threshold, non_pnr_detector_mo... method _get_prob_threshold (line 516) | def _get_prob_threshold(self, max_p: float) -> float: method _preprocess_iterator (line 519) | def _preprocess_iterator(self, svd: tuple[Source, FockState]) -> tuple... method _preprocess_svd (line 525) | def _preprocess_svd(self, svd: SVDistribution) -> tuple[SVDistribution... method probs_svd (line 572) | def probs_svd(self, method _setup_heralds (line 650) | def _setup_heralds(self, n=None, non_pnr_detector_modes=None): method init_use_mask (line 664) | def init_use_mask(self, is_pnr) -> None: method use_mask (line 668) | def use_mask(self, n=None, non_pnr_detector_modes=None): method _best_n (line 674) | def _best_n(self, n_ext: int, n_own: int) -> int: method probs_density_matrix (line 683) | def probs_density_matrix(self, dm: DensityMatrix) -> dict: method _evolve_no_compute (line 718) | def _evolve_no_compute(self, decomposed_input, n_photons): method _prepare_decomposed_input (line 743) | def _prepare_decomposed_input(self, input_state: SVDistribution): method evolve (line 753) | def evolve(self, input_state: BasicState | StateVector) -> StateVector: method evolve_svd (line 767) | def evolve_svd(self, method evolve_density_matrix (line 810) | def evolve_density_matrix(self, dm: DensityMatrix) -> DensityMatrix: method _construct_evolve_operator (line 833) | def _construct_evolve_operator(self, input_list: list[BasicState], dm:... method _get_density_matrix_input_list (line 860) | def _get_density_matrix_input_list(dm: DensityMatrix) -> list: method log_resources (line 870) | def log_resources(self, method: str, extra_parameters: dict): FILE: perceval/simulators/simulator_factory.py class SimulatorFactory (line 40) | class SimulatorFactory: method build (line 48) | def build(circuit: ACircuit | Processor | list, FILE: perceval/simulators/simulator_interface.py class ISimulator (line 36) | class ISimulator(ABC): method __init__ (line 38) | def __init__(self): method set_silent (line 46) | def set_silent(self, silent: bool): method set_circuit (line 50) | def set_circuit(self, circuit, m = None): method probs (line 54) | def probs(self, input_state) -> BSDistribution: method probs_svd (line 58) | def probs_svd(self, method evolve (line 65) | def evolve(self, input_state) -> StateVector: method set_min_detected_photons_filter (line 68) | def set_min_detected_photons_filter(self, value: int): method set_precision (line 76) | def set_precision(self, precision: float): method set_heralds (line 79) | def set_heralds(self, heralds: dict[int, int]): method set_selection (line 82) | def set_selection(self, method min_detected_photons_filter (line 102) | def min_detected_photons_filter(self) -> int: method keep_heralds (line 109) | def keep_heralds(self, value: bool): method compute_physical_logical_perf (line 117) | def compute_physical_logical_perf(self, value: bool): method format_results (line 125) | def format_results(self, results: dict(), physical_perf: float, logica... class ASimulatorDecorator (line 141) | class ASimulatorDecorator(ISimulator, ABC): method __init__ (line 145) | def __init__(self, simulator: ISimulator): method _prepare_input (line 150) | def _prepare_input(self, input_state): method _prepare_circuit (line 154) | def _prepare_circuit(self, circuit, m = None) -> ACircuit: method _postprocess_bsd_impl (line 158) | def _postprocess_bsd_impl(self, bsd: BSDistribution) -> BSDistribution: method _postprocess_sv_impl (line 162) | def _postprocess_sv_impl(self, sv: StateVector) -> StateVector: method _prepare_detectors_impl (line 166) | def _prepare_detectors_impl(self, detectors: list[IDetector]) -> list[... method _transmit_heralds_postselect (line 169) | def _transmit_heralds_postselect(self): method _prepare_detectors (line 172) | def _prepare_detectors(self, detectors: list[IDetector] = None) -> lis... method _postprocess_bsd (line 177) | def _postprocess_bsd(self, results: BSDistribution): method _postprocess_sv (line 193) | def _postprocess_sv(self, sv: StateVector) -> StateVector: method compute_physical_logical_perf (line 199) | def compute_physical_logical_perf(self, value: bool): method set_circuit (line 203) | def set_circuit(self, circuit, m=None): method probs (line 206) | def probs(self, input_state) -> BSDistribution: method probs_svd (line 213) | def probs_svd(self, svd: SVDistribution, detectors=None, progress_call... method evolve (line 226) | def evolve(self, input_state) -> StateVector: method set_min_detected_photons_filter (line 230) | def set_min_detected_photons_filter(self, value: int): method set_precision (line 234) | def set_precision(self, precision: float): FILE: perceval/simulators/stepper.py class Stepper (line 40) | class Stepper(ISimulator): method __init__ (line 45) | def __init__(self, backend: AStrongSimulationBackend = None): method _clear_cache (line 54) | def _clear_cache(self): method set_circuit (line 58) | def set_circuit(self, circuit: ACircuit, m=None): method apply (line 62) | def apply(self, sv: StateVector, r: list[int], c: ACircuit) -> StateVe... method probs (line 100) | def probs(self, input_state: BasicState | StateVector) -> BSDistribution: method probs_svd (line 108) | def probs_svd(self, svd: SVDistribution, detectors=None, progress_call... method evolve (line 131) | def evolve(self, input_state: BasicState | StateVector) -> StateVector: method compile (line 142) | def compile(self, input_states: BasicState | StateVector) -> bool: FILE: perceval/utils/_enums.py class Encoding (line 33) | class Encoding(Enum): method logical_length (line 46) | def logical_length(self) -> int: method fock_length (line 54) | def fock_length(self) -> int: class InterferometerShape (line 76) | class InterferometerShape(Enum): class FileFormat (line 86) | class FileFormat(Enum): class ModeType (line 91) | class ModeType(Enum): FILE: perceval/utils/_random.py function random_seed (line 36) | def random_seed(seed: int = None): FILE: perceval/utils/_validated_params.py class AValidatedParam (line 34) | class AValidatedParam(ABC): method __init__ (line 36) | def __init__(self, default_value = None): method __set_name__ (line 41) | def __set_name__(self, owner, name): method __get__ (line 45) | def __get__(self, obj, objtype=None): method __set__ (line 51) | def __set__(self, obj, value): method _validate (line 57) | def _validate(self, value): method is_default (line 60) | def is_default(self): class ValidatedBool (line 64) | class ValidatedBool(AValidatedParam): method __init__ (line 65) | def __init__(self, default_value=None): method _validate (line 68) | def _validate(self, value): class ValidatedFloat (line 74) | class ValidatedFloat(AValidatedParam): method __init__ (line 75) | def __init__(self, min_value=None, max_value=None, default_value=None): method _validate (line 80) | def _validate(self, value): FILE: perceval/utils/algorithms/circuit_optimizer.py class CircuitOptimizer (line 38) | class CircuitOptimizer: method __init__ (line 55) | def __init__(self, threshold: float = 1e-6, ntrials: int = 4, max_eval... method threshold (line 62) | def threshold(self): method threshold (line 66) | def threshold(self, value): method trials (line 72) | def trials(self): method trials (line 76) | def trials(self, value): method max_eval_per_trial (line 80) | def max_eval_per_trial(self): method max_eval_per_trial (line 84) | def max_eval_per_trial(self, value): method optimize (line 87) | def optimize(self, method optimize_rectangle (line 133) | def optimize_rectangle(self, FILE: perceval/utils/algorithms/decomposition.py function add_phases (line 41) | def add_phases(phase_shifter_fn, D): function decompose_triangle (line 63) | def decompose_triangle(u, function decompose_rectangle (line 144) | def decompose_rectangle(u, FILE: perceval/utils/algorithms/match.py class Match (line 30) | class Match: method __init__ (line 31) | def __init__(self): method matched (line 36) | def matched(self): method v_map (line 40) | def v_map(self): method pos_map (line 44) | def pos_map(self): method pos_map (line 48) | def pos_map(self, v): method __str__ (line 51) | def __str__(self): FILE: perceval/utils/algorithms/norm.py function _count_non_skipped_cols (line 34) | def _count_non_skipped_cols(nb_colums: int, skip_colums: list[int]) -> int: function fidelity (line 37) | def fidelity(u: Matrix, v: Matrix, skip_colums: list[int] = []) -> float: function modulus_fidelity (line 54) | def modulus_fidelity(u: Matrix, v: Matrix, skip_colums: list[int] = []) ... function frobenius (line 72) | def frobenius(u: Matrix, v: Matrix, skip_colums: list[int] = []) -> float: function frobenius_inner_product (line 83) | def frobenius_inner_product(A: np.ndarray, B: np.ndarray, skip_colums: l... FILE: perceval/utils/algorithms/optimize.py function _min_fnc (line 36) | def _min_fnc(c: ACircuit, params: list[P], x: list[int], v: Matrix | None, function _stop_criterion (line 44) | def _stop_criterion(f, f0, precision, accept): function optimize (line 51) | def optimize(c: ACircuit, FILE: perceval/utils/algorithms/simplification.py function simplify (line 35) | def simplify(circuit: list | ACircuit, m: int = None, display: bool = Fa... function _simplify_comp (line 72) | def _simplify_comp(components, m: int=None, display: bool=False): function extend_perm (line 90) | def extend_perm(r, perm_list, m): function perm_compose (line 98) | def perm_compose(left_r, left_perm, right_r, right_perm): function reduce_perm (line 111) | def reduce_perm(r, perm): function invert_permutation (line 126) | def invert_permutation(permutation): function _update_adjacent (line 136) | def _update_adjacent(adjacent_modes, r): function _generate_compatible_perm (line 152) | def _generate_compatible_perm(perm_list, adjacent_modes): function _search_empty_space (line 210) | def _search_empty_space(perm, n, init): function _update_perm (line 225) | def _update_perm(perm, init, modes): function _move_comp (line 260) | def _move_comp(in_components, perm): function _evaluate_perm (line 273) | def _evaluate_perm(left_perm_list, right_perm_list, display): function _simplify_perm (line 290) | def _simplify_perm(components, m: int = None, display: bool = False): function _simplify_PS (line 374) | def _simplify_PS(components, m: int = None, display: bool = False): FILE: perceval/utils/algorithms/solve.py function solve (line 33) | def solve(f, x0, constraint, bounds, precision, allow_error=False): FILE: perceval/utils/conversion.py function _deduce_count (line 37) | def _deduce_count(**kwargs) -> int: function samples_to_sample_count (line 52) | def samples_to_sample_count(sample_list: BSSamples) -> BSCount: function samples_to_probs (line 62) | def samples_to_probs(sample_list: BSSamples) -> BSDistribution: function probs_to_sample_count (line 72) | def probs_to_sample_count(probs: BSDistribution, **kwargs) -> BSCount: function probs_to_samples (line 119) | def probs_to_samples(probs: BSDistribution, **kwargs) -> BSSamples: function sample_count_to_probs (line 139) | def sample_count_to_probs(sample_count: BSCount) -> BSDistribution: function sample_count_to_samples (line 158) | def sample_count_to_samples(sample_count: BSCount, **kwargs) -> BSSamples: FILE: perceval/utils/density_matrix.py class FockBasis (line 49) | class FockBasis(dict): method __init__ (line 51) | def __init__(self, m, n_max): method add_photon (line 58) | def add_photon(self): method add_photons (line 65) | def add_photons(self, n): method m (line 70) | def m(self): method n_max (line 74) | def n_max(self): function density_matrix_tensor_product (line 78) | def density_matrix_tensor_product(A, B): class DensityMatrix (line 107) | class DensityMatrix: method __init__ (line 116) | def __init__(self, method from_svd (line 156) | def from_svd(svd: SVDistribution | StateVector | BasicState, index: Fo... method set_index (line 192) | def set_index(self, index: dict): method __getitem__ (line 208) | def __getitem__(self, key: tuple[BasicState, BasicState]): method _deflation (line 217) | def _deflation(A: sparray, val: np.ndarray, vec: np.ndarray): method _bra_str (line 244) | def _bra_str(bs: BasicState): method _to_svd_small (line 247) | def _to_svd_small(self, threshold): method _to_svd_large (line 258) | def _to_svd_large(self, threshold, batch_size): method to_svd (line 280) | def to_svd(self, threshold: float | None = None, batch_size: int = 1): method __radd__ (line 301) | def __radd__(self, other): method __add__ (line 312) | def __add__(self, other): method __mul__ (line 337) | def __mul__(self, other): method __rmul__ (line 350) | def __rmul__(self, other): method remove_low_amplitude (line 363) | def remove_low_amplitude(self, threshold: float | None = None): method normalize (line 381) | def normalize(self): method sample (line 391) | def sample(self, count: int = 1) -> BSSamples: method measure (line 402) | def measure(self, modes: list[int] | int): method _construct_projector_one_sample (line 425) | def _construct_projector_one_sample(self, modes, fock_state) -> tuple[... method _construct_all_projectors (line 442) | def _construct_all_projectors(self, modes: list[int]) -> dict: method _divide_fock_state (line 469) | def _divide_fock_state(fs, modes): method _get_annihilated_fockstate (line 484) | def _get_annihilated_fockstate(fockstate, m, n_photon): method _construct_loss_operators (line 496) | def _construct_loss_operators(self, mode: int, p: float): method apply_loss (line 516) | def apply_loss(self, modes: int | list, prob: float): method _apply_loss (line 531) | def _apply_loss(self, mode: int, prob: float): method __str__ (line 538) | def __str__(self): method __repr__ (line 556) | def __repr__(self): method n_max (line 560) | def n_max(self): method m (line 564) | def m(self): method shape (line 568) | def shape(self): method size (line 572) | def size(self): FILE: perceval/utils/density_matrix_utils.py function extract_upper_triangle (line 36) | def extract_upper_triangle(csr_matrix: csr_array) -> csr_array: function statevector_to_array (line 70) | def statevector_to_array(sv: StateVector, index: dict): function array_to_statevector (line 82) | def array_to_statevector(vector: np.ndarray | sparray, reverse_index: li... function is_hermitian (line 98) | def is_hermitian(matrix: sparray | np.ndarray) -> bool: FILE: perceval/utils/dist_metrics.py function tvd_dist (line 34) | def tvd_dist(dist_lh: BSDistribution, dist_rh: BSDistribution) -> float: function kl_divergence (line 55) | def kl_divergence(ideal_dist: BSDistribution, est_dist: BSDistribution) ... FILE: perceval/utils/format.py function simple_float (line 34) | def simple_float(alpha, precision=1e-6, nsimplify=True, fracmax=63, mult... function simple_complex (line 88) | def simple_complex(c, precision=1e-6, nsimplify=True, fracmax=63): function format_parameters (line 115) | def format_parameters(params: dict, precision: float = 1e-6, nsimplify: ... FILE: perceval/utils/logging/__init__.py function get_logger (line 42) | def get_logger(): function _my_excepthook (line 47) | def _my_excepthook(excType, excValue, this_traceback): function deprecated (line 53) | def deprecated(*decorator_args, **decorator_kwargs): function use_python_logger (line 68) | def use_python_logger(logger = None): function use_perceval_logger (line 78) | def use_perceval_logger(): function apply_config (line 89) | def apply_config(config: LoggerConfig): FILE: perceval/utils/logging/config.py class LoggerConfig (line 42) | class LoggerConfig(dict): method __init__ (line 46) | def __init__(self): method _init_channel (line 52) | def _init_channel(self, channel: exqalibur_logging.channel, level: exq... method reset (line 56) | def reset(self): method _load_from_persistent_data (line 69) | def _load_from_persistent_data(self): method set_level (line 85) | def set_level(self, level: exqalibur_logging.level, channel: exqalibur... method use_python_logger (line 96) | def use_python_logger(self): method use_perceval_logger (line 103) | def use_perceval_logger(self): method python_logger_is_enabled (line 110) | def python_logger_is_enabled(self): method enable_file (line 113) | def enable_file(self): method disable_file (line 120) | def disable_file(self): method save (line 127) | def save(self): FILE: perceval/utils/logging/loggers.py class ALogger (line 47) | class ALogger(ABC): method apply_config (line 49) | def apply_config(self, config: LoggerConfig): method enable_file (line 53) | def enable_file(self): method disable_file (line 57) | def disable_file(self): method set_level (line 61) | def set_level(self, level: int, channel: xq_log.channel = DEFAULT_CHAN... method debug (line 65) | def debug(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method info (line 69) | def info(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method warn (line 73) | def warn(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method error (line 77) | def error(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL, e... method critical (line 81) | def critical(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL... method log_resources (line 84) | def log_resources(self, my_dict: dict): class ExqaliburLogger (line 95) | class ExqaliburLogger(ALogger): method initialize (line 98) | def initialize(self): method _configure_logger (line 112) | def _configure_logger(self, logger_config: LoggerConfig): method apply_config (line 128) | def apply_config(self, config: LoggerConfig): method get_log_file_path (line 134) | def get_log_file_path(self): method enable_file (line 137) | def enable_file(self): method disable_file (line 141) | def disable_file(self): method set_level (line 145) | def set_level( method debug (line 152) | def debug(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method info (line 155) | def info(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method warn (line 158) | def warn(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method _format_exception (line 161) | def _format_exception(self, exc_info=None) -> str: method error (line 166) | def error(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL, e... method critical (line 173) | def critical(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL... class PythonLogger (line 181) | class PythonLogger(ALogger): method __init__ (line 184) | def __init__(self, logger: py_log.Logger = None): method _get_levelno (line 207) | def _get_levelno(level_name: str): method _configure_levels (line 210) | def _configure_levels(self, config: LoggerConfig): method apply_config (line 215) | def apply_config(self, config: LoggerConfig): method _message_has_to_be_logged (line 221) | def _message_has_to_be_logged(self, record) -> bool: method enable_file (line 226) | def enable_file(self): method disable_file (line 229) | def disable_file(self): method set_level (line 232) | def set_level(self, level: xq_log.level, channel: xq_log.channel = DEF... method debug (line 242) | def debug(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method info (line 245) | def info(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method warn (line 248) | def warn(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL): method error (line 251) | def error(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL, e... method critical (line 257) | def critical(self, msg: str, channel: xq_log.channel = DEFAULT_CHANNEL... FILE: perceval/utils/logical_state.py class LogicalState (line 31) | class LogicalState(list): method __init__ (line 38) | def __init__(self, state: list[int] or str = None): method __add__ (line 51) | def __add__(self, other): method __str__ (line 56) | def __str__(self): function generate_all_logical_states (line 62) | def generate_all_logical_states(n : int) -> list[LogicalState]: FILE: perceval/utils/matrix.py class Matrix (line 41) | class Matrix(ABC): method __new__ (line 54) | def __new__(cls, source, use_symbolic=None): method eye (line 94) | def eye(n: int, use_symbolic: bool = False) -> Matrix: method zeros (line 106) | def zeros(shape: tuple[int, int], use_symbolic: bool = False) -> Matrix: method is_square (line 117) | def is_square(self) -> bool: method is_unitary (line 121) | def is_unitary(self) -> bool: method is_symbolic (line 125) | def is_symbolic(self) -> bool: method defined (line 130) | def defined(self): method tonp (line 134) | def tonp(self): method tosp (line 138) | def tosp(self): method random_unitary (line 142) | def random_unitary(n: int) -> MatrixN: method parametrized_unitary (line 152) | def parametrized_unitary(n: int, parameters: np.ndarray | list) -> Mat... method _unitarize_matrix (line 167) | def _unitarize_matrix(n: int, u: np.ndarray) -> MatrixN: method get_unitary_extension (line 176) | def get_unitary_extension(M: np.ndarray) -> MatrixN: method simp (line 218) | def simp(self): method _read (line 223) | def _read(seqline: Iterator[str]) -> Matrix: method fill (line 242) | def fill(self, _: float): method __getitem__ (line 246) | def __getitem__(self, k): class MatrixS (line 250) | class MatrixS(Matrix, sp.Matrix): method __new__ (line 252) | def __new__(cls, obj): method is_symbolic (line 255) | def is_symbolic(self): method defined (line 259) | def defined(self): method tonp (line 262) | def tonp(self): method tosp (line 265) | def tosp(self): method T (line 269) | def T(self): method fill (line 275) | def fill(self, f): method __getitem__ (line 278) | def __getitem__(self, k): method conj (line 281) | def conj(self): method simp (line 287) | def simp(self): method ndim (line 294) | def ndim(self): method is_unitary (line 297) | def is_unitary(self): class MatrixN (line 311) | class MatrixN(np.ndarray, Matrix): method __new__ (line 313) | def __new__(cls, obj): method defined (line 319) | def defined(self): method is_symbolic (line 322) | def is_symbolic(self): method tonp (line 325) | def tonp(self): method tosp (line 328) | def tosp(self): method fill (line 331) | def fill(self, f): method __getitem__ (line 334) | def __getitem__(self, k): method is_unitary (line 337) | def is_unitary(self): method inv (line 343) | def inv(self) -> MatrixN: function matrix_double (line 351) | def matrix_double(u: Matrix): FILE: perceval/utils/mlstr.py function _align (line 33) | def _align(s): class mlstr (line 39) | class mlstr: method __init__ (line 44) | def __init__(self, *value): method __iadd__ (line 47) | def __iadd__(self, s): method __radd__ (line 58) | def __radd__(self, s): method __add__ (line 61) | def __add__(self, s): method __str__ (line 72) | def __str__(self): method __repr__ (line 75) | def __repr__(self): method split (line 78) | def split(self, sep): method height (line 85) | def height(self): method __mod__ (line 88) | def __mod__(self, args): method join (line 98) | def join(self, list_str): FILE: perceval/utils/noise_model.py class NoiseModel (line 33) | class NoiseModel: method __init__ (line 61) | def __init__(self, method __deepcopy__ (line 78) | def __deepcopy__(self, memo): method __str__ (line 81) | def __str__(self) -> str: method __repr__ (line 84) | def __repr__(self) -> str: method __dict__ (line 87) | def __dict__(self) -> dict: method __eq__ (line 97) | def __eq__(self, other) -> bool: FILE: perceval/utils/parameter.py class Parameter (line 40) | class Parameter: method __init__ (line 53) | def __init__(self, name: str, value: float = None, method _is_expression (line 73) | def _is_expression(self): method spv (line 77) | def spv(self) -> sp.Expr: method is_variable (line 85) | def is_variable(self) -> bool: method __bool__ (line 89) | def __bool__(self) -> bool: method __float__ (line 92) | def __float__(self): method copy (line 97) | def copy(self) -> Parameter: method evalf (line 100) | def evalf(self, subs: dict = None) -> float: method is_symbolic (line 107) | def is_symbolic(self) -> bool: method random (line 110) | def random(self): method _check_value (line 118) | def _check_value(v: float, min_v: float, max_v: float, periodic: bool): method check_value (line 130) | def check_value(self, v): method set_value (line 133) | def set_value(self, v: float, force: bool = False): method fix_value (line 145) | def fix_value(self, v: float): method reset (line 153) | def reset(self): method defined (line 159) | def defined(self) -> bool: method is_periodic (line 165) | def is_periodic(self) -> bool: method set_periodic (line 170) | def set_periodic(self, periodic): method fixed (line 175) | def fixed(self) -> bool: method __repr__ (line 180) | def __repr__(self): method bounds (line 186) | def bounds(self) -> tuple[float, float]: method min (line 192) | def min(self): method min (line 198) | def min(self, m: float): method max (line 204) | def max(self) -> float: method max (line 210) | def max(self, m: bool): method pid (line 217) | def pid(self): method __mul__ (line 221) | def __mul__(self, other): method __rmul__ (line 228) | def __rmul__(self, other): method __add__ (line 231) | def __add__(self, other): method __radd__ (line 238) | def __radd__(self, other): method __sub__ (line 241) | def __sub__(self, other): method __rsub__ (line 248) | def __rsub__(self, other): method __truediv__ (line 253) | def __truediv__(self, other): method __pow__ (line 260) | def __pow__(self, other): method __neg__ (line 267) | def __neg__(self): method _merge_param_sets (line 275) | def _merge_param_sets(self, other): class Expression (line 279) | class Expression(Parameter): method __init__ (line 295) | def __init__(self, name: str, parameters: set[Parameter]): method _is_expression (line 311) | def _is_expression(self): method _check_parameters (line 314) | def _check_parameters(self, free_symbol_names): method __repr__ (line 319) | def __repr__(self): method __float__ (line 322) | def __float__(self): method parameters (line 329) | def parameters(self) -> list[Parameter]: method is_periodic (line 334) | def is_periodic(self) -> bool: method defined (line 339) | def defined(self) -> bool: method fixed (line 345) | def fixed(self) -> bool: method copy (line 350) | def copy(self) -> Expression: FILE: perceval/utils/persistent_data.py class PersistentData (line 41) | class PersistentData: method __init__ (line 56) | def __init__(self): method is_writable (line 79) | def is_writable(self) -> bool: method is_readable (line 86) | def is_readable(self) -> bool: method _create_directory (line 93) | def _create_directory(self) -> None: method _safe_create_directory (line 99) | def _safe_create_directory(self) -> bool: method get_folder_size (line 111) | def get_folder_size(self) -> int: method get_full_path (line 119) | def get_full_path(self, element_name: str) -> str: method has_file (line 127) | def has_file(self, filename: str) -> bool: method delete_file (line 135) | def delete_file(self, filename: str): method write_file (line 150) | def write_file(self, filename: str, data: bytes | str, file_format: Fi... method read_file (line 174) | def read_file(self, filename: str, file_format: FileFormat) -> bytes |... method load_config (line 199) | def load_config(self) -> dict: method save_config (line 212) | def save_config(self, config: dict): method clear_all_data (line 224) | def clear_all_data(self): method directory (line 232) | def directory(self) -> str: method create_sub_directory (line 239) | def create_sub_directory(self, relative_path: str) -> str: method _is_subdir_writable (line 263) | def _is_subdir_writable(path_sub_dir): method _is_subdir_readable (line 267) | def _is_subdir_readable(path_sub_dir): FILE: perceval/utils/polarization.py class Polarization (line 49) | class Polarization: method __init__ (line 58) | def __init__(self, method __complex__ (line 87) | def __complex__(self): method parse (line 91) | def parse(s: str) -> Polarization: method project_eh_ev (line 132) | def project_eh_ev(self, use_symbolic=False) -> tuple[any, any]: method __str__ (line 144) | def __str__(self): function _rec_build_spatial_output_states (line 153) | def _rec_build_spatial_output_states(lfs: list, output: list): function build_spatial_output_states (line 164) | def build_spatial_output_states(state: BasicState): function _is_orthogonal (line 168) | def _is_orthogonal(v1, v2, use_symbolic): function convert_polarized_state (line 176) | def convert_polarized_state(state: BasicState, FILE: perceval/utils/postselect.py function post_select_distribution (line 37) | def post_select_distribution( function post_select_statevector (line 76) | def post_select_statevector( FILE: perceval/utils/progress_cb.py function partial_progress_callable (line 30) | def partial_progress_callable(progress_cb: callable, min_val: float = 0.... FILE: perceval/utils/qmath.py function exponentiation_by_squaring (line 34) | def exponentiation_by_squaring(base, power: int): function distinct_permutations (line 69) | def distinct_permutations(iterable, r=None): function kmeans (line 171) | def kmeans(features: np.ndarray, n_clusters: int, n_init: int = 10) -> n... FILE: perceval/utils/stategenerator.py class StateGenerator (line 39) | class StateGenerator: method __init__ (line 48) | def __init__(self, encoding, polarization_base = None): method logical_state (line 67) | def logical_state(self, state: list[int]): method bell_state (line 86) | def bell_state(self, state: str): method ghz_state (line 115) | def ghz_state(self, n: int): method graph_state (line 126) | def graph_state(self, graph: nx.Graph): method dicke_state (line 164) | def dicke_state(self, n: int, k: int = None) -> StateVector: method zero_padded_state (line 202) | def zero_padded_state(n: int, m: int = None) -> BasicState: method periodic_state (line 217) | def periodic_state(n: int, m: int = None) -> BasicState: method evenly_spaced_state (line 233) | def evenly_spaced_state(n: int, m: int) -> BasicState: FILE: perceval/utils/states.py class BasicStateMeta (line 51) | class BasicStateMeta(type): method __instancecheck__ (line 54) | def __instancecheck__(cls, inst): method __subclasscheck__ (line 58) | def __subclasscheck__(cls, sub): class BasicState (line 65) | class BasicState(metaclass=BasicStateMeta): method __new__ (line 68) | def __new__(cls, fs: FockState): method __new__ (line 72) | def __new__(cls, fs: NoisyFockState): method __new__ (line 76) | def __new__(cls, fs: AnnotatedFockState): method __new__ (line 80) | def __new__(cls): method __new__ (line 84) | def __new__(cls, photons: list[int]): method __new__ (line 88) | def __new__(cls, m: int): method __new__ (line 92) | def __new__(cls, photons: list[int], noise: list[int]): method __new__ (line 96) | def __new__(cls, source: str): method m (line 106) | def m(self) -> int: method n (line 113) | def n(self) -> int: method __len__ (line 119) | def __len__(self) -> int: method __eq__ (line 122) | def __eq__(self, other) -> bool: method __ne__ (line 125) | def __ne__(self, other) -> bool: method __getitem__ (line 128) | def __getitem__(self, item): method __mul__ (line 131) | def __mul__(self, other: State | int | float | complex) -> State | Sta... method __rmul__ (line 134) | def __rmul__(self, other: State | int | float | complex) -> State | St... method __pow__ (line 137) | def __pow__(self, power) -> State: method __iter__ (line 140) | def __iter__(self) -> Generator[int, None, None]: method merge (line 143) | def merge(self, other: State) -> State: method __add__ (line 152) | def __add__(self, other) -> State | StateVector | BSDistribution: method __radd__ (line 155) | def __radd__(self, other) -> State | StateVector | BSDistribution: method __sub__ (line 158) | def __sub__(self, other) -> State | StateVector | BSDistribution: method __rsub__ (line 161) | def __rsub__(self, other) -> State | StateVector | BSDistribution: method has_polarization (line 165) | def has_polarization(self) -> bool: method has_annotations (line 169) | def has_annotations(self) -> bool: method separate_state (line 172) | def separate_state(self) -> list[FockState]: method split_state (line 177) | def split_state(self) -> dict[int, FockState]: method partition (line 183) | def partition(self, photon_nb: list[int]) -> list[list[FockState]]: method clear_annotations (line 190) | def clear_annotations(self) -> FockState: method get_mode_annotations (line 195) | def get_mode_annotations(self, mode: int) -> list[Annotation] | list[i... method get_photon_annotation (line 202) | def get_photon_annotation(self, photon: int) -> Annotation | int: method inject_annotation (line 208) | def inject_annotation(self, annot: Annotation | int) -> AnnotatedFockS... method mode2photon (line 215) | def mode2photon(self, mode: int) -> int: method photon2mode (line 222) | def photon2mode(self, n: int) -> int: method prodnfact (line 228) | def prodnfact(self) -> float: method remove_modes (line 233) | def remove_modes(self, modes: list[int]) -> State: method set_slice (line 239) | def set_slice(self, other: State, start: int, end: int) -> State: method threshold_detection (line 248) | def threshold_detection(self, nb: int = 1): function allstate_array (line 255) | def allstate_array(input_state: BasicState, mask: xq.FSMask = None) -> x... function allstate_iterator (line 268) | def allstate_iterator(input_state: BasicState | StateVector, mask: xq.FS... function max_photon_state_iterator (line 288) | def max_photon_state_iterator(m: int, n_max: int): function anonymize_annotations (line 302) | def anonymize_annotations(sv: StateVector, annot_tag: str = "a") -> Stat... function anonymize_annotations (line 331) | def anonymize_annotations(svd: SVDistribution, annot_tag: str = "a") -> ... function filter_distribution_photon_count (line 340) | def filter_distribution_photon_count(bsd: BSDistribution, min_photons_fi... function filter_distribution_photon_count (line 360) | def filter_distribution_photon_count(svd: SVDistribution, min_photons_fi... FILE: perceval/utils/versions/metadata.py class PMetadata (line 34) | class PMetadata: method short_version (line 41) | def short_version() -> str: method version (line 45) | def version() -> str: method package_name (line 49) | def package_name() -> str: method author (line 53) | def author() -> str: method name (line 57) | def name() -> str: FILE: perceval/utils/versions/version_utils.py function keep_latest_versions (line 32) | def keep_latest_versions(versions: list[str], mini: str = None) -> list[... FILE: setup.py function getRemoteRoot (line 7) | def getRemoteRoot(): function addRemoteRootToImages (line 28) | def addRemoteRootToImages(content, root): FILE: tests/_test_utils.py function strip_line_12 (line 53) | def strip_line_12(s: str) -> str: function check_sv_close (line 57) | def check_sv_close(sv1: StateVector, sv2: StateVector) -> bool: function assert_sv_close (line 70) | def assert_sv_close(sv1: StateVector, sv2: StateVector): function compact_svd (line 80) | def compact_svd(svd: SVDistribution) -> SVDistribution: function assert_svd_close (line 97) | def assert_svd_close(lhsvd, rhsvd): function assert_bsd_close (line 116) | def assert_bsd_close(lhbsd, rhbsd): function assert_circuits_eq (line 125) | def assert_circuits_eq(c_a: Circuit, c_b: Circuit): function assert_component_list_eq (line 130) | def assert_component_list_eq(comp_a, comp_b): function assert_detector_list_eq (line 183) | def assert_detector_list_eq(detect_a: list[IDetector], detect_b: list[ID... function assert_detector_eq (line 191) | def assert_detector_eq(left_detector: IDetector, right_detector: IDetect... function assert_experiment_equals (line 201) | def assert_experiment_equals(experiment1: Experiment, experiment2: Exper... function assert_compiled_circuit_equals (line 217) | def assert_compiled_circuit_equals(cc_1: CompiledCircuit, cc_2: Compiled... function dict2svd (line 224) | def dict2svd(d: dict): function save_figs (line 229) | def save_figs(pytestconfig): function _norm (line 233) | def _norm(svg): function _check_svg (line 242) | def _check_svg(test_path, ref_path, collection: str): function _check_circuit (line 260) | def _check_circuit(test_path, ref_path): function _check_qpt (line 264) | def _check_qpt(test_path, ref_path): function _save_or_check (line 268) | def _save_or_check(c, tmp_path, circuit_name, save_figs, recursive=False... class LogChecker (line 300) | class LogChecker: method __init__ (line 314) | def __init__(self, mock_warn: MagicMock, log_channel: channel = channe... method __enter__ (line 321) | def __enter__(self): method __exit__ (line 331) | def __exit__(self, exc_type, exc_val, exc_tb): method set_expected_log_number (line 350) | def set_expected_log_number(self, expected_log_number: int): function retry (line 358) | def retry(exception_to_check: type[Exception], tries: int = 4, delay: fl... FILE: tests/algorithm/test_analyzer.py function test_analyzer_on_qrng (line 41) | def test_analyzer_on_qrng(): function test_analyzer_bs_1 (line 92) | def test_analyzer_bs_1(): function test_analyzer_bs_2 (line 102) | def test_analyzer_bs_2(): FILE: tests/algorithm/test_sampler.py function test_sampler_standard (line 42) | def test_sampler_standard(backend_name): function test_sampler_missing_input_state (line 59) | def test_sampler_missing_input_state(): function test_sampler_iteration_missing_input_state (line 73) | def test_sampler_iteration_missing_input_state(): function test_sampler_iteration_bad_params (line 88) | def test_sampler_iteration_bad_params(): function test_sampler_clear_iterations (line 107) | def test_sampler_clear_iterations(): function test_sampler_iterator (line 132) | def test_sampler_iterator(backend_name): function test_iterator_with_heralds (line 197) | def test_iterator_with_heralds(): function test_sampler_shots (line 221) | def test_sampler_shots(backend_name): FILE: tests/algorithm/test_tomography.py function test_density_matrix_state_tomography (line 52) | def test_density_matrix_state_tomography(pauli_gate): function fidelity_op_process_tomography (line 65) | def fidelity_op_process_tomography(op, op_proc): function test_fidelity_klm_cnot (line 77) | def test_fidelity_klm_cnot(): function test_fidelity_postprocessed_cnot (line 85) | def test_fidelity_postprocessed_cnot(): function test_fidelity_random_op (line 93) | def test_fidelity_random_op(): function test_processor_odd_modes (line 115) | def test_processor_odd_modes(): function test_chi_cnot_is_physical (line 122) | def test_chi_cnot_is_physical(): function test_pauli_order (line 135) | def test_pauli_order(): function test_generate_pauli (line 139) | def test_generate_pauli(): function test_utils_vector_to_sq_matrix (line 145) | def test_utils_vector_to_sq_matrix(): function test_matrix_to_vector (line 154) | def test_matrix_to_vector(): function test_matrix_basis_n_decomp (line 159) | def test_matrix_basis_n_decomp(): function test_avg_fidelity_postprocessed_ccz_gate (line 179) | def test_avg_fidelity_postprocessed_ccz_gate(): FILE: tests/algorithm/test_tomography_mle.py function fidelity_op_mle_process_tomography (line 46) | def fidelity_op_mle_process_tomography(op_proc): function test_fidelity_heralded_cnot (line 58) | def test_fidelity_heralded_cnot(): function test_ghz_state_tomography_mle (line 65) | def test_ghz_state_tomography_mle(): function test_chi_cnot_from_mle_is_physical (line 83) | def test_chi_cnot_from_mle_is_physical(): FILE: tests/backends/test_backends.py function _assert_cnot (line 39) | def _assert_cnot(backend: AStrongSimulationBackend): function test_clifford_bs (line 58) | def test_clifford_bs(): function check_output_distribution (line 70) | def check_output_distribution(backend: AStrongSimulationBackend, input_s... function test_backend_factory_default (line 84) | def test_backend_factory_default(): function test_backend_wiring (line 92) | def test_backend_wiring(backend_name): function test_backend_identity (line 98) | def test_backend_identity(backend_name): function test_backend_wrong_size (line 107) | def test_backend_wrong_size(backend_name): function test_backend_sym_bs (line 117) | def test_backend_sym_bs(backend_name): function test_backend_asym_bs (line 133) | def test_backend_asym_bs(backend_name): function test_slos_precomputation (line 145) | def test_slos_precomputation(): function test_slos_symbolic (line 160) | def test_slos_symbolic(): function test_backend_cnot (line 171) | def test_backend_cnot(backend_name): function test_cnot_with_mask (line 189) | def test_cnot_with_mask(backend_name): function test_strong_sim_with_mask (line 204) | def test_strong_sim_with_mask(backend_name): function test_probampli_backends (line 222) | def test_probampli_backends(backend_name): function test_slos_refresh_coefs (line 252) | def test_slos_refresh_coefs(): function test_evolve_indistinguishable (line 281) | def test_evolve_indistinguishable(backend_name): function test_backend_mps_n_mode_perm_decomp (line 292) | def test_backend_mps_n_mode_perm_decomp(): function test_probampli_iterator_cache (line 314) | def test_probampli_iterator_cache(backend_name): FILE: tests/components/catalog/test_1_qubit_gates.py function test_single_qubit_phase_gates (line 38) | def test_single_qubit_phase_gates(gate_name, exptd_phi): function test_pauli_y_gate (line 49) | def test_pauli_y_gate(): function test_ry_gate (line 62) | def test_ry_gate(): function test_rz_gate (line 69) | def test_rz_gate(): function test_rx_gate (line 79) | def test_rx_gate(): function test_single_qubit_gates (line 87) | def test_single_qubit_gates(gate_name, lo_comp): FILE: tests/components/catalog/test_2qbits_gates.py function test_fidelity_and_performance_cnot (line 39) | def test_fidelity_and_performance_cnot(): function check_cz_with_heralds_or_ancillaries (line 69) | def check_cz_with_heralds_or_ancillaries(processor, herald_states, error... function test_cz_and_cnot_phases_and_modulus (line 116) | def test_cz_and_cnot_phases_and_modulus(): function test_inverted_cnot (line 144) | def test_inverted_cnot(cnot_gate): FILE: tests/components/catalog/test_pauli.py function test_pauli_type (line 36) | def test_pauli_type(): function test_pauli_state_prep_circuits (line 45) | def test_pauli_state_prep_circuits(pauli_eigen_states): function test_pauli_gates (line 51) | def test_pauli_gates(pauli_gate): function test_processor_circuit_configurator (line 56) | def test_processor_circuit_configurator(): FILE: tests/components/catalog/test_qloq.py function test_internal_swap (line 38) | def test_internal_swap(): function test_rotations_qloq (line 59) | def test_rotations_qloq(): function test_internal_entanglement (line 90) | def test_internal_entanglement(): FILE: tests/components/test_circuit.py function test_helloword (line 45) | def test_helloword(): function test_empty_circuit (line 127) | def test_empty_circuit(): function test_bs_symbolic_unitary (line 148) | def test_bs_symbolic_unitary(): function test_bs_u (line 157) | def test_bs_u(): function test_symbolic_theta_in_beam_splitter (line 168) | def test_symbolic_theta_in_beam_splitter(): function test_double_parameter_ok (line 178) | def test_double_parameter_ok(): function test_double_parameter_dup (line 183) | def test_double_parameter_dup(): function test_double_parameter_dup_multi (line 190) | def test_double_parameter_dup_multi(): function test_build_composition (line 197) | def test_build_composition(): function test_build_composition_2 (line 204) | def test_build_composition_2(): function test_build_composition_3 (line 209) | def test_build_composition_3(): function test_build_composition_4 (line 214) | def test_build_composition_4(): function test_out_of_bound_composition (line 219) | def test_out_of_bound_composition(): function test_unitary_component (line 226) | def test_unitary_component(): function test_unitary_inverse (line 240) | def test_unitary_inverse(): function test_iterator (line 266) | def test_iterator(): function _generate_simple_circuit (line 284) | def _generate_simple_circuit(): function test_visualization_ucircuit (line 290) | def test_visualization_ucircuit(capfd): function test_visualization_barrier (line 307) | def test_visualization_barrier(capfd): function test_depths_ncomponents (line 333) | def test_depths_ncomponents(): function test_reflexivity (line 351) | def test_reflexivity(): function test_getitem1_index (line 356) | def test_getitem1_index(): function test_getitem2_value (line 366) | def test_getitem2_value(): function test_getitem3_parameter (line 372) | def test_getitem3_parameter(): function test_describe (line 377) | def test_describe(): function test_copy (line 392) | def test_copy(): FILE: tests/components/test_compiled_circuit.py function test_inheritance (line 36) | def test_inheritance(): function test_compute_unitary (line 43) | def test_compute_unitary(): FILE: tests/components/test_compute_unitary.py function _check_unitary (line 35) | def _check_unitary(component: pcvl.ACircuit): function test_BS_unitary (line 43) | def test_BS_unitary(): function test_PS_unitary (line 52) | def test_PS_unitary(): function test_WP_unitary (line 57) | def test_WP_unitary(): function test_PR_unitary (line 62) | def test_PR_unitary(): FILE: tests/components/test_controlled_gates.py function check_controlled_gates_and_get_performance (line 39) | def check_controlled_gates_and_get_performance(n, alpha, processor, hera... function test_controlled_gates (line 85) | def test_controlled_gates(): function test_ccz_and_toffoli_phases_and_modulus (line 94) | def test_ccz_and_toffoli_phases_and_modulus(): function test_inverted_sub_cnot (line 123) | def test_inverted_sub_cnot(): FILE: tests/components/test_decomposition.py function test_perm_0 (line 42) | def test_perm_0(): function test_basic_perm_triangle (line 54) | def test_basic_perm_triangle(): function test_basic_perm_triangle_bs (line 64) | def test_basic_perm_triangle_bs(): function test_basic_perm_rectangle (line 75) | def test_basic_perm_rectangle(): function test_perm_triangle (line 86) | def test_perm_triangle(): function test_perm_rectangle_bs_0 (line 94) | def test_perm_rectangle_bs_0(): function test_perm_rectangle_bs_1 (line 107) | def test_perm_rectangle_bs_1(): function test_id_decomposition_rectangle (line 120) | def test_id_decomposition_rectangle(): function test_id_decomposition_triangle (line 129) | def test_id_decomposition_triangle(): function test_any_unitary_triangle (line 148) | def test_any_unitary_triangle(): function test_any_unitary_rectangle (line 157) | def test_any_unitary_rectangle(): function test_simple_phase (line 172) | def test_simple_phase(): function test_decompose_non_unitary (line 180) | def test_decompose_non_unitary(): function test_decomposition_large (line 187) | def test_decomposition_large(): function test_decomposition_perm (line 196) | def test_decomposition_perm(): function test_decomposition_inverse_rx (line 202) | def test_decomposition_inverse_rx(): function test_decomposition_inverse_h (line 216) | def test_decomposition_inverse_h(): FILE: tests/components/test_detectors.py function test_detector (line 41) | def test_detector(): function test_interleaved_ppnr (line 62) | def test_interleaved_ppnr(): function test_bs_layered_ppnr (line 120) | def test_bs_layered_ppnr(): function test_bs_layered_ppnr_circuit (line 142) | def test_bs_layered_ppnr_circuit(): function test_bs_layered_ppnr_bad_usage (line 159) | def test_bs_layered_ppnr_bad_usage(): function test_detection_type (line 170) | def test_detection_type(): function test_incompatible_heralds (line 183) | def test_incompatible_heralds(mock_warn): FILE: tests/components/test_ff_configurator.py function test_generic (line 36) | def test_generic(): function test_ff_circuit_provider (line 55) | def test_ff_circuit_provider(): function test_ff_circuit_provider_failures (line 74) | def test_ff_circuit_provider_failures(): function test_ffconfigurator (line 86) | def test_ffconfigurator(): function test_ffconfigurator_failures (line 105) | def test_ffconfigurator_failures(): FILE: tests/components/test_generic_interferometer.py function test_variable_parameters_count (line 43) | def test_variable_parameters_count(): function test_set_identity (line 62) | def test_set_identity(interferometer): function test_set_param_list (line 71) | def test_set_param_list(): function test_set_params_from_other (line 111) | def test_set_params_from_other(): FILE: tests/components/test_loss_channel.py function test_lc_minimal (line 46) | def test_lc_minimal(): function test_lc_commutative (line 58) | def test_lc_commutative(): function test_lc_source_losses_equivalence (line 69) | def test_lc_source_losses_equivalence(): function test_lc_empty_modes (line 80) | def test_lc_empty_modes(): FILE: tests/components/test_match.py function setup_function (line 41) | def setup_function(_): function teardown_function (line 47) | def teardown_function(_): function _bs_rx (line 52) | def _bs_rx(r): function _bs_h (line 55) | def _bs_h(r): function test_match_elementary (line 58) | def test_match_elementary(): function test_match_nomatch (line 66) | def test_match_nomatch(): function test_match_perm (line 71) | def test_match_perm(): function test_match_double (line 81) | def test_match_double(): function test_match_rec (line 94) | def test_match_rec(): function test_match_rec_inv (line 105) | def test_match_rec_inv(): function test_match_simple_seq (line 112) | def test_match_simple_seq(): function test_subnodes_0 (line 120) | def test_subnodes_0(): function test_match_rewrite_phase (line 140) | def test_match_rewrite_phase(): function test_match_switch_phases (line 153) | def test_match_switch_phases(): FILE: tests/components/test_mode_connector.py function test_connection_resolver_init (line 41) | def test_connection_resolver_init(): function test_connection_int (line 55) | def test_connection_int(): function test_connection_list_int (line 70) | def test_connection_list_int(): function test_connection_dict_int (line 97) | def test_connection_dict_int(): function test_connection_dict_str (line 115) | def test_connection_dict_str(): FILE: tests/components/test_permutation.py function test_permutation_3 (line 40) | def test_permutation_3(): function test_permutation_inverse (line 63) | def test_permutation_inverse(): function test_n_mode_permutation_in_2_mode_perms (line 79) | def test_n_mode_permutation_in_2_mode_perms(perm_list): function test_random_perm_breakup_run_multiple (line 91) | def test_random_perm_breakup_run_multiple(ith_run): function test_circuit_decompose_perms (line 104) | def test_circuit_decompose_perms(): FILE: tests/components/test_port.py function test_basic_state_conversion (line 36) | def test_basic_state_conversion(): FILE: tests/components/test_processor.py function test_processor_input_fock_state (line 44) | def test_processor_input_fock_state(mock_warn): function test_processor_input_fock_state_with_loss (line 51) | def test_processor_input_fock_state_with_loss(): function test_processor_input_fock_state_with_all_noise_sources (line 63) | def test_processor_input_fock_state_with_all_noise_sources(): function test_processor_input_state_vector (line 95) | def test_processor_input_state_vector(): function test_processor_probs (line 107) | def test_processor_probs(): function test_processor_samples (line 130) | def test_processor_samples(): function test_processor_samples_max_shots (line 145) | def test_processor_samples_max_shots(): function test_add_remove_ports (line 165) | def test_add_remove_ports(): function test_phase_quantization (line 231) | def test_phase_quantization(): function test_phase_error (line 255) | def test_phase_error(): function test_empty_output (line 287) | def test_empty_output(): function test_mask_distinguishability (line 298) | def test_mask_distinguishability(): function test_mask_detectors (line 311) | def test_mask_detectors(): function test_min_photons_reset (line 335) | def test_min_photons_reset(): function test_flatten_processor (line 352) | def test_flatten_processor(): function test_asymmetric_processor (line 379) | def test_asymmetric_processor(): function test_get_parameters (line 416) | def test_get_parameters(): FILE: tests/components/test_processor_composition.py function test_processor_composition (line 42) | def test_processor_composition(): function test_composition_error_post_selection (line 53) | def test_composition_error_post_selection(): function test_processor_composition_mismatch_modes (line 68) | def test_processor_composition_mismatch_modes(): function test_processor_add_detector (line 107) | def test_processor_add_detector(): function test_remote_processor_creation (line 116) | def test_remote_processor_creation(): function test_processor_composition_ports (line 121) | def test_processor_composition_ports(): function test_processor_building_feed_forward (line 145) | def test_processor_building_feed_forward(): function test_processor_feed_forward_multiple_layers (line 170) | def test_processor_feed_forward_multiple_layers(): function test_ff_controlled_circuit_size (line 191) | def test_ff_controlled_circuit_size(): function test_asymmetrical_composition (line 206) | def test_asymmetrical_composition(): function test_detector_composition (line 227) | def test_detector_composition(): FILE: tests/components/test_source.py function test_source_pure (line 41) | def test_source_pure(): function test_source_emission (line 53) | def test_source_emission(): function test_source_emission_g2 (line 59) | def test_source_emission_g2(): function test_source_emission_g2_losses_indistinguishable (line 65) | def test_source_emission_g2_losses_indistinguishable(): function test_source_indistinguishability (line 73) | def test_source_indistinguishability(): function test_source_multiple_photons_per_mode (line 88) | def test_source_multiple_photons_per_mode(): function test_source_sample_no_filter (line 100) | def test_source_sample_no_filter(): function test_source_samples_with_filter (line 154) | def test_source_samples_with_filter(brightness, g2, hom, losses, multiph... FILE: tests/components/test_time_delay.py function test_without_herald (line 39) | def test_without_herald(): function test_with_selection (line 53) | def test_with_selection(): function test_with_heralds (line 71) | def test_with_heralds(): FILE: tests/components/test_transfer.py function test_basic_transfer (line 40) | def test_basic_transfer(): function test_basic_transfer_fix (line 48) | def test_basic_transfer_fix(): function test_transfer_complex_1 (line 58) | def test_transfer_complex_1(): function test_transfer_complex_2 (line 70) | def test_transfer_complex_2(): function test_transfer_complex_3 (line 83) | def test_transfer_complex_3(): function test_transfer_complex_4 (line 96) | def test_transfer_complex_4(): function test_transfer_complex_5 (line 117) | def test_transfer_complex_5(): FILE: tests/components/test_unitary_determinant.py function test_determinant_base (line 36) | def test_determinant_base(): function test_determinant_generic (line 41) | def test_determinant_generic(): function test_determinant_1 (line 46) | def test_determinant_1(): function test_determinant_2 (line 51) | def test_determinant_2(): FILE: tests/error_mitigation/test_loss_mitigation.py function _sampler_setup_cnot (line 43) | def _sampler_setup_cnot(output_type: str): function test_photon_loss_mitigation (line 67) | def test_photon_loss_mitigation(result_type): function test_input_validation_loss_mitigation (line 78) | def test_input_validation_loss_mitigation(): function _compute_random_circ_probs (line 120) | def _compute_random_circ_probs(source_emission, num_photons): function test_mitigation_over_postselect_tvd (line 141) | def test_mitigation_over_postselect_tvd(): FILE: tests/rendering/test_rendering.py function test_display_config (line 39) | def test_display_config(mock_save_config, mock_load_config): FILE: tests/rendering/test_visualization.py function test_svg_dump_phys_bs (line 51) | def test_svg_dump_phys_bs(tmp_path, save_figs): function test_svg_dump_phys_ps (line 56) | def test_svg_dump_phys_ps(tmp_path, save_figs): function test_svg_dump_phys_pbs (line 61) | def test_svg_dump_phys_pbs(tmp_path, save_figs): function test_svg_dump_phys_dt (line 66) | def test_svg_dump_phys_dt(tmp_path, save_figs): function test_svg_dump_phys_wp (line 71) | def test_svg_dump_phys_wp(tmp_path, save_figs): function test_svg_dump_phys_hwp (line 76) | def test_svg_dump_phys_hwp(tmp_path, save_figs): function test_svg_dump_phys_qwp (line 81) | def test_svg_dump_phys_qwp(tmp_path, save_figs): function test_svg_dump_phys_pr (line 86) | def test_svg_dump_phys_pr(tmp_path, save_figs): function test_svg_dump_phys_perm4_0 (line 91) | def test_svg_dump_phys_perm4_0(tmp_path, save_figs): function test_svg_dump_phys_perm4_inv (line 96) | def test_svg_dump_phys_perm4_inv(tmp_path, save_figs): function test_svg_dump_phys_perm4_swap (line 101) | def test_svg_dump_phys_perm4_swap(tmp_path, save_figs): function test_svg_dump_no_circuit_4 (line 106) | def test_svg_dump_no_circuit_4(tmp_path, save_figs): function test_svg_dump_symb_bs_compact (line 111) | def test_svg_dump_symb_bs_compact(tmp_path, save_figs): function test_svg_dump_symb_bs_compact_false (line 117) | def test_svg_dump_symb_bs_compact_false(tmp_path, save_figs): function test_svg_dump_symb_ps (line 123) | def test_svg_dump_symb_ps(tmp_path, save_figs): function test_svg_dump_symb_pbs_compact (line 128) | def test_svg_dump_symb_pbs_compact(tmp_path, save_figs): function test_svg_dump_symb_pbs_compact_false (line 133) | def test_svg_dump_symb_pbs_compact_false(tmp_path, save_figs): function test_svg_dump_symb_pr (line 138) | def test_svg_dump_symb_pr(tmp_path, save_figs): function test_svg_dump_symb_wp (line 143) | def test_svg_dump_symb_wp(tmp_path, save_figs): function test_svg_dump_symb_hwp (line 148) | def test_svg_dump_symb_hwp(tmp_path, save_figs): function test_svg_dump_symb_qwp (line 153) | def test_svg_dump_symb_qwp(tmp_path, save_figs): function test_svg_dump_phys_multi_perm (line 158) | def test_svg_dump_phys_multi_perm(tmp_path, save_figs): function _create_qrng (line 168) | def _create_qrng(): function test_svg_dump_qrng (line 189) | def test_svg_dump_qrng(tmp_path, save_figs): function test_svg_dump_qrng_compact (line 195) | def test_svg_dump_qrng_compact(tmp_path, save_figs): function test_svg_dump_phys_universal1 (line 201) | def test_svg_dump_phys_universal1(tmp_path, save_figs): function test_svg_dump_unitary (line 207) | def test_svg_dump_unitary(tmp_path, save_figs): function test_svg_dump_grover (line 220) | def test_svg_dump_grover(tmp_path, save_figs): function test_svg_bs_based_generic_no_phase_rectangle (line 265) | def test_svg_bs_based_generic_no_phase_rectangle(tmp_path, save_figs): function test_svg_bs_based_generic_with_phase_rectangle (line 273) | def test_svg_bs_based_generic_with_phase_rectangle(tmp_path, save_figs): function test_svg_mzi_based_generic_triangle (line 283) | def test_svg_mzi_based_generic_triangle(tmp_path, save_figs): function test_svg_decomposition_symb_compact (line 292) | def test_svg_decomposition_symb_compact(tmp_path, save_figs): function test_svg_processor_with_heralds_phys (line 299) | def test_svg_processor_with_heralds_phys(tmp_path, save_figs): function test_svg_processor_with_heralds_phys_not_recursive (line 309) | def test_svg_processor_with_heralds_phys_not_recursive(tmp_path, save_fi... function test_svg_processor_with_heralds_margin_overflow_left_phys (line 319) | def test_svg_processor_with_heralds_margin_overflow_left_phys(tmp_path, ... function test_svg_processor_with_heralds_margin_overflow_right_phys (line 327) | def test_svg_processor_with_heralds_margin_overflow_right_phys(tmp_path,... function test_svg_processor_with_heralds_margin_overflow_left_right_phys (line 336) | def test_svg_processor_with_heralds_margin_overflow_left_right_phys(tmp_... function test_svg_processor_with_heralds_perm_following_phys (line 344) | def test_svg_processor_with_heralds_perm_following_phys(tmp_path, save_f... function test_svg_processor_with_heralds_and_barriers_phys (line 353) | def test_svg_processor_with_heralds_and_barriers_phys(tmp_path, save_figs): function test_svg_dump_barrier_phys (line 365) | def test_svg_dump_barrier_phys(tmp_path, save_figs): function test_svg_dump_barrier_symb (line 371) | def test_svg_dump_barrier_symb(tmp_path, save_figs): function test_svg_dump_circuit_box_bell_state (line 380) | def test_svg_dump_circuit_box_bell_state(tmp_path, save_figs, function create_processor_with_feed_forward (line 415) | def create_processor_with_feed_forward(): function test_svg_dump_feed_forward_symb (line 437) | def test_svg_dump_feed_forward_symb(tmp_path, save_figs): function test_svg_dump_feed_forward_phys (line 443) | def test_svg_dump_feed_forward_phys(tmp_path, save_figs): function test_svg_dump_feed_forward_phys_norec (line 448) | def test_svg_dump_feed_forward_phys_norec(tmp_path, save_figs): function test_svg_dump_compiled_circuit_no_template (line 453) | def test_svg_dump_compiled_circuit_no_template(tmp_path, save_figs): function test_svg_dump_compiled_circuit_no_template_symb (line 458) | def test_svg_dump_compiled_circuit_no_template_symb(tmp_path, save_figs): function test_svg_dump_compiled_circuit_with_template (line 463) | def test_svg_dump_compiled_circuit_with_template(tmp_path, save_figs): function test_svg_dump_compiled_circuit_with_template_recursive (line 469) | def test_svg_dump_compiled_circuit_with_template_recursive(tmp_path, sav... function test_svg_dump_compiled_circuit_with_template_experiment (line 475) | def test_svg_dump_compiled_circuit_with_template_experiment(tmp_path, sa... FILE: tests/rendering/test_visualization_ide.py function test_ide_visualization (line 38) | def test_ide_visualization(capfd): FILE: tests/runtime/_mock_rpc_handler.py class CloudEndpoint (line 99) | class CloudEndpoint(Enum): method from_response (line 108) | def from_response(response: responses.Response) -> CloudEndpoint: class RPCHandlerResponsesBuilder (line 125) | class RPCHandlerResponsesBuilder(): method __init__ (line 133) | def __init__(self, method set_default_job_status (line 153) | def set_default_job_status(self, default_job_status: RunningStatus | N... method set_job_status_sequence (line 161) | def set_job_status_sequence(self, job_status_sequence: list[RunningSta... method _set_default_responses (line 169) | def _set_default_responses(self, use_new_platform_details_url: bool = ... method _reset_default_responses (line 191) | def _reset_default_responses(self) -> None: method _get_job_status (line 207) | def _get_job_status(self): method _create_job_callback (line 216) | def _create_job_callback(self, request: requests.PreparedRequest) -> t... method _set_rerun_job_responses (line 230) | def _set_rerun_job_responses(self, job_id: str, status: RunningStatus ... method _set_cancel_job_responses (line 244) | def _set_cancel_job_responses(self, job_id: str, status: RunningStatus... method get_job_status_response_body_from_job_status (line 258) | def get_job_status_response_body_from_job_status(self, status: Running... method _set_job_status_responses (line 281) | def _set_job_status_responses(self, job_id: str, status: RunningStatus... method set_job_status_custom_responses (line 288) | def set_job_status_custom_responses(self, response: json) -> None: method set_job_availability_count (line 291) | def set_job_availability_count(self, count: int) -> None: method remove_job_status_custom_responses (line 296) | def remove_job_status_custom_responses(self) -> None: method get_job_result_response_body_from_job_status (line 299) | def get_job_result_response_body_from_job_status(self, status: Running... method _set_job_result_responses (line 308) | def _set_job_result_responses(self, job_id: str, status: RunningStatus... method _set_get_platform_details_responses (line 315) | def _set_get_platform_details_responses(self) -> None: method _set_get_new_platform_details_responses (line 322) | def _set_get_new_platform_details_responses(self, status: int) -> None: method _set_job_availability_responses (line 329) | def _set_job_availability_responses(self) -> None: method _reset_job_availability_responses (line 336) | def _reset_job_availability_responses(self) -> None: function get_rpc_handler_for_tests (line 342) | def get_rpc_handler_for_tests(name: str = "sim:test", url: str = "https:... FILE: tests/runtime/test_job.py function quadratic_count_down (line 43) | def quadratic_count_down(n, period=PERIOD, progress_callback=None): function test_run_sync_0 (line 55) | def test_run_sync_0(): function test_run_sync_1 (line 61) | def test_run_sync_1(mock_warn): function test_run_async (line 78) | def test_run_async(): function test_run_async_fail (line 100) | def test_run_async_fail(mock_warn): function test_run_async_cancel (line 119) | def test_run_async_cancel(): function test_get_res_run_async (line 128) | def test_get_res_run_async(): FILE: tests/runtime/test_job_group.py function test_init (line 54) | def test_init(mock_write_file): function test_load (line 62) | def test_load(mock_write_file: MagicMock): function test_add (line 100) | def test_add(mock_write_file): function test_add_errors (line 137) | def test_add_errors(mock_write_file): function test_classic_run (line 154) | def test_classic_run(mock_write_file): function test_save_on_error (line 244) | def test_save_on_error(mock_write_file): function test_run_advance (line 272) | def test_run_advance(mock_write_file): function test_rerun (line 304) | def test_rerun(mock_write_file): function test_launch_async (line 342) | def test_launch_async(mock_write_file): function test_cancel_all (line 388) | def test_cancel_all(mock_write_file): FILE: tests/runtime/test_payload_generation.py function _get_remote_processor (line 41) | def _get_remote_processor(m: int = 8): function test_payload_basics (line 45) | def test_payload_basics(): function test_payload_parameters (line 60) | def test_payload_parameters(): function test_payload_cnot (line 74) | def test_payload_cnot(): function test_payload_generator (line 104) | def test_payload_generator(): FILE: tests/runtime/test_remote_config.py function test_remote_config_env_var_vs_cache (line 52) | def test_remote_config_env_var_vs_cache(tmp_path, monkeypatch): function test_remote_config_from_file (line 86) | def test_remote_config_from_file(tmp_path, monkeypatch): function test_config_file_access (line 138) | def test_config_file_access(tmp_path, monkeypatch): FILE: tests/runtime/test_remote_job.py function test_remote_job (line 52) | def test_remote_job(mock_warn): function test_get_status_response_resilience (line 95) | def test_get_status_response_resilience(mock_warn): function test_mock_remote_with_gates (line 134) | def test_mock_remote_with_gates(catalog_item): function test_remote_with_gates_probs (line 158) | def test_remote_with_gates_probs(catalog_item): function test_remote_with_gates_samples (line 202) | def test_remote_with_gates_samples(catalog_item): FILE: tests/runtime/test_rpc_handler.py function test_create_job (line 54) | def test_create_job(): function test_get_job_infos (line 73) | def test_get_job_infos(): function test_cancel_rerun_job (line 117) | def test_cancel_rerun_job(): function test_get_platform_details (line 173) | def test_get_platform_details(): function test_get_platform_details_with_architecture (line 184) | def test_get_platform_details_with_architecture(): FILE: tests/runtime/test_shots_estimate.py class _MockRemoteProcessor (line 36) | class _MockRemoteProcessor(RemoteProcessor): method __init__ (line 37) | def __init__(self): function test_shots_estimate_trivial_filter_values (line 46) | def test_shots_estimate_trivial_filter_values(): function test_shots_estimate_regular_use_case (line 70) | def test_shots_estimate_regular_use_case(): function test_shots_estimate_circuit_with_variables (line 79) | def test_shots_estimate_circuit_with_variables(): function test_shots_estimate_feed_forward (line 88) | def test_shots_estimate_feed_forward(): FILE: tests/serialization/test_serialization.py function test_numeric_matrix_serialization (line 49) | def test_numeric_matrix_serialization(): function test_symbolic_matrix_serialization (line 61) | def test_symbolic_matrix_serialization(): function test_symbol_serialization (line 77) | def test_symbol_serialization(): function _build_test_circuit (line 84) | def _build_test_circuit(): function test_circuit_serialization (line 94) | def test_circuit_serialization(): function test_non_unitary_serialization (line 101) | def test_non_unitary_serialization(): function test_circuit_serialization_backward_compat (line 113) | def test_circuit_serialization_backward_compat(): function test_port_serialization (line 133) | def test_port_serialization(): function test_basicstate_serialization (line 154) | def test_basicstate_serialization(): function test_svdistribution_serialization (line 167) | def test_svdistribution_serialization(): function test_bsdistribution_serialization (line 180) | def test_bsdistribution_serialization(): function test_bscount_serialization (line 193) | def test_bscount_serialization(): function test_bssamples_serialization (line 206) | def test_bssamples_serialization(): function test_sv_serialization (line 223) | def test_sv_serialization(): function test_noise_model_serialization (line 232) | def test_noise_model_serialization(): function test_postselect_serialization (line 248) | def test_postselect_serialization(ps): function test_detector_serialization (line 259) | def test_detector_serialization(detector): function test_experiment_serialization (line 271) | def test_experiment_serialization(): function test_compiled_circuit_serialization (line 322) | def test_compiled_circuit_serialization(): function test_json (line 329) | def test_json(): function test_binary_serialization (line 346) | def test_binary_serialization(): function test_compress (line 362) | def test_compress(): function test_circuit_with_expression_serialization (line 407) | def test_circuit_with_expression_serialization(): function test_deserialize_unknown_object (line 434) | def test_deserialize_unknown_object(mock_warn): FILE: tests/serialization/test_serialized_containers.py function test_basic_dict (line 37) | def test_basic_dict(): function test_basic_list (line 76) | def test_basic_list(): function test_nested_containers (line 105) | def test_nested_containers(): FILE: tests/simulators/test_delay_simulator.py function test_retrieve_mode_count (line 41) | def test_retrieve_mode_count(): function test_prepare_circuit (line 46) | def test_prepare_circuit(): function test_delay_simulation (line 60) | def test_delay_simulation(): function test_delay_detectors_simulation (line 90) | def test_delay_detectors_simulation(): function test_invalid_delay (line 111) | def test_invalid_delay(): function test_logical_selection (line 120) | def test_logical_selection(): FILE: tests/simulators/test_ff_simulator.py function test_basic_circuit (line 45) | def test_basic_circuit(): function test_cascade (line 54) | def test_cascade(): function test_with_processor (line 75) | def test_with_processor(): function test_with_herald (line 91) | def test_with_herald(): function test_with_postselect (line 114) | def test_with_postselect(): function test_min_photons_filter (line 137) | def test_min_photons_filter(): function test_physical_perf (line 164) | def test_physical_perf(): function test_with_proc (line 209) | def test_with_proc(): function test_non_adjacent_config (line 257) | def test_non_adjacent_config(): function test_with_state_vector (line 288) | def test_with_state_vector(): function test_with_annotated_state_vector (line 307) | def test_with_annotated_state_vector(): function test_config_with_config (line 332) | def test_config_with_config(): FILE: tests/simulators/test_loss_simulator.py function test_lc_minimal (line 44) | def test_lc_minimal(): function test_lc_detectors (line 57) | def test_lc_detectors(): function test_lc_commutative (line 73) | def test_lc_commutative(): function test_lc_source_losses_equivalence (line 92) | def test_lc_source_losses_equivalence(): function test_lc_perf (line 111) | def test_lc_perf(): function test_logical_selection (line 127) | def test_logical_selection(): FILE: tests/simulators/test_noisy_sampling_simulator.py function test_perfect_sampling (line 39) | def test_perfect_sampling(max_samples, max_shots): function test_perfect_sampling_source (line 52) | def test_perfect_sampling_source(max_samples, max_shots): function _build_noisy_simulator (line 64) | def _build_noisy_simulator(size: int): function test_sample_0_samples (line 71) | def test_sample_0_samples(): function test_sample_0_samples_source (line 79) | def test_sample_0_samples_source(): function test_noisy_sampling (line 87) | def test_noisy_sampling(): function test_noisy_sampling_source (line 110) | def test_noisy_sampling_source(): function test_noisy_sampling_with_heralds (line 133) | def test_noisy_sampling_with_heralds(): function test_noisy_sampling_with_detectors (line 156) | def test_noisy_sampling_with_detectors(): FILE: tests/simulators/test_polarization_simulator.py function _oracle (line 44) | def _oracle(mark): function _hwp (line 64) | def _hwp(xsi): function _grover_circuit (line 70) | def _grover_circuit(mark): function test_grover (line 91) | def test_grover(): function test_polarization_evolve (line 108) | def test_polarization_evolve(): function test_polarization_circuit_0 (line 119) | def test_polarization_circuit_0(backend_name): function test_polarization_detector (line 133) | def test_polarization_detector(mock_warn): FILE: tests/simulators/test_samples_provider.py function _svd_to_bsd (line 36) | def _svd_to_bsd(svd): function test_samples_provider_distribution (line 58) | def test_samples_provider_distribution(): function test_samples_provider_source (line 72) | def test_samples_provider_source(): FILE: tests/simulators/test_simulate_detectors.py function test_simulate_detectors (line 36) | def test_simulate_detectors(): function test_simulate_detectors_sample (line 70) | def test_simulate_detectors_sample(): function test_simulate_detectors_sample_ppnr (line 86) | def test_simulate_detectors_sample_ppnr(): FILE: tests/simulators/test_simulator.py class MockBackend (line 42) | class MockBackend(AStrongSimulationBackend): method name (line 45) | def name(self) -> str: method prob_amplitude (line 48) | def prob_amplitude(self, output_state: BasicState) -> complex: method prob_distribution (line 51) | def prob_distribution(self) -> BSDistribution: method evolve (line 58) | def evolve(self) -> StateVector: function test_simulator_probs_mock (line 66) | def test_simulator_probs_mock(): function test_simulator_probs_svd_indistinguishable (line 88) | def test_simulator_probs_svd_indistinguishable(): function test_simulator_probs_svd_distinguishable (line 110) | def test_simulator_probs_svd_distinguishable(): function test_simulator_probs_svd_superposed (line 125) | def test_simulator_probs_svd_superposed(): function test_simulator_probs_distinguishable (line 144) | def test_simulator_probs_distinguishable(): function test_simulator_probs_postselection (line 157) | def test_simulator_probs_postselection(): function test_simulator_probampli (line 182) | def test_simulator_probampli(): function test_simulator_probability (line 205) | def test_simulator_probability(): function test_simulator_probs_sv (line 228) | def test_simulator_probs_sv(): function test_evolve_indistinguishable (line 265) | def test_evolve_indistinguishable(): function test_evolve_distinguishable (line 275) | def test_evolve_distinguishable(): function test_evolve_phase (line 288) | def test_evolve_phase(): function test_simulator_evolve_svd (line 300) | def test_simulator_evolve_svd(): function test_probs_svd_with_heralds (line 322) | def test_probs_svd_with_heralds(): function test_evolve_with_heralds (line 369) | def test_evolve_with_heralds(): function test_evolve_change_heralds (line 406) | def test_evolve_change_heralds(): function get_comparison_setup (line 420) | def get_comparison_setup(): function test_evolve_density_matrix (line 431) | def test_evolve_density_matrix(): function test_probs_density_matrix (line 441) | def test_probs_density_matrix(): FILE: tests/simulators/test_simulator_factory.py function test_create_simulator_from_circuit (line 39) | def test_create_simulator_from_circuit(): function test_create_simulator_from_polarized_circuit (line 59) | def test_create_simulator_from_polarized_circuit(): function test_create_simulator_from_components (line 71) | def test_create_simulator_from_components(): function test_create_simulator_from_complex_processor (line 96) | def test_create_simulator_from_complex_processor(): FILE: tests/simulators/test_simulator_utils.py function test_merge_sv (line 36) | def test_merge_sv(): function test_list_merge (line 52) | def test_list_merge(): FILE: tests/simulators/test_stepper.py function test_stepper_basic_interference (line 39) | def test_stepper_basic_interference(): function test_stepper_complex_circuit (line 49) | def test_stepper_complex_circuit(): FILE: tests/test_test_utils.py function test_utils (line 37) | def test_utils(): FILE: tests/utils/test_circuit_optimizer.py function _ps (line 42) | def _ps(i): function _check_optimize (line 46) | def _check_optimize(size: int, mzi_func: Callable[[int], None], max_eval... function test_circuit_optimizer (line 62) | def test_circuit_optimizer(): function test_circuit_optimizer_bs_convention (line 72) | def test_circuit_optimizer_bs_convention(): function test_circuit_optimizer_max_eval_convergence (line 82) | def test_circuit_optimizer_max_eval_convergence(nb_iteration: int, expec... FILE: tests/utils/test_density_matrix.py function test_fock_basis (line 42) | def test_fock_basis(): function test_statevector_to_array (line 54) | def test_statevector_to_array(): function test_create_index (line 62) | def test_create_index(): function test_density_matrix (line 69) | def test_density_matrix(): function test_density_matrix_to_svd (line 102) | def test_density_matrix_to_svd(): function test_density_matrix_array_constructor (line 119) | def test_density_matrix_array_constructor(): function test_sample (line 129) | def test_sample(): function test_avoid_annotations (line 135) | def test_avoid_annotations(): function test_remove_low_amplitude (line 140) | def test_remove_low_amplitude(): function test_divide_fockstate (line 164) | def test_divide_fockstate(): function test_measure_density_matrix (line 172) | def test_measure_density_matrix(): function test_photon_loss (line 212) | def test_photon_loss(): FILE: tests/utils/test_dist_metrics.py function test_tvd_identical_dist (line 43) | def test_tvd_identical_dist(): function test_tvd_disjoint_dist (line 54) | def test_tvd_disjoint_dist(mock_warn): function test_tvd_one_empty_dist (line 68) | def test_tvd_one_empty_dist(mock_warn): function test_kl_div_identical_dist (line 77) | def test_kl_div_identical_dist(): function test_kl_div_unequal_dist (line 87) | def test_kl_div_unequal_dist(): FILE: tests/utils/test_doc_config.py function test_version_filtering (line 32) | def test_version_filtering(): FILE: tests/utils/test_fidelity.py function test_skip_colums_from_frobenius_product (line 36) | def test_skip_colums_from_frobenius_product(): function test_fidelity (line 42) | def test_fidelity(): FILE: tests/utils/test_format.py function test_format_simple (line 35) | def test_format_simple(): function test_format_complex (line 47) | def test_format_complex(): function test_format_pdisplay (line 58) | def test_format_pdisplay(capfd): FILE: tests/utils/test_log.py function test_logger_config (line 44) | def test_logger_config(mock_apply_config, tmp_path, monkeypatch): function test_change_logger (line 76) | def test_change_logger(): function _get_last_dict_logged (line 86) | def _get_last_dict_logged(mock_info_args): function test_log_resources (line 100) | def test_log_resources(mock_info): function test_log_resources_simulator (line 145) | def test_log_resources_simulator(mock_info): function test_log_resources_noisy_sampling_simulator (line 182) | def test_log_resources_noisy_sampling_simulator(mock_info): FILE: tests/utils/test_logical_state.py function test_logical_state (line 35) | def test_logical_state(): function test_generate_all_logical_states (line 50) | def test_generate_all_logical_states(): FILE: tests/utils/test_mask.py function test_mask (line 32) | def test_mask(): function test_mask_multiple (line 41) | def test_mask_multiple(): FILE: tests/utils/test_matrix.py function test_new_np (line 40) | def test_new_np(): function test_new_textarray (line 47) | def test_new_textarray(): function test_new_shape0 (line 53) | def test_new_shape0(): function test_new_shape1 (line 58) | def test_new_shape1(): function test_new_shape2 (line 63) | def test_new_shape2(): function test_eye_n (line 68) | def test_eye_n(): function test_eye_s (line 75) | def test_eye_s(): function test_zero_n (line 82) | def test_zero_n(): function test_zero_s (line 89) | def test_zero_s(): function test_read_fromfile1 (line 97) | def test_read_fromfile1(): function test_read_fromfile_complex (line 103) | def test_read_fromfile_complex(): function test_check_unitary_numeric (line 111) | def test_check_unitary_numeric(): function test_check_unitary_numeric_sym (line 117) | def test_check_unitary_numeric_sym(): function atest_str_1 (line 123) | def atest_str_1(): function atest_repr (line 129) | def atest_repr(): function atest_repr_1 (line 134) | def atest_repr_1(): function atest_repr_2 (line 139) | def atest_repr_2(): function test_repr_3 (line 144) | def test_repr_3(): function atest_str_2 (line 149) | def atest_str_2(): function atest_tonumpy (line 155) | def atest_tonumpy(): function test_keeppcvlcls (line 160) | def test_keeppcvlcls(): function test_keeppcvlcls_s (line 170) | def test_keeppcvlcls_s(): function test_genunitary (line 180) | def test_genunitary(): function test_param_unitary (line 187) | def test_param_unitary(): FILE: tests/utils/test_metadata.py function test_metadata (line 33) | def test_metadata(): FILE: tests/utils/test_mlstr.py function test_basic0 (line 34) | def test_basic0(): function test_basic1 (line 39) | def test_basic1(): function test_basic2 (line 44) | def test_basic2(): function test_iadd0 (line 49) | def test_iadd0(): function test_iadd1 (line 55) | def test_iadd1(): function test_radd (line 61) | def test_radd(): function test_iadd_inv (line 65) | def test_iadd_inv(): function test_format (line 70) | def test_format(): function test_join (line 75) | def test_join(): FILE: tests/utils/test_noise_model.py function test_noise_model_default (line 40) | def test_noise_model_default(): function test_noise_model_init (line 50) | def test_noise_model_init(): function test_noise_model_errors (line 58) | def test_noise_model_errors(): function test_noise_model_eq (line 84) | def test_noise_model_eq(): FILE: tests/utils/test_optimize.py function _create_circuit (line 38) | def _create_circuit(): function test_optimize_fidelity (line 52) | def test_optimize_fidelity(): function test_optimize_frobenius (line 59) | def test_optimize_frobenius(): FILE: tests/utils/test_parameter.py function test_definition (line 41) | def test_definition(): function test_variable (line 48) | def test_variable(): function test_set_variable (line 55) | def test_set_variable(): function test_fixed_0 (line 63) | def test_fixed_0(): function test_fixed_1 (line 72) | def test_fixed_1(): function test_basic_conv (line 82) | def test_basic_conv(): function test_invalid_values (line 89) | def test_invalid_values(): function test_periodic_values (line 99) | def test_periodic_values(): function test_multiple_parameter_use (line 106) | def test_multiple_parameter_use(): function test_expression_arithmetic (line 113) | def test_expression_arithmetic(): function test_expression_missing_parameter (line 145) | def test_expression_missing_parameter(): function test_expression_math_functions (line 151) | def test_expression_math_functions(): function test_expression_parameter_retrieval (line 162) | def test_expression_parameter_retrieval(): FILE: tests/utils/test_persistent_data.py function test_directory (line 37) | def test_directory(): function test_basic_methods (line 43) | def test_basic_methods(tmp_path, monkeypatch): function test_access (line 88) | def test_access(tmp_path, monkeypatch): FILE: tests/utils/test_polarization.py function test_polar_parse_error (line 39) | def test_polar_parse_error(): function test_polar_parse_ok (line 50) | def test_polar_parse_ok(): function test_polar_init (line 73) | def test_polar_init(): function test_polar_circuit1 (line 80) | def test_polar_circuit1(): function test_polar_nmode (line 89) | def test_polar_nmode(): function test_polar_circuit2 (line 99) | def test_polar_circuit2(): function test_prep_state (line 109) | def test_prep_state(): function test_prep_multi_state (line 127) | def test_prep_multi_state(): function test_convert_multistate (line 131) | def test_convert_multistate(): function test_convert_multistate_nonorthogonal (line 136) | def test_convert_multistate_nonorthogonal(): function test_build_spatial_output (line 141) | def test_build_spatial_output(): function test_subcircuit_polarization (line 152) | def test_subcircuit_polarization(): FILE: tests/utils/test_postselect.py function test_postselect_init (line 35) | def test_postselect_init(): function test_postselect_init_invalid (line 43) | def test_postselect_init_invalid(): function test_postselect_usage (line 66) | def test_postselect_usage(): function test_postselect_usage_advanced_ge_le (line 81) | def test_postselect_usage_advanced_ge_le(): function test_postselect_operators (line 93) | def test_postselect_operators(): function test_postselect_str (line 104) | def test_postselect_str(): function test_postselect_apply_permutation (line 110) | def test_postselect_apply_permutation(): function test_postselect_shift_modes (line 123) | def test_postselect_shift_modes(): function test_postselect_can_compose_with (line 139) | def test_postselect_can_compose_with(): function test_postselect_merge (line 160) | def test_postselect_merge(): function test_postselect_independent (line 171) | def test_postselect_independent(): FILE: tests/utils/test_qmath.py function test_exponentiation (line 39) | def test_exponentiation(): function test_distinct_permutations (line 98) | def test_distinct_permutations(parameters): FILE: tests/utils/test_seed.py function test_seed_1 (line 34) | def test_seed_1(): function test_seed2 (line 42) | def test_seed2(): function test_seed3 (line 52) | def test_seed3(): FILE: tests/utils/test_simplification.py function PS_testing (line 39) | def PS_testing(circ, display): function test_PS_simp (line 51) | def test_PS_simp(): function PERM_testing (line 73) | def PERM_testing(circ, display=False): function test_perm_simp (line 87) | def test_perm_simp(): function test_PS_simp_variable_param (line 128) | def test_PS_simp_variable_param(): function test_PS_simp_remove_null_phase (line 144) | def test_PS_simp_remove_null_phase(): FILE: tests/utils/test_stategenerator.py function test_logical_state_raw (line 40) | def test_logical_state_raw(): function test_logical_state_dual_rail (line 46) | def test_logical_state_dual_rail(): function test_logical_state_polarization (line 52) | def test_logical_state_polarization(): function test_bell_state_raw (line 58) | def test_bell_state_raw(): function test_bell_state_dual_rail (line 74) | def test_bell_state_dual_rail(): function test_bell_state_polarization (line 90) | def test_bell_state_polarization(): function test_ghz_state_raw (line 106) | def test_ghz_state_raw(): function test_ghz_state_dual_rail (line 114) | def test_ghz_state_dual_rail(): function test_ghz_state_polarization (line 124) | def test_ghz_state_polarization(): function test_graph_state_raw (line 137) | def test_graph_state_raw(): function test_graph_state_dual_rail (line 150) | def test_graph_state_dual_rail(): function test_graph_state_polarization (line 163) | def test_graph_state_polarization(): function check_dicke_state (line 176) | def check_dicke_state(state: pcvl.StateVector, n: int, k: int, encoding:... function test_dicke_state (line 200) | def test_dicke_state(mock_warn, encoding): function test_zero_padded_state (line 220) | def test_zero_padded_state(): function test_periodic_state (line 234) | def test_periodic_state(): function test_evenly_spaced_state (line 245) | def test_evenly_spaced_state(): FILE: tests/utils/test_statevector.py function test_basic_state (line 43) | def test_basic_state(): function test_str_state_vector (line 53) | def test_str_state_vector(): function test_tensor_product_0 (line 59) | def test_tensor_product_0(): function test_tensor_product_1 (line 65) | def test_tensor_product_1(): function test_tensor_product_2 (line 71) | def test_tensor_product_2(): function test_tensor_svdistribution_1 (line 79) | def test_tensor_svdistribution_1(): function test_state_annots (line 94) | def test_state_annots(): function test_state_identical_annots (line 112) | def test_state_identical_annots(): function test_state_invalid_superposition (line 125) | def test_state_invalid_superposition(): function test_state_superposition (line 132) | def test_state_superposition(): function test_init_state_vector (line 139) | def test_init_state_vector(): function test_bsdistribution (line 145) | def test_bsdistribution(): function test_svdistribution (line 169) | def test_svdistribution(): function test_distribution_simplification (line 204) | def test_distribution_simplification(): function test_separate_state_with_annots (line 247) | def test_separate_state_with_annots(): function test_partition (line 260) | def test_partition(): function test_parse_annot (line 271) | def test_parse_annot(): function test_sv_parse_symb_annot (line 285) | def test_sv_parse_symb_annot(): function test_sv_parse_tuple_annot (line 290) | def test_sv_parse_tuple_annot(): function test_svd_sample (line 297) | def test_svd_sample(): function test_svd_anonymize_annots_simple (line 311) | def test_svd_anonymize_annots_simple(): function test_svd_anonymize_annots_superposition (line 329) | def test_svd_anonymize_annots_superposition(): function test_statevector_sample (line 348) | def test_statevector_sample(): function test_statevector_samples (line 357) | def test_statevector_samples(): function test_statevector_measure_1 (line 366) | def test_statevector_measure_1(): function test_statevector_measure_2 (line 378) | def test_statevector_measure_2(): function test_statevector_measure_3 (line 390) | def test_statevector_measure_3(): function test_statevector_equality (line 399) | def test_statevector_equality(): function test_statevector_arithmetic (line 407) | def test_statevector_arithmetic(): function test_max_photon_state_iterator (line 430) | def test_max_photon_state_iterator(): function test_allstate_iterator (line 441) | def test_allstate_iterator(): function test_mult (line 454) | def test_mult(): FILE: tests/utils/test_tensorproduct.py function _assert_sv_approx_eq (line 39) | def _assert_sv_approx_eq(sv1: StateVector, sv2: StateVector, error_msg="... function test_mul (line 47) | def test_mul(): function test_power (line 66) | def test_power(): function test_bsd_tensor_product (line 80) | def test_bsd_tensor_product(): function test_svd_tensor_product (line 117) | def test_svd_tensor_product(): FILE: tests/utils/test_utils_conversion.py function test_samples_to_sample_count (line 44) | def test_samples_to_sample_count(): function test_sample_count_to_probs (line 64) | def test_sample_count_to_probs(): function test_probs_to_sample_count (line 84) | def test_probs_to_sample_count(count): function test_sample_count_to_samples (line 99) | def test_sample_count_to_samples(): function test_probs_to_samples (line 111) | def test_probs_to_samples(): function test_samples_to_probs (line 121) | def test_samples_to_probs():