Skip to content

Commit

Permalink
having the fermi hubbard notebook generating the appropriate re as a …
Browse files Browse the repository at this point in the history
…json
  • Loading branch information
JonhasSC committed Mar 20, 2024
1 parent bfb1675 commit bb44995
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 26 deletions.
59 changes: 34 additions & 25 deletions notebooks/HighTemperatureSuperConductorExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,16 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/jonhas/anaconda3/lib/python3.11/site-packages/attr/_make.py:918: RuntimeWarning: Running interpreter doesn't sufficiently support code object introspection. Some features like bare super() or accessing __class__ will not work with slotted classes.\n",
" set_closure_cell(cell, cls)\n"
]
}
],
"source": [
"import time\n",
"import numpy as np\n",
Expand Down Expand Up @@ -232,8 +241,8 @@
"output_type": "stream",
"text": [
"starting\n",
"current limit time to generate high level: 0.17603649996453896\n",
"ideal time to generate high level: 0.9172921249992214\n"
"current limit time to generate high level: 0.17318075004732236\n",
"ideal time to generate high level: 1.012555083958432\n"
]
}
],
Expand Down Expand Up @@ -290,29 +299,29 @@
"output_type": "stream",
"text": [
"Estimating Ideal\n",
" Time to decompose high level cirq.ops.common_gates.HPowGate circuit: 0.00017137499526143074 seconds \n",
" Time to transform decomposed cirq.ops.common_gates.HPowGate circuit to Clifford+T: 2.4374981876462698e-05 seconds\n",
" Time to decompose high level cirq.ops.identity.IdentityGate circuit: 5.024997517466545e-05 seconds \n",
" Time to transform decomposed cirq.ops.identity.IdentityGate circuit to Clifford+T: 3.958004526793957e-06 seconds\n",
" Time to decompose high level pyLIQTR.PhaseEstimation.pe_gates.PhaseOffset circuit: 0.00021958298748359084 seconds \n",
" Time to transform decomposed pyLIQTR.PhaseEstimation.pe_gates.PhaseOffset circuit to Clifford+T: 0.0004042080254293978 seconds\n",
" Time to decompose high level pyLIQTR.PhaseEstimation.pe_gates.Trotter_Unitary circuit: 158.59941412496846 seconds \n",
" Time to transform decomposed pyLIQTR.PhaseEstimation.pe_gates.Trotter_Unitary circuit to Clifford+T: 93.64916429203004 seconds\n",
" Time to decompose high level cirq.ops.measurement_gate.MeasurementGate circuit: 0.22286304197041318 seconds \n",
" Time to transform decomposed cirq.ops.measurement_gate.MeasurementGate circuit to Clifford+T: 9.074999252334237e-05 seconds\n",
"Time to estimate Ideal: 355.38034029101254\n",
" Time to decompose high level HPowGate circuit: 0.0001608339953236282 seconds \n",
" Time to transform decomposed HPowGate circuit to Clifford+T: 2.2499996703118086e-05 seconds\n",
" Time to decompose high level IdentityGate circuit: 5.320803029462695e-05 seconds \n",
" Time to transform decomposed IdentityGate circuit to Clifford+T: 4.166038706898689e-06 seconds\n",
" Time to decompose high level PhaseOffset circuit: 0.00016887503443285823 seconds \n",
" Time to transform decomposed PhaseOffset circuit to Clifford+T: 0.00040137500036507845 seconds\n",
" Time to decompose high level Trotter_Unitary circuit: 158.40738604101352 seconds \n",
" Time to transform decomposed Trotter_Unitary circuit to Clifford+T: 91.58855683298316 seconds\n",
" Time to decompose high level MeasurementGate circuit: 0.2265031670103781 seconds \n",
" Time to transform decomposed MeasurementGate circuit to Clifford+T: 9.520800085738301e-05 seconds\n",
"Time to estimate Ideal: 353.9253676669905\n",
"Estimating Current Limit\n",
" Time to decompose high level cirq.ops.common_gates.HPowGate circuit: 9.137496817857027e-05 seconds \n",
" Time to transform decomposed cirq.ops.common_gates.HPowGate circuit to Clifford+T: 1.7416023183614016e-05 seconds\n",
" Time to decompose high level cirq.ops.identity.IdentityGate circuit: 3.4541008062660694e-05 seconds \n",
" Time to transform decomposed cirq.ops.identity.IdentityGate circuit to Clifford+T: 2.749962732195854e-06 seconds\n",
" Time to decompose high level pyLIQTR.PhaseEstimation.pe_gates.PhaseOffset circuit: 0.00015466695185750723 seconds \n",
" Time to transform decomposed pyLIQTR.PhaseEstimation.pe_gates.PhaseOffset circuit to Clifford+T: 0.00011487503070384264 seconds\n",
" Time to decompose high level pyLIQTR.PhaseEstimation.pe_gates.Trotter_Unitary circuit: 26.277125416963827 seconds \n",
" Time to transform decomposed pyLIQTR.PhaseEstimation.pe_gates.Trotter_Unitary circuit to Clifford+T: 30.297382165968884 seconds\n",
" Time to decompose high level cirq.ops.measurement_gate.MeasurementGate circuit: 0.05876745900604874 seconds \n",
" Time to transform decomposed cirq.ops.measurement_gate.MeasurementGate circuit to Clifford+T: 8.287501987069845e-05 seconds\n",
"Time to estimate Current Limit: 88.71634245797759\n"
" Time to decompose high level HPowGate circuit: 9.099999442696571e-05 seconds \n",
" Time to transform decomposed HPowGate circuit to Clifford+T: 1.750001683831215e-05 seconds\n",
" Time to decompose high level IdentityGate circuit: 5.337502807378769e-05 seconds \n",
" Time to transform decomposed IdentityGate circuit to Clifford+T: 2.833025064319372e-06 seconds\n",
" Time to decompose high level PhaseOffset circuit: 0.00014266598736867309 seconds \n",
" Time to transform decomposed PhaseOffset circuit to Clifford+T: 0.0001134999911300838 seconds\n",
" Time to decompose high level Trotter_Unitary circuit: 27.120089749980252 seconds \n",
" Time to transform decomposed Trotter_Unitary circuit to Clifford+T: 31.090725040994585 seconds\n",
" Time to decompose high level MeasurementGate circuit: 0.05397666699718684 seconds \n",
" Time to transform decomposed MeasurementGate circuit to Clifford+T: 0.00011666701175272465 seconds\n",
"Time to estimate Current Limit: 90.8033182079671\n"
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion src/qca/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def estimate_gsee(
total_T_count += subcircuit_counts[gate][0] * t_count
total_clifford_count += subcircuit_counts[gate][0] * clifford_count

outfile_data = f'{outdir}{circuit_name}_high_level.dat.json'
outfile_data = f'{outdir}{circuit_name}_high_level.json'
total_resources = {
'num_qubits': len(subcircuit.all_qubits()),
'gate_count': total_gate_count,
Expand Down

0 comments on commit bb44995

Please sign in to comment.