MCPcopy Create free account

hub / github.com/PennyLaneAI/demos / functions

Functions1,425 in github.com/PennyLaneAI/demos

↓ 1 callersFunctiongenerate_many_sro
Given a tensor of possible 'a' vals, return a tensor of W(a)
demonstrations_v2/function_fitting_qsp/demo.py:165
↓ 1 callersFunctiongenerate_molecule_data
(molecules="H2")
demonstrations_v2/gqe_training/demo.py:128
↓ 1 callersFunctiongenerate_paulis
(identities: int, paulis: int, output: str, qubits: int, locality: int)
demonstrations_v2/tutorial_post-variational_quantum_neural_networks/demo.py:328
↓ 1 callersFunctiongenerate_random_gate_sequence
(shape)
_static/demonstration_assets/barren_gadgets/layered_ansatz.py:46
↓ 1 callersFunctiongenerate_requirements
( ctx: Context, demo: Demo, dev: bool, output_file: Path, quiet: bool = False )
lib/demo/lib/demo.py:249
↓ 1 callersFunctiongenerate_shifts
(thetas: int, order: int)
demonstrations_v2/tutorial_post-variational_quantum_neural_networks/demo.py:454
↓ 1 callersFunctiongenerate_single_qubit_gate_list
()
demonstrations_v2/qsim_beyond_classical/demo.py:270
↓ 1 callersFunctiongenerate_sphinx_role_comment
(role_name: str, target: str, **attrs: Union[str, int])
notebook_converter/notebook_to_demo.py:82
↓ 1 callersFunctiongeneric_layer
(weights, x)
demonstrations_v2/tutorial_contextuality/demo.py:533
↓ 1 callersFunctionget_H
Construction function the ANNNI Hamiltonian (J=1)
demonstrations_v2/tutorial_annni/demo.py:69
↓ 1 callersFunctionget_av_test_kl
returns the average KL divergence for a test set X_test.
demonstrations_v2/tutorial_contextuality/demo.py:645
↓ 1 callersFunctionget_bars_and_stripes
(n)
demonstrations_v2/tutorial_qcbm/demo.py:139
↓ 1 callersFunctionget_circuit
Create a quantum circuit with a given layout for preparing quantum states. The circuit only contains RY rotation gates and CNOT gates, design
demonstrations_v2/low_depth_circuits_mnist/demo.py:164
↓ 1 callersFunctionget_grad
(params_curr)
demonstrations_v2/qnspsa/demo.py:314
↓ 1 callersFunctionget_kernel_circuit
(n_wires)
demonstrations_v2/covalent_cloud_gpu/demo.py:124
↓ 1 callersFunctionget_loss
Evaluate the loss function ℒ, defined in the background section for a certain set of parameters.
demonstrations_v2/tutorial_univariate_qvr/demo.py:595
↓ 1 callersFunctionget_next_params
(params, gradient)
demonstrations_v2/qnspsa/demo.py:481
↓ 1 callersFunctionget_optimizer
Create and initialize an Adam optimizer for the parameters.
demonstrations_v2/tutorial_rl_pulse/demo.py:630
↓ 1 callersFunctionget_phase
Get the phase from the DMRG transition lines
demonstrations_v2/tutorial_annni/demo.py:125
↓ 1 callersFunctionget_pulse_program
Extract the pulse program from the trained policy.
demonstrations_v2/tutorial_rl_pulse/demo.py:736
↓ 1 callersFunctionget_raw_tensor_metric
(params_curr)
demonstrations_v2/qnspsa/demo.py:400
↓ 1 callersFunctionget_split_data
(n_samples=18, test_size=0.2)
demonstrations_v2/covalent_cloud_gpu/demo.py:144
↓ 1 callersFunctionget_training_cycler
Get an instance of the DataGetter class defined above, which behaves analogously to next(iterator) but is pickleable.
demonstrations_v2/tutorial_univariate_qvr/demo.py:409
↓ 1 callersFunctionget_wire_labels
Generates the wire map for the full system.
demonstrations_v2/tutorial_resource_estimation_vibronic_dynamics/demo.py:272
↓ 1 callersFunctionghz_state
(n_qubits)
demonstrations_v2/tutorial_resourcefulness/demo.py:381
↓ 1 callersFunctionglobal_ground
(weights)
demonstrations_v2/tutorial_coherent_vqls/demo.py:363
↓ 1 callersFunctiongroup_rows_cols_by_sparsity
Given matrix B, this function groups identical rows and columns, orders these groups by sparsity (most zeros first) and returns the row & col
demonstrations_v2/tutorial_resourcefulness/utils.py:8
↓ 1 callersFunctionh_hat
Fourier coefficients of h.
demonstrations_v2/tutorial_qft_and_groups/demo.py:242
↓ 1 callersFunctionhaar_random_unitary
()
demonstrations_v2/tutorial_haar_measure/demo.py:279
↓ 1 callersFunctionhaar_state
(n_qubits)
demonstrations_v2/tutorial_resourcefulness/demo.py:375
↓ 1 callersFunctionhadamard_test
(x_prep, z_prep, x_loop, z_loop)
demonstrations_v2/tutorial_toric_code/demo.py:930
↓ 1 callersFunctionhadamard_test
(Uq, Ucl, component="real")
demonstrations_v2/tutorial_classically_boosted_vqe/demo.py:444
↓ 1 callersFunctionhermitian_matrix_with_power_of_2_eigenvalues
(n)
demonstrations_v2/linear_equations_hhl_qrisp_catalyst/demo.py:679
↓ 1 callersFunctionhinge_loss
Implements the hinge loss.
demonstrations_v2/tutorial_kernel_based_training/demo.py:396
↓ 1 callersFunctioninference
(loss_data, opt_state)
demonstrations_v2/tutorial_eqnn_force_field/demo.py:438
↓ 1 callersFunctioninit_weights
Initializes random weights for the QCNN model.
demonstrations_v2/tutorial_learning_few_data/demo.py:367
↓ 1 callersFunctioninitial_circuit
Circuit to load initial state and prepare auxiliary qubit.
demonstrations_v2/tutorial_xas/demo.py:301
↓ 1 callersFunctioninitial_state_expval
Compute the expectation value of an operator ``H`` in the state |0>.
demonstrations_v2/tutorial_classical_expval_estimation/demo.py:328
↓ 1 callersFunctioninner_product
Compute the trace inner product between two operators.
demonstrations_v2/tutorial_kak_decomposition/demo.py:259
↓ 1 callersFunctioninput_prep
(alpha)
demonstrations_v2/tutorial_contextuality/demo.py:417
↓ 1 callersFunctioniterate_minibatches
A generator for batches of the input data Args: inputs (array[float]): input data targets (array[float]): targets Retur
demonstrations_v2/tutorial_data_reuploading_classifier/demo.py:352
↓ 1 callersFunctionkernel_circuit
(x1, x2, params)
demonstrations_v2/tutorial_kernels_module/demo.py:296
↓ 1 callersFunctionkinetic_circuit
(mode_wires, phase_wires, scratch_wires, coeff_wires)
demonstrations_v2/tutorial_resource_estimation_vibronic_dynamics/demo.py:103
↓ 1 callersFunctionkl_div
Get the KL divergence between two probability distributions
demonstrations_v2/tutorial_contextuality/demo.py:621
↓ 1 callersFunctionl4_gate
(wire)
demonstrations_v2/tutorial_achieving_universality_with_the_clifford_hierarchy/demo.py:229
↓ 1 callersFunctionlayer
Building block of the embedding ansatz
demonstrations_v2/tutorial_kernels_module/demo.py:242
↓ 1 callersFunctionlayer
(v)
demonstrations_v2/quantum_neural_net/demo.py:57
↓ 1 callersFunctionlayer
(params, j)
demonstrations_v2/tutorial_state_preparation/demo.py:100
↓ 1 callersFunctionlayer
(layer_weights)
demonstrations_v2/tutorial_variational_classifier/demo.py:79
↓ 1 callersFunctionlayer
(W)
demonstrations_v2/tutorial_multiclass_classification/demo.py:82
↓ 1 callersFunctionlayer
(theta, phi, wires)
demonstrations_v2/qonn/demo.py:118
↓ 1 callersFunctionlayer0_diag
(params)
demonstrations_v2/tutorial_quantum_natural_gradient/demo.py:276
↓ 1 callersFunctionlayer0_off_diag_double
(params)
demonstrations_v2/tutorial_quantum_natural_gradient/demo.py:298
↓ 1 callersFunctionlayer0_off_diag_single
(params)
demonstrations_v2/tutorial_quantum_natural_gradient/demo.py:292
↓ 1 callersFunctionlayer1_diag
(params)
demonstrations_v2/tutorial_quantum_natural_gradient/demo.py:353
↓ 1 callersFunctionlayer1_off_diag_double
(params)
demonstrations_v2/tutorial_quantum_natural_gradient/demo.py:378
↓ 1 callersFunctionlayer1_off_diag_single
(params)
demonstrations_v2/tutorial_quantum_natural_gradient/demo.py:372
↓ 1 callersFunctionlayers_scaling
(n_wires, n_layers)
demonstrations_v2/adjoint_diff_benchmarking/demo.py:64
↓ 1 callersFunctionlinear_circuit
(num_states, elec_wires, phase_wires, coeff_wires, scratch_wires)
demonstrations_v2/tutorial_resource_estimation_vibronic_dynamics/demo.py:178
↓ 1 callersFunctionlinear_system_solver_circuit
(phi)
demonstrations_v2/tutorial_apply_qsvt/demo.py:360
↓ 1 callersFunctionload_and_process_data
()
demonstrations_v2/tutorial_multiclass_classification/demo.py:223
↓ 1 callersFunctionload_digits_data
Return training and testing data of digits dataset.
demonstrations_v2/tutorial_learning_few_data/demo.py:310
↓ 1 callersFunctionlocal_inversion
()
demonstrations_v2/tutorial_learningshallow/demo.py:65
↓ 1 callersFunctionlogical_error
(sv)
demonstrations_v2/tutorial_bp_catalyst/demo.py:969
↓ 1 callersFunctionlogical_operators_consistency
Verify if the given logical operators are consistent.
demonstrations_v2/tutorial_qldpc_codes/demo.py:717
↓ 1 callersFunctionlookup_decoder
(matrix: ArrayLike, max_weight: int = 1)
demonstrations_v2/tutorial_bp_catalyst/demo.py:232
↓ 1 callersFunctionloss_fn
(params, data, targets)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_and_Optax/demo.py:77
↓ 1 callersFunctionloss_fn
(params, data, targets)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_and_JAXopt/demo.py:77
↓ 1 callersFunctionmagic_state_injection_circuit
(target_state_params)
demonstrations_v2/tutorial_magic_states/demo.py:64
↓ 1 callersFunctionmake_atomized_training_set
Convert input time series data provided in a two-dimensional tensor format to atomized tuple chunks: (xt, t).
demonstrations_v2/tutorial_univariate_qvr/demo.py:347
↓ 1 callersFunctionmake_cost
Create a cost function on N qubits with N frequencies.
demonstrations_v2/tutorial_general_parshift/demo.py:134
↓ 1 callersFunctionmake_data
(n_samples, lower=-np.pi, higher=np.pi)
demonstrations_v2/tutorial_classical_kernels/demo.py:154
↓ 1 callersFunctionmake_double_cake_data
(num_sectors)
demonstrations_v2/tutorial_kernels_module/demo.py:155
↓ 1 callersFunctionmake_initial_probabilities
(d)
demonstrations_v2/tutorial_classical_kernels/demo.py:589
↓ 1 callersFunctionmake_kraus_ops
(num_wires: int)
demonstrations_v2/tutorial_quantum_circuit_cutting/demo.py:625
↓ 1 callersFunctionmake_markdown_link
Make a markdown link from a link block. Returns a markdown text string for the link. The format for the link block is a list containing three
lib/filter_helpers.py:20
↓ 1 callersFunctionmake_markdown_table
Make a markdown table from a table block. Returns a markdown text string for the table. The format for the table block is a list containing si
lib/filter_tables.py:35
↓ 1 callersFunctionmake_thetas
(n_wires)
demonstrations_v2/tutorial_classical_kernels/demo.py:337
↓ 1 callersFunctionmean_photon_gaussian
(mag_alpha, phase_alpha, phi)
demonstrations_v2/tutorial_gaussian_transformation/demo.py:86
↓ 1 callersFunctionmeasure_coherent_p
(alpha, phi)
demonstrations_v2/tutorial_photonics/demo.py:285
↓ 1 callersFunctionmeasure_coherent_x
(alpha, phi)
demonstrations_v2/tutorial_photonics/demo.py:278
↓ 1 callersFunctionmeasure_n_coherent
(alpha, phi)
demonstrations_v2/tutorial_photonics/demo.py:590
↓ 1 callersFunctionmeasure_squeezed_p
(r)
demonstrations_v2/tutorial_photonics/demo.py:518
↓ 1 callersFunctionmeasure_squeezed_x
(r)
demonstrations_v2/tutorial_photonics/demo.py:511
↓ 1 callersFunctionmeasure_z_stabilizers
(H)
demonstrations_v2/tutorial_bp_catalyst/demo.py:899
↓ 1 callersFunctionmeasurement
(a, phi)
demonstrations_v2/tutorial_photonics/demo.py:621
↓ 1 callersFunctionmeasurement
(weights)
demonstrations_v2/tutorial_quantum_metrology/demo.py:165
↓ 1 callersFunctionmitigated_circuit
(w1, w2)
demonstrations_v2/zne_catalyst/demo.py:211
↓ 1 callersFunctionmitigated_circuit_qjit
(w1, w2)
demonstrations_v2/zne_catalyst/demo.py:184
↓ 1 callersFunctionmixture_gaussian_pdf
(x, mus, sigmas)
demonstrations_v2/tutorial_qcbm/demo.py:438
↓ 1 callersMethodmmd_loss
(self, params)
demonstrations_v2/tutorial_qcbm/demo.py:116
↓ 1 callersFunctionmodular_inverse
QJIT-compatible modular multiplicative inverse routine. Source: https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers
demonstrations_v2/tutorial_shors_algorithm_catalyst/demo.py:567
↓ 1 callersFunctionmost_probable_states_descending
Returns the indices of the N most probable states in descending order.
demonstrations_v2/tutorial_qjit_compile_grovers_algorithm_with_catalyst/demo.py:128
↓ 1 callersFunctionmul
(m, k)
demonstrations_v2/tutorial_qft_arithmetics/demo.py:322
↓ 1 callersFunctionmulticlass_svm_loss
(q_circuits, all_params, feature_vecs, true_labels)
demonstrations_v2/tutorial_multiclass_classification/demo.py:155
↓ 1 callersFunctionmy_circuit
()
demonstrations_v2/tutorial_apply_qsvt/demo.py:51
↓ 1 callersFunctionmy_circuit
()
demonstrations_v2/tutorial_jax_transformations/demo.py:279
↓ 1 callersFunctionmy_model
(data, weights, bias)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_and_Optax/demo.py:68
↓ 1 callersFunctionmy_model
(data, weights, bias)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_catalyst_and_Optax/demo.py:79
↓ 1 callersFunctionmy_model
(data, weights, bias)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_and_JAXopt/demo.py:68
← previousnext →801–900 of 1,425, ranked by callers