@@ -245,7 +245,7 @@ class VectorSpaceCuStateVecEx {
245245 ResultType local_r = callback (k, res);
246246
247247 auto cuda_type = GetCudaType<ResultType>();
248- auto comm = mp_->communicator ();
248+ auto comm = mp_->Communicator ();
249249 ErrorCheck (comm->intf ->allreduce (comm, &local_r, &r, 1 , cuda_type));
250250
251251 return r;
@@ -338,7 +338,7 @@ class VectorSpaceCuStateVecEx {
338338 ResultType local_r = callback (k, res1, res2);
339339
340340 auto cuda_type = GetCudaType<ResultType>();
341- auto comm = mp_->communicator ();
341+ auto comm = mp_->Communicator ();
342342 ErrorCheck (comm->intf ->allreduce (comm, &local_r, &r, 1 , cuda_type));
343343
344344 return r;
@@ -385,16 +385,16 @@ class VectorSpaceCuStateVecEx {
385385 Vector Create (unsigned num_qubits) const {
386386 custatevecExStateVectorDescriptor_t state_vec;
387387 custatevecExDictionaryDescriptor_t sv_config
388- = mp.create_sv_config (num_qubits, kStateDataType );
388+ = mp.CreateSVConfig (num_qubits, kStateDataType );
389389
390390 unsigned num_substates = 1 ;
391391 DistributionType distr_type = kNoDistr ;
392392
393393 if (sv_config != nullptr ) {
394394 ErrorCheck (custatevecExStateVectorCreateMultiProcess (
395- &state_vec, sv_config, nullptr , mp.communicator (), nullptr ));
395+ &state_vec, sv_config, nullptr , mp.Communicator (), nullptr ));
396396
397- num_substates = mp.num_processes ();
397+ num_substates = mp.NumProcesses ();
398398 distr_type = kMultiProcess ;
399399
400400 if (param.verbosity > 2 ) {
@@ -480,6 +480,10 @@ class VectorSpaceCuStateVecEx {
480480 return vector.get () == nullptr ;
481481 }
482482
483+ static bool ValidDeviceNetworkType (unsigned network_type) {
484+ return network_type < 2 ;
485+ }
486+
483487 bool Copy (const Vector& src, Vector& dest) const {
484488 if (src.num_qubits () != dest.num_qubits ()) {
485489 return false ;
@@ -503,15 +507,15 @@ class VectorSpaceCuStateVecEx {
503507 bool Copy (const Vector& src, fp_type* dest) const {
504508 if (src.distr_type () == kMultiProcess ) {
505509 uint64_t size = (uint64_t {1 } << src.num_qubits ()) / src.num_substates ();
506- uint64_t offset = size * mp.rank ();
510+ uint64_t offset = size * mp.Rank ();
507511
508512 ErrorCheck (custatevecExStateVectorGetState (
509513 src.get (), dest + 2 * offset, kStateDataType ,
510514 offset, offset + size, 1 ));
511515 ErrorCheck (custatevecExStateVectorSynchronize (src.get ()));
512516
513517 auto cuda_type = GetCudaType<std::complex <fp_type>>();
514- auto comm = mp.communicator ();
518+ auto comm = mp.Communicator ();
515519 ErrorCheck (comm->intf ->allgather (
516520 comm, dest + 2 * offset, dest, size, cuda_type));
517521 } else {
@@ -529,7 +533,7 @@ class VectorSpaceCuStateVecEx {
529533 bool Copy (const fp_type* src, Vector& dest) const {
530534 if (dest.distr_type () == kMultiProcess ) {
531535 uint64_t size = (uint64_t {1 } << dest.num_qubits ()) / dest.num_substates ();
532- uint64_t offset = size * mp.rank ();
536+ uint64_t offset = size * mp.Rank ();
533537
534538 ErrorCheck (custatevecExStateVectorSetState (
535539 dest.get (), src + 2 * offset, kStateDataType ,
@@ -560,7 +564,7 @@ class VectorSpaceCuStateVecEx {
560564
561565 if (dest.distr_type () == kMultiProcess ) {
562566 size /= dest.num_substates ();
563- uint64_t offset = size * mp.rank ();
567+ uint64_t offset = size * mp.Rank ();
564568
565569 ErrorCheck (custatevecExStateVectorSetState (
566570 dest.get (), src + 2 * offset, kStateDataType ,
0 commit comments