MCPcopy Create free account

hub / github.com/PennyLaneAI/demos / functions

Functions1,425 in github.com/PennyLaneAI/demos

↓ 1 callersFunctionnode
(params)
demonstrations_v2/tutorial_optimal_control/demo.py:704
↓ 1 callersFunctionnoise_channel
Apply a single‑qubit Pauli noise channel independently to each of `n` qubits. For every qubit the channel does: 0 → I with pro
demonstrations_v2/tutorial_bp_catalyst/demo.py:855
↓ 1 callersFunctionnoise_layer
(epsilon, wires)
demonstrations_v2/tutorial_eqnn_force_field/demo.py:280
↓ 1 callersFunctionnoise_layer
apply a random rotation to each qubit
demonstrations_v2/tutorial_learning_from_experiments/demo.py:456
↓ 1 callersFunctionnormalize
Smoothly normalize a real input value to the interval (-1, 1) using 'sigmoid' with steepness parameter k.
demonstrations_v2/tutorial_optimal_control/demo.py:361
↓ 1 callersFunctionnot_a_haar_random_unitary
()
demonstrations_v2/tutorial_haar_measure/demo.py:186
↓ 1 callersFunctionnum_grover_iterations
(N, M)
demonstrations_v2/tutorial_qjit_compile_grovers_algorithm_with_catalyst/demo.py:80
↓ 1 callersFunctionodd_reconstruction_equ
Reconstruct the odd part of an ``R``-frequency input function via equidistant shifts.
demonstrations_v2/tutorial_general_parshift/demo.py:577
↓ 1 callersFunctionone_bit_teleportation
(input_state)
demonstrations_v2/tutorial_mbqc/demo.py:161
↓ 1 callersFunctionopt_theta
(d, params, cost)
demonstrations_v2/tutorial_rotoselect/demo.py:183
↓ 1 callersFunctionoptimal_theta_and_gen_helper
(d, params, generators, cost)
demonstrations_v2/tutorial_rotoselect/demo.py:373
↓ 1 callersFunctionoptimization
(params)
demonstrations_v2/tutorial_how_to_quantum_just_in_time_compile_vqe_catalyst/demo.py:184
↓ 1 callersFunctionoptimization
(params, data, targets)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_catalyst_and_Optax/demo.py:169
↓ 1 callersFunctionoptimization_jit
(params, data, targets, print_training=False)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_and_Optax/demo.py:187
↓ 1 callersFunctionoptimization_jit
(params, data, targets)
demonstrations_v2/tutorial_post-variational_quantum_neural_networks/demo.py:283
↓ 1 callersFunctionoptimization_jit
(params, data, targets, print_training=False)
demonstrations_v2/tutorial_qnn_multivariate_regression/demo.py:196
↓ 1 callersFunctionoptimization_jit
(params, data, targets, print_training=False)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_and_JAXopt/demo.py:167
↓ 1 callersFunctionoptimizer_update
(opt_state, params, x, y, keep_rot)
demonstrations_v2/tutorial_quantum_dropout/demo.py:448
↓ 1 callersFunctionoracle
(wires, omega)
demonstrations_v2/tutorial_qjit_compile_grovers_algorithm_with_catalyst/demo.py:76
↓ 1 callersFunctionoriginal_circuit
(x, y)
demonstrations_v2/tutorial_clifford_circuit_simulations/demo.py:415
↓ 1 callersMethodosd0
Implements the ordered statistics decoding with order-0 fallback
demonstrations_v2/tutorial_qldpc_codes/demo.py:497
↓ 1 callersFunctionoverlap_sq
Computes the squared overlap between Chebyshev states.
demonstrations_v2/tutorial_quantum_chebyshev_transform/demo.py:368
↓ 1 callersFunctionpandocify_string
Helper function to convert a string to a list of Pandoc Str nodes.
lib/filter_links.py:56
↓ 1 callersFunctionparam_shift
(theta1)
demonstrations_v2/tutorial_noisy_circuit_optimization/demo.py:463
↓ 1 callersFunctionparam_shift
(theta)
demonstrations_v2/tutorial_stochastic_parameter_shift/demo.py:149
↓ 1 callersFunctionparameter_shift
(qnode, params)
demonstrations_v2/tutorial_backprop/demo.py:134
↓ 1 callersFunctionparse_body
Parse the body of an intersphinx link.
lib/filter_links.py:41
↓ 1 callersFunctionparse_img_source
(src: str)
lib/filter_helpers.py:13
↓ 1 callersFunctionpartial_measure
(noise, weights)
demonstrations_v2/tutorial_quantum_gans/demo.py:399
↓ 1 callersFunctionpartial_step
(grad_circuit, opt_state, theta)
demonstrations_v2/tutorial_odegen/demo.py:281
↓ 1 callersFunctionpauli_basis
(n)
demonstrations_v2/tutorial_resourcefulness/demo.py:676
↓ 1 callersFunctionpauli_qnode
(x)
demonstrations_v2/tutorial_huang_geometric_kernel_difference/demo.py:293
↓ 1 callersFunctionpenn_iqp_op_expval
Calculates the expectation value of the operator with the IQP circuit with PennyLane tools. Args: params (np.ndarray): The parameters of
demonstrations_v2/tutorial_iqp_circuit_optimization_jax/demo.py:163
↓ 1 callersFunctionpenn_obs
Returns a PennyLane observable from a bitstring representation. Args: op (np.ndarray): Bitstring representation of the Z operator. R
demonstrations_v2/tutorial_iqp_circuit_optimization_jax/demo.py:124
↓ 1 callersFunctionperm_equivariant_embedding
Ansatz to embed a graph with node and edge weights into a quantum state. The adjacency matrix A contains the edge weights on the off-dia
demonstrations_v2/tutorial_equivariant_graph_embedding/demo.py:214
↓ 1 callersFunctionpermute_elements
Reorders amplitudes of the conditioned states.
demonstrations_v2/tutorial_quantum_chebyshev_transform/demo.py:201
↓ 1 callersFunctionpermute_qubits
(num_qubits)
demonstrations_v2/quantum_volume/demo.py:337
↓ 1 callersFunctionplay_episodes
Play episodes in parallel.
demonstrations_v2/tutorial_rl_pulse/demo.py:466
↓ 1 callersFunctionplay_game
()
demonstrations_v2/tutorial_geometric_qml/demo.py:454
↓ 1 callersFunctionplot_points
(x_train, y_train, x_test, y_test)
demonstrations_v2/ensemble_multi_qpu/demo.py:119
↓ 1 callersFunctionplot_rotation_axes
Plot the rotation axes in the Bloch sphere.
demonstrations_v2/tutorial_rl_pulse/demo.py:803
↓ 1 callersFunctionpolynomial_degree
Calculate polynomial degree parameters from Zhou et al. (2025)
demonstrations_v2/tutorial_resource_estimation_spectroscopy/demo.py:413
↓ 1 callersFunctionpool
(wires, params, index)
demonstrations_v2/tutorial_annni/demo.py:226
↓ 1 callersFunctionpooling_layer
Adds a pooling layer to a circuit. Args: weights (np.array): Array with the weights of the conditional U3 gate. wires (list[int]):
demonstrations_v2/tutorial_learning_few_data/demo.py:207
↓ 1 callersFunctionpossibilities
(board)
demonstrations_v2/tutorial_geometric_qml/demo.py:375
↓ 1 callersFunctionpostselect_half_filled_state
(x, selection)
demonstrations_v2/tutorial_how_to_create_dynamic_mcm_circuits/demo.py:158
↓ 1 callersFunctionpredict_point
(params, x_point=None, parallel=True)
demonstrations_v2/ensemble_multi_qpu/demo.py:266
↓ 1 callersFunctionprep_circuit
()
demonstrations_v2/tutorial_lcu_blockencoding/demo.py:151
↓ 1 callersFunctionprep_entangle
()
demonstrations_v2/tutorial_testing_symmetry/demo.py:204
↓ 1 callersFunctionprepare_and_sample
(weights)
demonstrations_v2/tutorial_coherent_vqls/demo.py:492
↓ 1 callersFunctionprepare_and_sample
(weights)
demonstrations_v2/tutorial_vqls/demo.py:470
↓ 1 callersFunctionprepare_and_unprepare
(g)
demonstrations_v2/tutorial_constant_depth_mps_prep/demo.py:495
↓ 1 callersFunctionprepare_magic_state
Prepares the |H> magic state on wire 1.
demonstrations_v2/tutorial_magic_states/demo.py:54
↓ 1 callersFunctionprepare_state
(params, device)
demonstrations_v2/tutorial_vqt/demo.py:455
↓ 1 callersFunctionprobabilities_threshold_normalize
(probabilities, thresh = 1.e-10)
demonstrations_v2/tutorial_classical_kernels/demo.py:648
↓ 1 callersFunctionprocess_doc_link
Process a doc/demo link.
lib/filter_links.py:28
↓ 1 callersFunctionprocess_header
Process the header cells of a table. Return a list of text strings for each header cell.
lib/filter_tables.py:10
↓ 1 callersFunctionprocess_rows
Process the rows of a table. Return a list of lists of text strings for each cell in each row.
lib/filter_tables.py:20
↓ 1 callersFunctionproduct_state
(n_qubits)
demonstrations_v2/tutorial_resourcefulness/demo.py:368
↓ 1 callersFunctionprofit
Compute the fidelity function for given parameters.
demonstrations_v2/tutorial_optimal_control/demo.py:475
↓ 1 callersFunctionpsi_norm
Returns the normalization constant <psi|psi>, where |psi> = A |x>.
demonstrations_v2/tutorial_vqls/demo.py:342
↓ 1 callersFunctionpush_and_correct
Push an operator from left to right along the bond sites of an MPS and conditionally apply correcting operations on the corresponding physical sit
demonstrations_v2/tutorial_constant_depth_mps_prep/demo.py:576
↓ 1 callersFunctionqaoa_circuit
(params, n_qubits, depth)
demonstrations_v2/qnspsa/demo.py:208
↓ 1 callersFunctionqaoa_cost
(bitstring)
demonstrations_v2/tutorial_quantum_circuit_cutting/demo.py:478
↓ 1 callersFunctionqaoa_training
(n_iterations, n_layers=2)
demonstrations_v2/braket-parallel-gradients/demo.py:480
↓ 1 callersFunctionqft
Prepare a state \sum_x f(x) |x> and apply the discrete Fourier transform.
demonstrations_v2/tutorial_qft_and_groups/demo.py:257
↓ 1 callersFunctionqft2
Prepare a state \sum_x f(x) |x> and apply the Fourier transform over Z_2^4.
demonstrations_v2/tutorial_qft_and_groups/demo.py:284
↓ 1 callersFunctionqgrnn_layer
(weights, bias, qubits, graph, trotter_step)
demonstrations_v2/tutorial_qgrnn/demo.py:403
↓ 1 callersFunctionqiskit_circuit
()
demonstrations_v2/tutorial_guide_to_pennylane_knowing_qiskit/demo.py:72
↓ 1 callersMethodqnode
(weights, observable)
demonstrations_v2/tutorial_rosalin/demo.py:455
↓ 1 callersFunctionqpu_qubit_rotation_hybrid_job
(num_steps=10, stepsize=0.5)
demonstrations_v2/getting_started_with_hybrid_jobs/demo.py:334
↓ 1 callersFunctionqr_haar
Generate a Haar-random matrix using the QR decomposition.
demonstrations_v2/tutorial_haar_measure/demo.py:507
↓ 1 callersFunctionqr_haar_random_unitary
()
demonstrations_v2/tutorial_haar_measure/demo.py:528
↓ 1 callersFunctionqsvt_output
(a)
demonstrations_v2/tutorial_intro_qsvt/demo.py:111
↓ 1 callersFunctionquadratic_circuit
( num_states, elec_wires, phase_wires, coeff_wires, mode_wires, scratch_wires )
demonstrations_v2/tutorial_resource_estimation_vibronic_dynamics/demo.py:218
↓ 1 callersFunctionquantum_circuit
(noise, weights)
demonstrations_v2/tutorial_quantum_gans/demo.py:376
↓ 1 callersFunctionquantum_lock
(secret_key)
demonstrations_v2/tutorial_phase_kickback/demo.py:85
↓ 1 callersFunctionquantum_locking_mechanism
(lock, key)
demonstrations_v2/tutorial_phase_kickback/demo.py:106
↓ 1 callersFunctionquantum_model
A variational quantum model.
demonstrations_v2/tutorial_kernel_based_training/demo.py:382
↓ 1 callersFunctionquantum_model
(weights, x)
demonstrations_v2/tutorial_expressivity_fourier_series/demo.py:693
↓ 1 callersFunctionquantum_model_predict
Predict using the quantum model defined above.
demonstrations_v2/tutorial_kernel_based_training/demo.py:459
↓ 1 callersFunctionquantum_model_train
Train the quantum model defined above.
demonstrations_v2/tutorial_kernel_based_training/demo.py:418
↓ 1 callersFunctionquantum_net
The variational quantum circuit.
demonstrations_v2/tutorial_quantum_transfer_learning/demo.py:317
↓ 1 callersFunctionquantum_neural_network
(params, x)
demonstrations_v2/tutorial_qnn_multivariate_regression/demo.py:103
↓ 1 callersFunctionqubit_rotation
(num_steps=10, stepsize=0.5)
demonstrations_v2/getting_started_with_hybrid_jobs/demo.py:96
↓ 1 callersFunctionqubit_rotation_hybrid_job
(num_steps=1, stepsize=0.5)
demonstrations_v2/getting_started_with_hybrid_jobs/demo.py:171
↓ 1 callersFunctionrandom_observable
Create a random observable on N qubits.
demonstrations_v2/tutorial_general_parshift/demo.py:107
↓ 1 callersFunctionrandom_params
Generate random variational parameters in the shape for the ansatz.
demonstrations_v2/tutorial_kernels_module/demo.py:275
↓ 1 callersFunctionrandom_place
(board, player)
demonstrations_v2/tutorial_geometric_qml/demo.py:385
↓ 1 callersFunctionrandom_state
(n_qubits)
demonstrations_v2/tutorial_hidden_cut/demo.py:82
↓ 1 callersFunctionrandom_state
Create a random state on N qubits.
demonstrations_v2/tutorial_general_parshift/demo.py:101
↓ 1 callersFunctionrandom_weights
()
demonstrations_v2/tutorial_expressivity_fourier_series/demo.py:710
↓ 1 callersFunctionrate_function
(H, T, N)
demonstrations_v2/tutorial_quantum_phase_transitions/demo.py:642
↓ 1 callersFunctionreal_disc_circuit
(phi, theta, omega, disc_weights)
demonstrations_v2/tutorial_QGAN/demo.py:123
↓ 1 callersFunctionreal_u
(A, phi)
demonstrations_v2/tutorial_apply_qsvt/demo.py:312
↓ 1 callersFunctionreinforce_gradient_with_baseline
Estimates the parameter gradient from the episodes with a state-independent baseline.
demonstrations_v2/tutorial_rl_pulse/demo.py:582
↓ 1 callersFunctionrep_code
Build the (n − 1) × n parity‑check matrix H for the [n, 1] repetition code. Each row enforces equality between two neighboring bits:
demonstrations_v2/tutorial_bp_catalyst/demo.py:640
↓ 1 callersMethodrequirements
(self)
lib/demo/lib/demo.py:101
↓ 1 callersFunctionrotate_phases
Rotates and shifts the phase of the auxiliary qubit and rotates the jth qubit by pi/2^(j+1) in Z.
demonstrations_v2/tutorial_quantum_chebyshev_transform/demo.py:185
↓ 1 callersFunctionrotation_mat
Given a fixed value 'a', compute the signal rotation matrix W(a). (requires -1 <= 'a' <= 1)
demonstrations_v2/function_fitting_qsp/demo.py:154
← previousnext →901–1,000 of 1,425, ranked by callers