MCPcopy Create free account

hub / github.com/PennyLaneAI/demos / functions

Functions1,425 in github.com/PennyLaneAI/demos

↓ 1 callersFunctionclassify_with_qsvm
(Xtr, Xte, ytr, yte)
demonstrations_v2/covalent_cloud_gpu/demo.py:172
↓ 1 callersFunctioncodespace_preservation
Verify if the given generators preserve the codespace.
demonstrations_v2/tutorial_qldpc_codes/demo.py:687
↓ 1 callersFunctioncol_win
(board, player)
demonstrations_v2/tutorial_geometric_qml/demo.py:411
↓ 1 callersFunctioncomparing_function
A function that compares two sets of MCM outcomes.
demonstrations_v2/tutorial_how_to_collect_mcm_stats/demo.py:146
↓ 1 callersFunctioncompute_accuracy
Computes the accuracy over the provided features and labels
demonstrations_v2/tutorial_learning_few_data/demo.py:355
↓ 1 callersFunctioncompute_baseline
Computes the optimal state-independent baseline to minimize the gradient variance.
demonstrations_v2/tutorial_rl_pulse/demo.py:599
↓ 1 callersMethodcompute_decomposition
Defining the gate decomposition
demonstrations_v2/tutorial_error_prop/demo.py:146
↓ 1 callersFunctioncompute_energy_parallel
(H, devs, param)
demonstrations_v2/vqe_parallel/demo.py:215
↓ 1 callersFunctioncompute_energy_parallel_optimized
(H, devs, param)
demonstrations_v2/vqe_parallel/demo.py:257
↓ 1 callersFunctioncompute_logical_ops
Compute the canonical logical operators for stabilizer codes.
demonstrations_v2/tutorial_qldpc_codes/demo.py:591
↓ 1 callersFunctioncompute_rewards
Compute the reward for the pulse program based on the average gate fidelity.
demonstrations_v2/tutorial_rl_pulse/demo.py:291
↓ 1 callersFunctioncompute_stabilizer_group
Generates the independent Pauli checks and the full stabilizer group.
demonstrations_v2/tutorial_qldpc_codes/demo.py:667
↓ 1 callersFunctionconstant_depth
Prepare the MPS |Ψ(g)> in constant depth.
demonstrations_v2/tutorial_constant_depth_mps_prep/demo.py:670
↓ 1 callersFunctionconstant_depth_ansatz
Circuit ansatz for constant-depth preparation routine.
demonstrations_v2/tutorial_constant_depth_mps_prep/demo.py:696
↓ 1 callersFunctionconstant_depth_circuit
(N, g, q)
demonstrations_v2/tutorial_constant_depth_mps_prep/demo.py:714
↓ 1 callersFunctioncontrolled_rotation
(phi, wires)
demonstrations_v2/tutorial_pasqal/demo.py:265
↓ 1 callersFunctionconv
(wires, params, index)
demonstrations_v2/tutorial_annni/demo.py:209
↓ 1 callersFunctionconv_and_pooling
Apply both the convolutional and pooling layer.
demonstrations_v2/tutorial_learning_few_data/demo.py:229
↓ 1 callersFunctionconv_net
Define the QCNN circuit Args: weights (np.array): Parameters of the convolution and pool layers. last_layer_weights (np.array): Pa
demonstrations_v2/tutorial_learning_few_data/demo.py:245
↓ 1 callersFunctionconvert_notebook_to_python
( notebook: Dict, notebook_name: str, assets_folder_name: str, is_executable: bool )
notebook_converter/notebook_to_demo.py:95
↓ 1 callersFunctionconvolutional_layer
Adds a convolutional layer to a circuit. Args: weights (np.array): 1D array with 15 weights of the parametrized gates. wires (list
demonstrations_v2/tutorial_learning_few_data/demo.py:178
↓ 1 callersFunctioncore_unitary_rotation
Applies the unitary transformation corresponding to the core tensor.
demonstrations_v2/tutorial_how_to_build_compressed_double_factorized_hamiltonians/demo.py:253
↓ 1 callersFunctioncorrect_end_bond
Perform a correction on the end bond site.
demonstrations_v2/tutorial_constant_depth_mps_prep/demo.py:662
↓ 1 callersFunctioncost
(x)
demonstrations_v2/tutorial_noisy_circuit_optimization/demo.py:310
↓ 1 callersFunctioncost
(params)
demonstrations_v2/tutorial_rosalin/demo.py:194
↓ 1 callersFunctioncost
Cost function on N qubits with N frequencies.
demonstrations_v2/tutorial_general_parshift/demo.py:140
↓ 1 callersFunctioncost_circuit
(params)
demonstrations_v2/tutorial_measurement_optimize/demo.py:146
↓ 1 callersFunctioncost_fn
(weights)
demonstrations_v2/tutorial_measurement_optimize/demo.py:728
↓ 1 callersFunctioncost_function
(params, input, target)
demonstrations_v2/tutorial_geometric_qml/demo.py:684
↓ 1 callersFunctioncost_function_no_sym
(params, input, target)
demonstrations_v2/tutorial_geometric_qml/demo.py:770
↓ 1 callersFunctioncostfunc
(params)
demonstrations_v2/tutorial_tn_circuits/demo.py:355
↓ 1 callersFunctioncount_cnots
(krylov_dimension)
demonstrations_v2/tutorial_qksd_qsp_qualtran/demo.py:353
↓ 1 callersFunctioncreate_board
()
demonstrations_v2/tutorial_geometric_qml/demo.py:370
↓ 1 callersFunctioncreate_half_filled_state
(x)
demonstrations_v2/tutorial_how_to_create_dynamic_mcm_circuits/demo.py:110
↓ 1 callersFunctioncreate_hamiltonian_matrix
(n, graph)
demonstrations_v2/tutorial_vqt/demo.py:143
↓ 1 callersFunctioncreate_selected_half_filled_state
(x, selection)
demonstrations_v2/tutorial_how_to_create_dynamic_mcm_circuits/demo.py:208
↓ 1 callersFunctioncreate_target
(qubit, beta, ham, graph)
demonstrations_v2/tutorial_vqt/demo.py:509
↓ 1 callersFunctioncross_entropy
Multi-class cross entropy loss function
demonstrations_v2/tutorial_annni/demo.py:303
↓ 1 callersFunctioncrossres_circuit
(gate_pars)
demonstrations_v2/tutorial_stochastic_parameter_shift/demo.py:295
↓ 1 callersFunctioncustom_poly
A custom polynomial of degree <= d and parity d % 2
demonstrations_v2/function_fitting_qsp/demo.py:410
↓ 1 callersMethodcwd
Current working directory of the process.
lib/demo/context.py:36
↓ 1 callersFunctiondata_embedding
(i)
demonstrations_v2/tutorial_How_to_optimize_QML_model_using_JAX_catalyst_and_Optax/demo.py:49
↓ 1 callersMethoddecode
Decode a length-m syndrome vector and return the estimated error.
demonstrations_v2/tutorial_qldpc_codes/demo.py:449
↓ 1 callersFunctiondecoding
Quantum circuit decoding and uncomputing error register
demonstrations_v2/tutorial_dqi/demo.py:562
↓ 1 callersFunctiondemultiplex
Compute the type-A KAK decomposition of the block-diagonal matrix U⊕V that corresponds to demultiplexing.
demonstrations_v2/tutorial_unitary_synthesis_kak/demo.py:364
↓ 1 callersFunctiondense_layer
Apply an arbitrary unitary gate to a specified set of wires.
demonstrations_v2/tutorial_learning_few_data/demo.py:235
↓ 1 callersFunctiondensity_matrix_circuit
()
demonstrations_v2/tutorial_noisy_circuits/demo.py:86
↓ 1 callersFunctiondepolarizing_circuit
(p)
demonstrations_v2/tutorial_noisy_circuits/demo.py:190
↓ 1 callersFunctiondiag_win
(board, player)
demonstrations_v2/tutorial_geometric_qml/demo.py:426
↓ 1 callersFunctiondiffusion_operator
(wires)
demonstrations_v2/tutorial_grovers_algorithm/demo.py:265
↓ 1 callersFunctiondoubly_controlled_adder
Sends |c>|x>QFT(|b>)|0> -> |c>|x>QFT(|b + c x a) mod N>)|0>.
demonstrations_v2/tutorial_shors_algorithm_catalyst/demo.py:700
↓ 1 callersFunctiondraw_circuits_side_by_side
Display multiple PennyLane circuits side by side.
demonstrations_v2/tutorial_huang_geometric_kernel_difference/utils.py:12
↓ 1 callersFunctionembedding
(x, wires)
demonstrations_v2/tutorial_quantum_dropout/demo.py:89
↓ 1 callersFunctionencode_v
Quantum circuit uncomputing weight register and encoding vector of constraints.
demonstrations_v2/tutorial_dqi/demo.py:430
↓ 1 callersFunctionencode_zero_steane
()
demonstrations_v2/tutorial_bp_catalyst/demo.py:788
↓ 1 callersFunctionencoding
(phi, gamma)
demonstrations_v2/tutorial_quantum_metrology/demo.py:144
↓ 1 callersFunctionenergy_Ising
Calculate the energy of an Ising model given spin configurations. Parameters: - z: A dictionary representing the spin configurations for
demonstrations_v2/tutorial_QUBO/demo.py:469
↓ 1 callersFunctionenergy_circuit
(gqe_ops)
demonstrations_v2/gqe_training/demo.py:180
↓ 1 callersFunctionenergy_gap
Calculates the energy eigenvalues for the full Hamiltonian, as a function of the distance between the atoms.
demonstrations_v2/tutorial_neutral_atoms/demo.py:542
↓ 1 callersFunctionentangling_layer
Layer of CNOTs followed by another shifted layer of CNOT.
demonstrations_v2/tutorial_quantum_transfer_learning/demo.py:287
↓ 1 callersFunctionequal_superposition
(wires)
demonstrations_v2/tutorial_qjit_compile_grovers_algorithm_with_catalyst/demo.py:71
↓ 1 callersFunctionerror_correction_decoder
Error correction decoder for the 5-qubit error correction code generated by stabilizers XZZXI, IXZZX, XIXZZ, ZXIXZ.
demonstrations_v2/tutorial_magic_state_distillation/demo.py:125
↓ 1 callersFunctionestimate_shadow_obervable
Adapted from https://github.com/momohuang/predicting-quantum-properties Calculate the estimator E[O] = median(Tr{rho_{(k)} O}) where rho_(k))
demonstrations_v2/tutorial_classical_shadows/demo.py:490
↓ 1 callersFunctionestimate_shadow_obs
(shadow, observable, k=10)
demonstrations_v2/ml_classical_shadows/demo.py:407
↓ 1 callersFunctioneval_threshold
Evaluates the threshold for a given set of distances and noise levels.
demonstrations_v2/tutorial_fault_tolerant_threshold/demo.py:371
↓ 1 callersFunctionevaluate
(params, data)
demonstrations_v2/tutorial_qnn_multivariate_regression/demo.py:216
↓ 1 callersFunctionevaluate_game
(board)
demonstrations_v2/tutorial_geometric_qml/demo.py:441
↓ 1 callersMethodevaluate_grad_var
Evaluate the gradient, as well as the variance in the gradient, for the ith parameter in params, using the parameter-shift rule.
demonstrations_v2/tutorial_rosalin/demo.py:475
↓ 1 callersFunctionevaluate_program
Compute the average gate fidelity over 1000 random initial states.
demonstrations_v2/tutorial_rl_pulse/demo.py:756
↓ 1 callersFunctioneven_reconstruction_equ
Reconstruct the even part of ``R``-frequency input function via equidistant shifts.
demonstrations_v2/tutorial_general_parshift/demo.py:625
↓ 1 callersFunctionevolution_prob
(t)
demonstrations_v2/tutorial_trapped_ions/demo.py:507
↓ 1 callersFunctionevolve
(H, t)
demonstrations_v2/tutorial_shadow_hamiltonian_simulation/demo.py:147
↓ 1 callersFunctionexact_cost
(params)
demonstrations_v2/tutorial_vqt/demo.py:379
↓ 1 callersFunctionexecute_tape
Classically simulate a tape and estimate the expectation value of its output observable using truncated Pauli propagation.
demonstrations_v2/tutorial_classical_expval_estimation/demo.py:349
↓ 1 callersFunctionexpected_value
(theta)
demonstrations_v2/tutorial_vqe_vqd/demo.py:142
↓ 1 callersFunctionexpval_A_variational
Expectation value of $A$ as a function of $a$ where we use the a variational ground state solution map. Args: a (float): The paramete
demonstrations_v2/tutorial_implicit_diff_susceptibility/demo.py:546
↓ 1 callersFunctionf
(x)
demonstrations_v2/tutorial_expressivity_fourier_series/demo.py:729
↓ 1 callersFunctionf2
Function f from before, but with input split into two variables, and running from 0,...5.
demonstrations_v2/tutorial_qft_and_groups/demo.py:373
↓ 1 callersFunctionf_hat_fft
Putting the smaller transforms together.
demonstrations_v2/tutorial_qft_and_groups/demo.py:385
↓ 1 callersFunctionf_subgroup
Fourier transform over a smaller group or coset.
demonstrations_v2/tutorial_qft_and_groups/demo.py:380
↓ 1 callersFunctionfactorization
(n, wires_m, wires_k, wires_solution)
demonstrations_v2/tutorial_qft_arithmetics/demo.py:383
↓ 1 callersFunctionfaulty_T0_state
(random_key, r)
demonstrations_v2/tutorial_magic_state_distillation/demo.py:259
↓ 1 callersMethodfilter_by_label
(self, label)
demonstrations_v2/tutorial_quantum_gans/demo.py:181
↓ 1 callersFunctionfinal_state_overlap
(ci_id)
demonstrations_v2/tutorial_xas/demo.py:712
↓ 1 callersFunctionfinite_diff
Compute the central-difference finite difference of a function
demonstrations_v2/tutorial_mol_geo_opt/demo.py:260
↓ 1 callersFunctionfive_qubit_code
(alpha, beta, error_op, error_wire)
demonstrations_v2/tutorial_stabilizer_codes/demo.py:704
↓ 1 callersFunctionfive_qubit_encoded_state
(alpha, beta)
demonstrations_v2/tutorial_stabilizer_codes/demo.py:732
↓ 1 callersFunctionfix_data_qubits
()
demonstrations_v2/tutorial_loom_catalyst/demo.py:236
↓ 1 callersFunctionfix_image_alt_tag_as_text
(rst: str)
notebook_converter/notebook_to_demo.py:91
↓ 1 callersFunctionforward
(theta)
demonstrations_v2/tutorial_liesim/demo.py:248
↓ 1 callersFunctionfourier_coefficients
Computes the first 2*K+1 Fourier coefficients of a 2*pi periodic function.
demonstrations_v2/tutorial_expressivity_fourier_series/demo.py:650
↓ 1 callersFunctionfourier_q
(d, thetas, amplitudes)
demonstrations_v2/tutorial_classical_kernels/demo.py:700
↓ 1 callersFunctionfrom_Q_to_Ising
Convert the matrix Q of Eq.3 into Eq.13 elements J and h
demonstrations_v2/tutorial_QUBO/demo.py:443
↓ 1 callersFunctiong
Function whose Fourier spectrum is `g_hat`.
demonstrations_v2/tutorial_resourcefulness/demo.py:127
↓ 1 callersFunctiong_hat
Fourier coefficients of f.
demonstrations_v2/tutorial_qft_and_groups/demo.py:181
↓ 1 callersFunctiongbs_circuit
()
demonstrations_v2/gbs/demo.py:179
↓ 1 callersFunctiongen_cost
(gen_weights)
demonstrations_v2/tutorial_QGAN/demo.py:182
↓ 1 callersFunctiongen_disc_circuit
(gen_weights, disc_weights)
demonstrations_v2/tutorial_QGAN/demo.py:130
↓ 1 callersFunctiongenerate_T0
(wire)
demonstrations_v2/tutorial_magic_state_distillation/demo.py:72
↓ 1 callersFunctiongenerate_bit_strings
Generates all bit strings of a given length and Hamming weight.
demonstrations_v2/tutorial_dqi/demo.py:382
← previousnext →701–800 of 1,425, ranked by callers