Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timing information for qubit counting #1367

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mpharrigan
Copy link
Collaborator

@mpharrigan mpharrigan commented Aug 29, 2024

Based on the execution fixture introduced in #1362

This times how long it takes to compute the qubit counts for each bloq example. Can be extended to also time the gate cost as well.

Includes

  • some fixes to correctly mark exceptions due to attempting a symbolic decompose
  • Include the name of the bloq that fails decomposition in all cases.

@mpharrigan
Copy link
Collaborator Author

permutation_cycle_symb

An unexpected error occurred when trying to compute qubit count for MultiControlX: Unexpected error when decomposing MultiControlX: Register(name='controls', dtype=QBit(), _shape=(ceiling(log2(N)),), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

permutation_symb

An unexpected error occurred when trying to compute qubit count for MultiControlX: Unexpected error when decomposing MultiControlX: Register(name='controls', dtype=QBit(), _shape=(ceiling(log2(N)),), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

permutation_symb_with_cycles

An unexpected error occurred when trying to compute qubit count for Permutation: An unexpected error occurred when trying to compute qubit count for MultiControlX: Unexpected error when decomposing MultiControlX: Register(name='controls', dtype=QBit(), _shape=(ceiling(log2(N)),), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

product_block_encoding_symb

An unexpected error occurred when trying to compute qubit count for MultiControlX: Unexpected error when decomposing MultiControlX: Register(name='controls', dtype=QBit(), _shape=(a2,), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

qroam_symb_clean_1d

An unexpected error occurred when trying to compute qubit count for SwapWithZero†: Unexpected error when decomposing SwapWithZero†: Register(name='targets', dtype=QAny(bitsize=b), _shape=(2**k,), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

qroam_symb_clean_2d

An unexpected error occurred when trying to compute qubit count for SwapWithZero: Unexpected error when decomposing SwapWithZero: Register(name='targets', dtype=QAny(bitsize=b1), _shape=(2k1, 2k2), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

qroam_symb_dirty_2d

An unexpected error occurred when trying to compute qubit count for QROM: Unexpected error when decomposing QROM: Register(name='target0_', dtype=QAny(bitsize=b1), _shape=(2k1, 2k2), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

qroam_symb_dirty_1d

An unexpected error occurred when trying to compute qubit count for SwapWithZero: Unexpected error when decomposing SwapWithZero: Register(name='targets', dtype=QAny(bitsize=b), _shape=(2**k,), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

ec_add

An unexpected error occurred when trying to compute qubit count for MultiCToffoli: Unexpected error when decomposing MultiCToffoli: Register(name='ctrl', dtype=QBit(), _shape=(n,), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

modexp

An unexpected error occurred when trying to compute qubit count for ModExp: An unexpected error occurred when trying to compute qubit count for CModMulK: Unexpected error when decomposing CModMulK: base is not invertible for the given modulus

modexp_small

An unexpected error occurred when trying to compute qubit count for ModExp: An unexpected error occurred when trying to compute qubit count for CModMulK: Unexpected error when decomposing CModMulK: base is not invertible for the given modulus

symbolic_hamsim_by_gqsp

An unexpected error occurred when trying to compute qubit count for HamiltonianSimulationByGQSP: Variables are not symbols, got [0, 1]

hubbard_time_evolution_by_gqsp

Timeout

ccpauli

An unexpected error occurred when trying to compute qubit count for MultiControlPauli: Unexpected error when decomposing MultiControlPauli: <class 'cirq.ops.pauli_gates._PauliX'>

ccpauli_symb

An unexpected error occurred when trying to compute qubit count for MultiControlPauli: Unexpected error when decomposing MultiControlPauli: Register(name='controls', dtype=QBit(), _shape=(n,), side=<Side.THRU: 3>) is symbolic. Cannot get real-valued shape.

kaiser_window_state_symbolic

An unexpected error occurred when trying to compute qubit count for StatePreparationViaRotations: Unexpected error when decomposing StatePreparationViaRotations: Split cannot have a symbolic data type.

lp_resource_state_symbolic

An unexpected error occurred when trying to compute qubit count for LPResourceState: Unexpected error when decomposing LPResourceState: loop of ufunc does not support argument 0 of type Pow which has no callable arccos method

qubitization_qpe_sparse_chem

An unexpected error occurred when trying to compute qubit count for QubitizationQPE: An unexpected error occurred when trying to compute qubit count for QubitizationWalkOperator: An unexpected error occurred when trying to compute qubit count for ReflectionUsingPrepare: Unexpected error when decomposing ReflectionUsingPrepare: Cannot apply_along_axis when any iteration dimensions are 0

qubitization_qpe_chem_thc

Timeout

qubitization_qpe_hubbard_model_large

Timeout

hamming_weight_phasing_via_phase_gradient

An unexpected error occurred when trying to compute qubit count for HammingWeightPhasingViaPhaseGradient: An unexpected error occurred when trying to compute qubit count for QvrPhaseGradient: An unexpected error occurred when trying to compute qubit count for AddScaledValIntoPhaseReg: Unexpected error when decomposing AddScaledValIntoPhaseReg: Finalizing register dtypes are not consistent x: QFxp(3, 3) vs x: QFxp(3, 0).

thc_walk_op

Timeout

state_prep_via_rotation_symb

An unexpected error occurred when trying to compute qubit count for StatePreparationViaRotations: Unexpected error when decomposing StatePreparationViaRotations: Split cannot have a symbolic data type.

@mpharrigan mpharrigan force-pushed the 2024-08/qubit-counting-timing branch from f5d764b to 2909689 Compare September 10, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant