Closed QuantumJaeYoo closed 1 year ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
@MichaelBroughton Hi Michael, @Sinestro38 and I could reduce the number of files in this PR for you to review this PR easily. PTAL.
Just a note, could it make sense to squash-merge instead of merge? Noticed commit history getting cluttered on main
@zaqqwerty Thank you for the idea. I squashed all commits. Could you please also review this PR? @MichaelBroughton Please feel free to add kokoro:run tag and then let's debug it together.
@zaqqwerty @MichaelBroughton After fixing the merge conflict, the squashed commits reverted... I hope we could use "Squash and merge" button before merging this PR.
I will split this PR into multiple easier and shorter PRs.
This has large changes and requires some deps error, rewrite documentations, and fixed internal bugs inside random ops, and so forth.
Please look at the PR descriptions in my repo to understand the procedures : https://github.com/jaeyoo/quantum/pulls?q=is%3Apr+is%3Aclosed
Breaking Changes
_GLIBCXX_USE_CXX11_ABI=1
. Downstream projects that encounterstd::__cxx11
or[abi:cxx11]
linker errors will need to adopt this compiler option. See the GNU C++ Library docs on Dual ABI.-std=c++17
, see install.md for build instructions.0.13.1
to~=1.0
cirq_google.XMON
was deprecated : https://github.com/quantumlib/Cirq/issues/4856QuantumEngineSampler
was deprecated : https://github.com/quantumlib/Cirq/issues/5371cirq.CNOT
interface was changed.cirq.SingleQubitGate
was deprecated.cirq.testing.SingleQubitGate
: https://github.com/quantumlib/Cirq/pull/5272/filescirq.Gate
.Major Features and Improvements
use_cuquantum=True
at layer instantiation. Examples:tfq.layers.Expectation(use_cuquantum=True)
tfq.layers.SampledExpectation(use_cuquantum=True)
(note that cuQuantum runtime is unsupported for any noisy circuit operationstfq.layers.State(use_cuquantum=True)
tfq.layers.Sample(use_cuquantum=True)
tfq.layers.PQC(model_circuit, operators, use_cuquantum=True)
tfq.layers.ControlledPQC(model_circuit, operators, use_cuquantum=True)
tensorFlow-cpu
from source following the instructions in install.md.configure.sh
script at this step of building. This ensures that you build upontensorflow-cpu
astensorflow-gpu
is unnecessary for CuQuantum support in TensorFlow Quantum.CUQUANTUM_ROOT
environment variable is set (referred to in the installation instructions). If not set, bazel will attempt to automatically locate the folder containing the cuQuantum installation upon runningconfigure.sh
at this step.use_cuquantum=True
. This can be done by running:tfq.python.quantum_context.set_quantum_concurrent_op_mode(False)
Source: https://github.com/Sinestro38/quantum/blob/master/tensorflow_quantum/release.md cc: @MichaelBroughton @QuantumJaeYoo